diff --git a/core/components/modxrepository/processors/rest/download/index.class.php b/core/components/modxrepository/processors/rest/download/index.class.php index d687925..ae06721 100644 --- a/core/components/modxrepository/processors/rest/download/index.class.php +++ b/core/components/modxrepository/processors/rest/download/index.class.php @@ -57,7 +57,7 @@ function getFileUrl($id){ // Count downloads if( !empty($package['r_content_id']) - AND $resource = $this->modx->getObject('modResource', $package['r_content_id']) + AND $resource = $this->modx->getObject('modResource', $package['id']) ){ $count = (int)$resource->getTVValue('downloads'); $resource->setTVValue('downloads', $count + 1);