本文整理汇总了PHP中Vtiger_Package::initUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Package::initUpdate方法的具体用法?PHP Vtiger_Package::initUpdate怎么用?PHP Vtiger_Package::initUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Package
的用法示例。
在下文中一共展示了Vtiger_Package::initUpdate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initUpdateVtlibModule
function initUpdateVtlibModule($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 ($module == null) {
$log->fatal("Module name is invalid");
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
if ($moduleInstance) {
$log->debug("{$module} - Module instance found - Init Update starts here");
$package->initUpdate($moduleInstance, $packagepath, true);
} else {
$log->fatal("{$module} doesn't exists!");
}
}
}
示例2: WHERE
*********************************************************************************/
//5.1.0 RC to 5.1.0 database changes
//we have to use the current object (stored in PatchApply.php) to execute the queries
$adb = $_SESSION['adodb_current_object'];
$conn = $_SESSION['adodb_current_object'];
$migrationlog->debug("\n\nDB Changes from 5.1.0 RC to 5.1.0 -------- Starts \n\n");
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$package = new Vtiger_Package();
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE vtiger_cvcolumnlist.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE (vtiger_cvcolumnlist.columnname LIKE '%parent_id%' OR vtiger_cvcolumnlist.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='Documents'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE vtiger_cvadvfilter.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE (vtiger_cvadvfilter.columnname LIKE '%parent_id%' OR vtiger_cvadvfilter.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='Documents'");
// Update PBXManager module files
$moduleInstance = Vtiger_Module::getInstance('PBXManager');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/PBXManager.zip', true);
// Update ServiceContracts module files
$moduleInstance = Vtiger_Module::getInstance('ServiceContracts');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/ServiceContracts.zip', true);
// Update Services module files
$moduleInstance = Vtiger_Module::getInstance('Services');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/Services.zip', true);
// Install/Update Optional modules
require_once 'include/utils/installVtlibSelectedModules.php';
// Fixed issue with Calendar duration calculation
ExecuteQuery("ALTER TABLE vtiger_activity MODIFY duration_hours VARCHAR(200)");
$result = $adb->query("SELECT activityid,date_start,due_date, time_start,time_end FROM vtiger_activity WHERE activitytype NOT IN ('Task','Emails')");
$noofrows = $adb->num_rows($result);
for ($index = 0; $index < $noofrows; $index++) {
$activityid = $adb->query_result($result, $index, 'activityid');
$date_start = $adb->query_result($result, $index, 'date_start');