コード例 #1
0
 /**
  * Is doing all migrator steps in one row
  *
  * @author Max Milbers
  */
 function migrateAllInOne()
 {
     $this->checkPermissionForTools();
     if (!VmConfig::get('dangeroustools', true)) {
         $msg = $this->_getMsgDangerousTools();
         $this->setRedirect($this->redirectPath, $msg);
         return false;
     }
     $this->storeMigrationOptionsInSession();
     if (!class_exists('Migrator')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'migrator.php';
     }
     $migrator = new Migrator();
     $result = $migrator->migrateAllInOne();
     if ($result) {
         $msg = 'Migration finished';
     } else {
         $msg = 'Migration was interrupted by max_execution time, please restart';
     }
     $this->setRedirect($this->redirectPath, $msg);
 }
コード例 #2
0
 /**
  * Is doing all migrator steps in one row
  *
  * @author Max Milbers
  */
 function migrateAllInOne()
 {
     JRequest::checkToken() or jexit('Invalid Token, in ' . JRequest::getWord('task'));
     $this->checkPermissionForTools();
     if (!VmConfig::get('dangeroustools', true)) {
         $msg = $this->_getMsgDangerousTools();
         $this->setRedirect($this->redirectPath, $msg);
         return false;
     }
     $this->storeMigrationOptionsInSession();
     if (!class_exists('Migrator')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'migrator.php';
     }
     $migrator = new Migrator();
     $result = $migrator->migrateAllInOne();
     $msg = 'Migration finished';
     $this->setRedirect($this->redirectPath, $msg);
 }