mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
Счетчик количества загрузок файлов в дополнительных полях
This commit is contained in:
parent
c527f9dc23
commit
1a0755cd1e
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue