classes/file/PublicFileManager.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import('file.PKPPublicFileManager');
00018 
00019 class PublicFileManager extends PKPPublicFileManager {
00025    function getConferenceFilesPath($conferenceId) {
00026       return Config::getVar('files', 'public_files_dir') . '/conferences/' . $conferenceId;
00027    }
00028 
00034    function getSchedConfFilesPath($schedConfId) {
00035       $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
00036       $schedConf =& $schedConfDao->getSchedConf($schedConfId);
00037       return Config::getVar('files', 'public_files_dir') . '/conferences/' . $schedConf->getConferenceId() . '/schedConfs/' . $schedConfId;
00038    }
00039 
00047    function uploadConferenceFile($conferenceId, $fileName, $destFileName) {
00048       return $this->uploadFile($fileName, $this->getConferenceFilesPath($conferenceId) . '/' . $destFileName);
00049    }
00050 
00058    function writeConferenceFile($conferenceId, $destFileName, &$contents) {
00059       return $this->writeFile($this->getConferenceFilesPath($conferenceId) . '/' . $destFileName, $contents);
00060    }
00061 
00069    function copyConferenceFile($conferenceId, $sourceFile, $destFileName) {
00070       return $this->copyFile($sourceFile, $this->getConferenceFilesPath($conferenceId) . '/' . $destFileName);
00071    }
00072 
00079    function removeConferenceFile($conferenceId, $fileName) {
00080       return $this->deleteFile($this->getConferenceFilesPath($conferenceId) . '/' . $fileName);
00081    }
00082 
00090    function uploadSchedConfFile($schedConfId, $fileName, $destFileName) {
00091       return $this->uploadFile($fileName, $this->getSchedConfFilesPath($schedConfId) . '/' . $destFileName);
00092    }
00093 
00101    function writeSchedConfFile($schedConfId, $destFileName, &$contents) {
00102       return $this->writeFile($this->getSchedConfFilesPath($schedConfId) . '/' . $destFileName, $contents);
00103    }
00104 
00112    function copySchedConfFile($schedConfId, $sourceFile, $destFileName) {
00113       return $this->copyFile($sourceFile, $this->getSchedConfFilesPath($schedConfId) . '/' . $destFileName);
00114    }
00115 
00122    function removeSchedConfFile($schedConfId, $fileName) {
00123       return $this->deleteFile($this->getSchedConfFilesPath($schedConfId) . '/' . $fileName);
00124    }
00125 }
00126 
00127 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7