_actionDownload() public method

public _actionDownload ( $aFileInfo, $sFieldMediaId )
Esempio n. 1
0
 function actionDownload($iFileId)
 {
     $aFileInfo = $this->_oDb->getFileInfoByFileId((int) $iFileId);
     if (!$aFileInfo) {
         $this->_oTemplate->displayPageNotFound();
         exit;
     }
     if (!$this->isAllowedDownload($aFileInfo)) {
         $this->_oTemplate->displayAccessDenied();
         exit;
     }
     parent::_actionDownload($aFileInfo, 'media_id');
 }
Esempio n. 2
0
 function actionDownload($iEntryId, $iMediaId)
 {
     $aFileInfo = $this->_oDb->getMedia((int) $iEntryId, (int) $iMediaId, 'files');
     if (!$aFileInfo || !($aDataEntry = $this->_oDb->getEntryByIdAndOwner((int) $iEntryId, 0, true))) {
         $this->_oTemplate->displayPageNotFound();
         exit;
     }
     if (!$this->isAllowedView($aDataEntry)) {
         $this->_oTemplate->displayAccessDenied();
         exit;
     }
     parent::_actionDownload($aFileInfo, 'media_id');
 }