1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 23:00:51 +03:00

Счетчик количества загрузок файлов в дополнительных полях

This commit is contained in:
Mzhelskiy Maxim 2014-04-02 19:28:22 +07:00
parent c527f9dc23
commit 1a0755cd1e

View file

@ -91,6 +91,13 @@ class ActionProperty extends Action {
}
}
if ($bAllowDownload) {
/**
* Увеличиваем количество загрузок
*/
$aStats=$oValue->getDataOne('stats');
$aStats['count_download']=(isset($aStats['count_download']) ? $aStats['count_download'] : 0 ) +1;
$oValue->setDataOne('stats',$aStats);
$oValue->Update();
$oValueType=$oValue->getValueTypeObject();
if (!$oValueType->DownloadFile()) {
return parent::EventNotFound();