Пример #1
0
 /**
  * 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 Crowdfunding\Log\Files($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
 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.
     $logFiles = new Crowdfunding\Log\Files($this->includeFiles);
     $logFiles->load();
     $this->numberLogFilse = count($logFiles);
     // Prepare sorting data
     $this->prepareSorting();
     // Prepare actions
     $this->addToolbar();
     $this->addSidebar();
     $this->setDocument();
     parent::display($tpl);
 }