当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Package::getDependentVtigerVersion方法代码示例

本文整理汇总了PHP中Vtiger_Package::getDependentVtigerVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Package::getDependentVtigerVersion方法的具体用法?PHP Vtiger_Package::getDependentVtigerVersion怎么用?PHP Vtiger_Package::getDependentVtigerVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Package的用法示例。


在下文中一共展示了Vtiger_Package::getDependentVtigerVersion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: importUserModuleStep2

 public function importUserModuleStep2(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
     $qualifiedModuleName = $request->getModule(false);
     $uploadFile = 'usermodule_' . time() . '.zip';
     $uploadFileName = "{$uploadDir}/{$uploadFile}";
     $error = '';
     checkFileAccess($uploadDir);
     if (!move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {
         $error = 'LBL_ERROR_MOVE_UPLOADED_FILE';
     } else {
         $package = new Vtiger_Package();
         $importModuleName = $package->getModuleNameFromZip($uploadFileName);
         $importModuleDepVtVersion = $package->getDependentVtigerVersion();
         if ($importModuleName == null) {
             $error = $package->_errorText;
             checkFileAccessForDeletion($uploadFileName);
             unlink($uploadFileName);
         } else {
             // We need these information to push for Update if module is detected to be present.
             $moduleLicence = vtlib_purify($package->getLicense());
             $viewer->assign('MODULEIMPORT_FILE', $uploadFile);
             $viewer->assign('MODULEIMPORT_TYPE', $package->type());
             $viewer->assign('MODULEIMPORT_NAME', $importModuleName);
             $viewer->assign('MODULEIMPORT_PACKAGE', $package);
             $viewer->assign('MODULEIMPORT_DEP_VTVERSION', $importModuleDepVtVersion);
             $viewer->assign('MODULEIMPORT_LICENSE', $moduleLicence);
             $viewer->assign('MODULEIMPORT_PARAMETERS', $package->getParameters());
             if (!$package->isLanguageType() && !$package->isUpdateType() && !$package->isModuleBundle()) {
                 $moduleInstance = Vtiger_Module::getInstance($importModuleName);
                 $moduleimport_exists = $moduleInstance ? "true" : "false";
                 $moduleimport_dir_name = "modules/{$importModuleName}";
                 $moduleimport_dir_exists = is_dir($moduleimport_dir_name) ? "true" : "false";
                 $viewer->assign('MODULEIMPORT_EXISTS', $moduleimport_exists);
                 $viewer->assign('MODULEIMPORT_DIR', $moduleimport_dir_name);
                 $viewer->assign('MODULEIMPORT_DIR_EXISTS', $moduleimport_dir_exists);
             }
         }
     }
     $viewer->assign('MODULEIMPORT_ERROR', $error);
     $viewer->view('ImportUserModuleStep2.tpl', $qualifiedModuleName);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:43,代码来源:ModuleImport.php

示例2: checkFileAccess

        $package = new Vtiger_Package();
        $moduleimport_name = $package->getModuleNameFromZip($uploadfilename);
        if ($moduleimport_name == null) {
            $smarty->assign("MODULEIMPORT_FAILED", "true");
            $smarty->assign("MODULEIMPORT_FILE_INVALID", "true");
        } else {
            if (!$package->isLanguageType()) {
                $moduleInstance = Vtiger_Module::getInstance($moduleimport_name);
                $moduleimport_exists = $moduleInstance ? "true" : "false";
                $moduleimport_dir_name = "modules/{$moduleimport_name}";
                $moduleimport_dir_exists = is_dir($moduleimport_dir_name) ? "true" : "false";
                $smarty->assign("MODULEIMPORT_EXISTS", $moduleimport_exists);
                $smarty->assign("MODULEIMPORT_DIR", $moduleimport_dir_name);
                $smarty->assign("MODULEIMPORT_DIR_EXISTS", $moduleimport_dir_exists);
            }
            $moduleimport_dep_vtversion = $package->getDependentVtigerVersion();
            $moduleimport_license = $package->getLicense();
            $smarty->assign("MODULEIMPORT_FILE", $uploadfile);
            $smarty->assign("MODULEIMPORT_TYPE", $package->type());
            $smarty->assign("MODULEIMPORT_NAME", $moduleimport_name);
            $smarty->assign("MODULEIMPORT_DEP_VTVERSION", $moduleimport_dep_vtversion);
            $smarty->assign("MODULEIMPORT_LICENSE", $moduleimport_license);
        }
    }
} else {
    if ($module_import_step == 'Step3') {
        $uploadfile = $_REQUEST['module_import_file'];
        $uploadfilename = "{$modulemanager_uploaddir}/{$uploadfile}";
        checkFileAccess($uploadfilename);
        //$overwritedir = ($_REQUEST['module_dir_overwrite'] == 'true')? true : false;
        $overwritedir = false;
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:Import.php

示例3:

 $za->close();
 $package = new Vtiger_Package();
 $moduleupdate_name = $package->getModuleNameFromZip($uploadfilename);
 if ($moduleupdate_name == null) {
     $smarty->assign("MODULEUPDATE_FAILED", "true");
     $smarty->assign("MODULEUPDATE_FILE_INVALID", "true");
 } else {
     if (!$package->isLanguageType() && $moduleupdate_name != $target_modulename) {
         $smarty->assign("MODULEUPDATE_FAILED", "true");
         $smarty->assign("MODULEUPDATE_NAME_MISMATCH", "true");
     } else {
         if ($package->isLanguageType() && trim($package->xpath_value('prefix')) != $target_modulename) {
             $smarty->assign("MODULEUPDATE_FAILED", "true");
             $smarty->assign("MODULEUPDATE_NAME_MISMATCH", "true");
         } else {
             $moduleupdate_dep_vtversion = $package->getDependentVtigerVersion();
             $moduleupdate_license = $package->getLicense();
             $moduleupdate_version = $package->getVersion();
             if (!$package->isLanguageType()) {
                 $moduleInstance = Vtiger_Module::getInstance($moduleupdate_name);
                 $moduleupdate_exists = $moduleInstance ? "true" : "false";
                 $moduleupdate_dir_name = "modules/{$moduleupdate_name}";
                 $moduleupdate_dir_exists = is_dir($moduleupdate_dir_name) ? "true" : "false";
                 $smarty->assign("MODULEUPDATE_CUR_VERSION", $moduleInstance ? $moduleInstance->version : '');
                 $smarty->assign("MODULEUPDATE_NOT_EXISTS", !$moduleupdate_exists);
                 $smarty->assign("MODULEUPDATE_DIR", $moduleupdate_dir_name);
                 $smarty->assign("MODULEUPDATE_DIR_NOT_EXISTS", !$moduleupdate_dir_exists);
                 // If version is matching, dis-allow migration
                 if (version_compare($moduleupdate_version, $moduleInstance->version, '=')) {
                     $smarty->assign("MODULEUPDATE_FAILED", "true");
                     $smarty->assign("MODULEUPDATE_SAME_VERSION", "true");
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:Update.php


注:本文中的Vtiger_Package::getDependentVtigerVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。