Ejemplo n.º 1
0
 public function triggerImport($batchImport = false)
 {
     $importInfo = Import_Queue_Action::getImportInfo($this->request->get('module'), $this->user);
     $importDataController = new Import_Data_Action($importInfo, $this->user);
     if (!$batchImport) {
         if (!$importDataController->initializeImport()) {
             Import_Utils_Helper::showErrorPage(vtranslate('ERR_FAILED_TO_LOCK_MODULE', 'Import'));
             exit;
         }
     }
     $importDataController->importData();
     Import_Queue_Action::updateStatus($importInfo['id'], Import_Queue_Action::$IMPORT_STATUS_HALTED);
     $importInfo = Import_Queue_Action::getImportInfo($this->request->get('module'), $this->user);
     self::showImportStatus($importInfo, $this->user);
 }