Ejemplo n.º 1
0
 function portVmRelatedProducts()
 {
     $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->portVm1RelatedProducts();
     if ($result) {
         $msg = 'Migration Vm2 related products finished';
     } else {
         $msg = 'Migration was interrupted by max_execution time, please restart';
     }
     $this->setRedirect($this->redirectPath, $msg);
 }
Ejemplo n.º 2
0
 function portVmRelatedProducts()
 {
     $data = JRequest::get('get');
     if (!empty($data['token'])) {
         JRequest::setVar($data['token'], '1', 'post');
     }
     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->portVm1RelatedProducts();
     if ($result) {
         $msg = 'Migration Vm2 related products finished';
     } else {
         $msg = 'Migration was interrupted by max_execution time, please restart';
     }
     $this->setRedirect($this->redirectPath, $msg);
 }