Inheritance: extends ToroHandler
 /**
  * Constructor
  * @param $request Request
  */
 function RTHandler(&$request)
 {
     parent::ArticleHandler($request);
 }
Exemple #2
0
 function downloadSuppFile($args)
 {
     $articleId = isset($args[0]) ? $args[0] : 0;
     $suppId = isset($args[1]) ? $args[1] : 0;
     list($journal, $issue, $article) = ArticleHandler::validate($articleId);
     $suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
     if ($journal->getSetting('enablePublicSuppFileId')) {
         $suppFile =& $suppFileDao->getSuppFileByBestSuppFileId($article->getArticleId(), $suppId);
     } else {
         $suppFile =& $suppFileDao->getSuppFile((int) $suppId, $article->getArticleId());
     }
     if ($article && $suppFile) {
         import('file.ArticleFileManager');
         $articleFileManager =& new ArticleFileManager($article->getArticleId());
         if ($suppFile->isInlineable()) {
             $articleFileManager->viewFile($suppFile->getFileId());
         } else {
             $articleFileManager->downloadFile($suppFile->getFileId());
         }
     }
 }