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


PHP Vtiger_Package::update方法代码示例

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


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

示例1: updateUserModuleStep3

 public function updateUserModuleStep3(Vtiger_Request $request)
 {
     $importModuleName = $request->get('module_import_name');
     $uploadFile = $request->get('module_import_file');
     $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
     $uploadFileName = "{$uploadDir}/{$uploadFile}";
     checkFileAccess($uploadFileName);
     $importType = $request->get('module_import_type');
     if (strtolower($importType) == 'language') {
         $package = new Vtiger_Language();
     } else {
         $package = new Vtiger_Package();
     }
     if (strtolower($importType) == 'language') {
         $package->import($uploadFileName);
     } else {
         $package->update(Vtiger_Module::getInstance($importModuleName), $uploadFileName);
     }
     checkFileAccessForDeletion($uploadFileName);
     unlink($uploadFileName);
     $result = array('success' => true, 'importModuleName' => $importModuleName);
     $response = new Vtiger_Response();
     $response->setResult($result);
     $response->emit();
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:25,代码来源:Basic.php

示例2: updateVtlibModule

function updateVtlibModule($module, $packagepath)
{
    global $log, $_installOrUpdateVtlibModule;
    if (!file_exists($packagepath)) {
        return;
    }
    if (isset($_installOrUpdateVtlibModule[$module . $packagepath])) {
        return;
    }
    $_installOrUpdateVtlibModule[$module . $packagepath] = 'update';
    require_once 'vtlib/Vtiger/Package.php';
    require_once 'vtlib/Vtiger/Module.php';
    $Vtiger_Utils_Log = defined('INSTALLATION_MODE_DEBUG') ? INSTALLATION_MODE_DEBUG : true;
    $package = new Vtiger_Package();
    if ($package->isLanguageType($packagepath)) {
        require_once 'vtlib/Vtiger/Language.php';
        $languagePack = new Vtiger_Language();
        $languagePack->update(null, $packagepath, true);
        return;
    }
    if ($module == null) {
        $log->fatal("Module name is invalid");
    } else {
        $moduleInstance = Vtiger_Module::getInstance($module);
        if ($moduleInstance || $package->isModuleBundle($packagepath)) {
            $log->debug("{$module} - Module instance found - Update starts here");
            $package->update($moduleInstance, $packagepath);
        } else {
            $log->fatal("{$module} doesn't exists!");
        }
    }
}
开发者ID:yunter,项目名称:crm,代码行数:32,代码来源:utils.php

示例3: updateVtlibModule

function updateVtlibModule($module, $packagepath)
{
    global $log;
    require_once 'vtlib/Vtiger/Package.php';
    require_once 'vtlib/Vtiger/Module.php';
    $Vtiger_Utils_Log = true;
    $package = new Vtiger_Package();
    if ($package->isLanguageType($packagepath)) {
        require_once 'vtlib/Vtiger/Language.php';
        $languagePack = new Vtiger_Language();
        $languagePack->update(null, $packagepath, true);
        return;
    }
    if ($module == null) {
        $log->fatal("Module name is invalid");
    } else {
        $moduleInstance = Vtiger_Module::getInstance($module);
        if ($moduleInstance || $package->isModuleBundle($packagepath)) {
            $log->debug("{$module} - Module instance found - Update starts here");
            $package->update($moduleInstance, $packagepath);
        } else {
            $log->fatal("{$module} doesn't exists!");
        }
    }
}
开发者ID:jgjermeni,项目名称:corebos,代码行数:25,代码来源:utils.php

示例4: updateUserModuleStep3

 public function updateUserModuleStep3(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $qualifiedModuleName = $request->getModule(false);
     $importModuleName = $request->get('module_import_name');
     $uploadFile = $request->get('module_import_file');
     $uploadDir = Settings_ModuleManager_Extension_Model::getUploadDirectory();
     $uploadFileName = "{$uploadDir}/{$uploadFile}";
     checkFileAccess($uploadFileName);
     $importType = $request->get('module_import_type');
     if (strtolower($importType) == 'language') {
         $package = new Vtiger_Language();
     } else {
         $package = new Vtiger_Package();
     }
     if (strtolower($importType) == 'language') {
         $package->import($uploadFileName);
     } else {
         $package->update(Vtiger_Module::getInstance($importModuleName), $uploadFileName);
     }
     checkFileAccessForDeletion($uploadFileName);
     unlink($uploadFileName);
     $viewer->assign("UPDATE_MODULE_NAME", $importModuleName);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->view('UpdateUserModuleStep3.tpl', $qualifiedModuleName);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:26,代码来源:ModuleImport.php

示例5: installCurrentVersion

 public function installCurrentVersion()
 {
     $this->connect();
     $updateURL = $this->getUpdateUrl();
     $filename = sys_get_temp_dir() . "/autoupdater." . md5($updateURL) . ".zip";
     global $root_directory;
     if (!is_writeable(sys_get_temp_dir()) && is_writeable($root_directory . "/test/")) {
         $filename = $root_directory . "/test/autoupdater.zip";
     }
     if (!is_writeable(sys_get_temp_dir()) && !is_writeable($root_directory . "/test/")) {
         echo "<strong style='color:red;'>ERROR</strong> - You need to make the <b>test</b> directory inside vtiger root writable for webserver user!";
         return;
     }
     $data = $this->_client->call("downloadVersion", array(base64_encode($updateURL), sha1(base64_encode($updateURL) . "ASD,.2#*")));
     if (!empty($_REQUEST["stefanDebug"])) {
         /* ONLY DEBUG*/
         echo "<pre>";
         var_dump($this->_client->debug_str);
     }
     $data = base64_decode($data);
     file_put_contents($filename, $data);
     $package = new \Vtiger_Package();
     $package->update(\Vtiger_Module::getInstance($this->_extension), $filename);
 }
开发者ID:Neodracir,项目名称:VtigerCRM-Tools,代码行数:24,代码来源:AutoUpdate.php

示例6: handle

	public function handle() {
		if ($this->interactive) {
			echo "------------------------------------ >>> UPDATE MODULE <<< ---\n";
			do {
				$path = $this->prompt("Enter package path: ", self::PROMPT_PATH);
				if (file_exists($path)) {
					break;
				}
				echo "ERROR: " . $path . " - file not found, try another.\n";
			} while (true);
		} else {
			$path = array_shift($this->arguments);
		}
		
		if (file_exists($path)) {
			$package = new Vtiger_Package();
			$module  = $package->getModuleNameFromZip($path);
			
			$moduleInstance = Vtiger_Module::getInstance($module);
			if (!$moduleInstance) {
				echo "ERROR: Module $module not found!\n";
			} else {
				echo "Updating ...";
				$package->update($moduleInstance, $path);
				echo "DONE.\n";
			}			
			
		} else {
			throw new Exception("Package file $path not found.");
		}
		
		echo "----------------------------------\n\n";
	}
开发者ID:Wasage,项目名称:werpa,代码行数:33,代码来源:console.php


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