Beispiel #1
0
 /**
  * Restore from file, using _GET request. 
  * 
  * @todo Verify this is working and that it's secure. Can we do this using session variables instead? 
  */
 public function showContinueRestore()
 {
     if (!Curry_URL::validate()) {
         throw new Exception('Invalid hash');
     }
     Curry_Backend_DatabaseHelper::restoreFromFile($_GET['file'], $_GET['tables'], $_GET['max_execution_time'], $_GET['line'], $this);
 }
Beispiel #2
0
 /**
  * Rebuild search index using a single request.
  *
  * @throws Exception
  */
 public function showRebuildAll()
 {
     if (Curry_URL::validate()) {
         // Override and increase max execution time if set
         $timeLimit = ini_get('max_execution_time');
         if ($timeLimit && $timeLimit < 250) {
             @set_time_limit(250);
         }
         Curry_Backend_Indexer::initRebuild();
         Curry_Backend_Indexer::doRebuild();
         $ses = new Zend_Session_Namespace(__CLASS__);
         if ($ses->failed) {
             $this->addMessage($ses->failed . ' entries failed indexing.', self::MSG_WARNING);
         }
         $this->addMainMenu();
         $this->addMessage('Search index rebuilt, ' . $ses->success . ' entries updated successfully.', self::MSG_SUCCESS);
     } else {
         throw new Exception('Invalid rebuild link!');
     }
 }