当前位置: 首页>>代码示例>>PHP>>正文


PHP PublicFileManager::rmtree方法代码示例

本文整理汇总了PHP中PublicFileManager::rmtree方法的典型用法代码示例。如果您正苦于以下问题:PHP PublicFileManager::rmtree方法的具体用法?PHP PublicFileManager::rmtree怎么用?PHP PublicFileManager::rmtree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PublicFileManager的用法示例。


在下文中一共展示了PublicFileManager::rmtree方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteSchedConf

 /**
  * Delete a scheduled conference.
  * @param $args array first parameter is the ID of the scheduled conference to delete
  */
 function deleteSchedConf($args)
 {
     $this->validate();
     $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
     if (isset($args) && !empty($args) && !empty($args[0])) {
         $schedConfId = $args[0];
         $schedConf =& $schedConfDao->getSchedConf($schedConfId);
         // Look up the scheduled conference path before we delete the scheduled conference.
         import('file.PublicFileManager');
         $publicFileManager = new PublicFileManager();
         $schedConfFilesPath = $publicFileManager->getSchedConfFilesPath($schedConfId);
         if ($schedConfDao->deleteSchedConfById($schedConfId)) {
             // Delete scheduled conference file tree
             // FIXME move this somewhere better.
             import('file.FileManager');
             $fileManager = new FileManager();
             $schedConfPath = Config::getVar('files', 'files_dir') . '/conferences/' . $schedConf->getConferenceId() . '/schedConfs/' . $schedConfId;
             $fileManager->rmtree($schedConfPath);
             $publicFileManager->rmtree($schedConfFilesPath);
         }
     }
     Request::redirect(null, null, null, 'schedConfs');
 }
开发者ID:jalperin,项目名称:ocs,代码行数:27,代码来源:ManagerSchedConfHandler.inc.php

