コード例 #1
0
ファイル: log.php プロジェクト: phpsource/CrowdFunding
 /**
  * This method deletes the data from a log file.
  *
  * @param string $file Filename
  *
  * @return boolean True on success, false on failure.
  */
 public function deleteFile($file)
 {
     $files = new CrowdFundingLogFiles($this->includeFiles);
     $files->load();
     foreach ($files as $sourceFile) {
         $sourceFile = JPath::clean($sourceFile);
         if (strcmp($sourceFile, $file) == 0) {
             if (JFile::delete($sourceFile)) {
                 return true;
             }
         }
     }
     return false;
 }
コード例 #2
0
ファイル: view.html.php プロジェクト: phpsource/CrowdFunding
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Get log files and count them.
     jimport("crowdfunding.log.files");
     $logFiles = new CrowdFundingLogFiles($this->includeFiles);
     $logFiles->load();
     $this->numberLogFilse = count($logFiles);
     // Add submenu
     CrowdFundingHelper::addSubmenu($this->getName());
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }