コード例 #1
0
ファイル: Import.php プロジェクト: rcrrich/UpdatePackages
 function importBasicStep(Vtiger_Request $request)
 {
     global $upload_maxsize;
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $moduleMeta = $moduleModel->getModuleMeta();
     $viewer->assign('FOR_MODULE', $moduleName);
     $viewer->assign('MODULE', 'Import');
     $viewer->assign('SUPPORTED_FILE_TYPES', Import_Utils_Helper::getSupportedFileExtensions());
     $viewer->assign('SUPPORTED_FILE_ENCODING', Import_Utils_Helper::getSupportedFileEncoding());
     $viewer->assign('SUPPORTED_DELIMITERS', Import_Utils_Helper::getSupportedDelimiters());
     $viewer->assign('AUTO_MERGE_TYPES', Import_Utils_Helper::getAutoMergeTypes());
     //Duplicate records handling not supported for inventory moduels
     $duplicateHandlingNotSupportedModules = getInventoryModules();
     if (in_array($moduleName, $duplicateHandlingNotSupportedModules)) {
         $viewer->assign('DUPLICATE_HANDLING_NOT_SUPPORTED', true);
     }
     //End
     $viewer->assign('AVAILABLE_FIELDS', $moduleMeta->getMergableFields());
     $viewer->assign('ENTITY_FIELDS', $moduleMeta->getEntityFields());
     $viewer->assign('ERROR_MESSAGE', $request->get('error_message'));
     $viewer->assign('IMPORT_UPLOAD_SIZE', $upload_maxsize);
     $viewer->assign('IMPORT_UPLOAD_SIZE_MB', round($upload_maxsize / 1024 / 1024, 2));
     return $viewer->view('ImportBasicStep.tpl', 'Import');
 }
コード例 #2
0
ファイル: Import.php プロジェクト: noclav/UpdatePackages
 /**
  * Function to show import UI in Calendar Module
  * @param Vtiger_Request $request
  */
 public function import(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('SUPPORTED_FILE_TYPES', Import_Utils_Helper::getSupportedFileExtensions($moduleName));
     $viewer->assign('SUPPORTED_FILE_TYPES_TEXT', Import_Utils_Helper::getSupportedFileExtensionsDescription($moduleName));
     $viewer->view('Import.tpl', $moduleName);
 }