示例2: deleteJournal

 /**
  * Delete a journal.
  * @param $args array first parameter is the ID of the journal to delete
  * @param $request object
  */
 function deleteJournal($args, &$request)
 {
     $this->validate();
     $journalDao =& DAORegistry::getDAO('JournalDAO');
     if (isset($args) && !empty($args) && !empty($args[0])) {
         $journalId = $args[0];
         if ($journalDao->deleteJournalById($journalId)) {
             // Delete journal file tree
             // FIXME move this somewhere better.
             import('lib.pkp.classes.file.FileManager');
             $fileManager = new FileManager();
             $journalPath = Config::getVar('files', 'files_dir') . '/journals/' . $journalId;
             $fileManager->rmtree($journalPath);
             import('classes.file.PublicFileManager');
             $publicFileManager = new PublicFileManager();
             $publicFileManager->rmtree($publicFileManager->getJournalFilesPath($journalId));
         }
     }
     $request->redirect(null, null, 'journals');
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:25,代码来源:AdminJournalHandler.inc.php

示例3: deleteConference

 /**
  * Delete a conference.
  * @param $args array first parameter is the ID of the conference to delete
  */
 function deleteConference($args, &$request)
 {
     $this->validate();
     $conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
     if (isset($args) && !empty($args) && !empty($args[0])) {
         $conferenceId = $args[0];
         if ($conferenceDao->deleteConferenceById($conferenceId)) {
             // Delete conference file tree
             // FIXME move this somewhere better.
             import('lib.pkp.classes.file.FileManager');
             $fileManager = new FileManager();
             $conferencePath = Config::getVar('files', 'files_dir') . '/conferences/' . $conferenceId;
             $fileManager->rmtree($conferencePath);
             import('classes.file.PublicFileManager');
             $publicFileManager = new PublicFileManager();
             $publicFileManager->rmtree($publicFileManager->getConferenceFilesPath($conferenceId));
         }
     }
     $request->redirect(null, null, null, 'conferences');
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:24,代码来源:AdminConferenceHandler.inc.php

示例4: deleteContext

 /**
  * Delete a journal.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function deleteContext($args, $request)
 {
     // Identify the journal Id.
     $journalId = $request->getUserVar('rowId');
     $journalDao = DAORegistry::getDAO('JournalDAO');
     $journal = $journalDao->getById($journalId);
     if ($journal) {
         $journalDao->deleteById($journalId);
         // Delete journal file tree
         // FIXME move this somewhere better.
         import('lib.pkp.classes.file.FileManager');
         $fileManager = new FileManager($journalId);
         $journalPath = Config::getVar('files', 'files_dir') . '/journals/' . $journalId;
         $fileManager->rmtree($journalPath);
         import('classes.file.PublicFileManager');
         $publicFileManager = new PublicFileManager();
         $publicFileManager->rmtree($publicFileManager->getJournalFilesPath($journalId));
         return DAO::getDataChangedEvent($journalId);
     }
     return new JSONMessage(false);
 }
开发者ID:mariojp,项目名称:ojs,代码行数:27,代码来源:JournalGridHandler.inc.php

示例5: deletePress

 /**
  * Delete a press.
  * @param $args array first parameter is the ID of the press to delete
  */
 function deletePress($args)
 {
     $this->validate();
     $pressDao =& DAORegistry::getDAO('PressDAO');
     if (isset($args) && !empty($args) && !empty($args[0])) {
         $pressId = $args[0];
         if ($pressDao->deletePressById($pressId)) {
             // Delete press file tree
             // FIXME move this somewhere better.
             import('lib.pkp.classes.file.FileManager');
             $fileManager = new FileManager();
             $pressPath = Config::getVar('files', 'files_dir') . '/presses/' . $pressId;
             $fileManager->rmtree($pressPath);
             import('classes.file.PublicFileManager');
             $publicFileManager = new PublicFileManager();
             $publicFileManager->rmtree($publicFileManager->getPressFilesPath($pressId));
         }
     }
     Request::redirect(null, null, 'presses');
 }
开发者ID:ramonsodoma,项目名称:omp,代码行数:24,代码来源:AdminPressHandler.inc.php

示例6: deleteContext

 /**
  * Delete a press.
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function deleteContext($args, $request)
 {
     // Identify the current context.
     $context = $request->getContext();
     // Identify the press Id.
     $pressId = $request->getUserVar('rowId');
     $pressDao = DAORegistry::getDAO('PressDAO');
     $press = $pressDao->getById($pressId);
     if ($pressId) {
         $pressDao->deleteById($pressId);
         // Add publication formats tombstones for all press published monographs.
         import('classes.publicationFormat.PublicationFormatTombstoneManager');
         $publicationFormatTombstoneMgr = new PublicationFormatTombstoneManager();
         $publicationFormatTombstoneMgr->insertTombstonesByPress($press);
         // Delete press file tree
         // FIXME move this somewhere better.
         import('lib.pkp.classes.file.ContextFileManager');
         $pressFileManager = new ContextFileManager($pressId);
         $pressFileManager->rmtree($pressFileManager->getBasePath());
         import('classes.file.PublicFileManager');
         $publicFileManager = new PublicFileManager();
         $publicFileManager->rmtree($publicFileManager->getPressFilesPath($pressId));
         // If user is deleting the same press where he is...
         if ($context && $context->getId() == $pressId) {
             // return a redirect js event to index handler.
             $dispatcher = $request->getDispatcher();
             $url = $dispatcher->url($request, ROUTE_PAGE, null, 'index');
             return $request->redirectUrlJson($url);
         }
         return DAO::getDataChangedEvent($pressId);
     }
     return new JSONMessage();
 }
开发者ID:josekarvalho,项目名称:omp,代码行数:39,代码来源:PressGridHandler.inc.php

示例7: deleteContext

 /**
  * Delete a conference.
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function deleteContext($args, &$request)
 {
     // Identify the current context.
     $context =& $request->getContext();
     // Identify the conference Id.
     $conferenceId = $request->getUserVar('rowId');
     $conferenceDao = DAORegistry::getDAO('ConferenceDAO');
     $conference =& $conferenceDao->getById($conferenceId);
     if ($conference) {
         $conferenceDao->deleteById($conferenceId);
         // Delete conference file tree
         // FIXME move this somewhere better.
         import('lib.pkp.classes.file.FileManager');
         $fileManager = new FileManager($conferenceId);
         $conferencePath = Config::getVar('files', 'files_dir') . '/conferences/' . $conferenceId;
         $fileManager->rmtree($conferencePath);
         import('classes.file.PublicFileManager');
         $publicFileManager = new PublicFileManager();
         $publicFileManager->rmtree($publicFileManager->getConferenceFilesPath($conferenceId));
         return DAO::getDataChangedEvent($conferenceId);
     }
     $json = new JSONMessage(false);
     return $json->getString();
 }
开发者ID:artkuo,项目名称:ocs,代码行数:30,代码来源:ConferenceGridHandler.inc.php


注:本文中的PublicFileManager::rmtree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。