本文整理汇总了PHP中set_upgrade_progress函数的典型用法代码示例。如果您正苦于以下问题:PHP set_upgrade_progress函数的具体用法?PHP set_upgrade_progress怎么用?PHP set_upgrade_progress使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_upgrade_progress函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: upgrade_custom_relationships
upgrade_custom_relationships();
require_once 'modules/UpgradeWizard/uw_utils.php';
/*
if($_SESSION['current_db_version'] < '620')
{
upgradeDateTimeFields($path);
upgradeDocumentTypeFields($path);
}
*/
//Update the license
logThis('Start Updating the license ', $path);
ob_start();
check_now(get_sugarbeat());
ob_end_clean();
logThis('End Updating the license ', $path);
set_upgrade_progress('end', 'done');
logThis('Cleaning up the session. Goodbye.');
unlinkUWTempFiles();
logThis('Cleaning up the session. Goodbye.');
resetUwSession();
// flag to say upgrade has completed
$_SESSION['upgrade_complete'] = true;
//Clear any third party caches
sugar_cache_reset_full();
//add the clean vardefs here
if (!class_exists('VardefManager')) {
}
VardefManager::clearVardef();
require_once 'include/TemplateHandler/TemplateHandler.php';
TemplateHandler::clearAll();
//also add the cache cleaning here.
示例2: logThis
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
********************************************************************************/
/*********************************************************************************
* Description:
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
* Reserved. Contributor(s): ______________________________________..
* *******************************************************************************/
logThis('-----------------------------------------------------------------------------');
logThis('Upgrade started. At start.php');
//set the upgrade progress status.
set_upgrade_progress('start', 'in_progress');
unlinkUWTempFiles();
resetUwSession();
if (isset($_REQUEST['showUpdateWizardMessage']) && $_REQUEST['showUpdateWizardMessage'] == true) {
// set a flag to skip the upload screen
$_SESSION['skip_zip_upload'] = true;
$newUWMsg = <<<eoq
\t<table cellspacing="0" cellpadding="3" border="0">
\t\t<tr>
\t\t\t<th>
\t\t\t\t{$mod_strings['LBL_UW_START_UPGRADED_UW_TITLE']}
\t\t\t</th>
\t\t</tr>
\t\t<tr>
\t\t\t<td>
\t\t\t\t{$mod_strings['LBL_UW_START_UPGRADED_UW_DESC']}
示例3: logThis
logThis('End upgrade_connectors', $path);
//Unlink files that have been removed
if (function_exists('unlinkUpgradeFiles')) {
unlinkUpgradeFiles($sugar_version);
}
if (function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) {
rebuildSprites(true);
}
//Run repairUpgradeHistoryTable
if (version_compare($sugar_version, '6.5.0', '<') && function_exists('repairUpgradeHistoryTable')) {
repairUpgradeHistoryTable();
}
///////////////////////////////////////////////////////////////////////////////
//// TAKE OUT TRASH
if (empty($errors)) {
set_upgrade_progress('end', 'in_progress', 'unlinkingfiles', 'in_progress');
logThis('Taking out the trash, unlinking temp files.', $path);
unlinkUWTempFiles();
removeSilentUpgradeVarsCache();
logThis('Taking out the trash, done.', $path);
}
///////////////////////////////////////////////////////////////////////////////
//// RECORD ERRORS
$phpErrors = ob_get_contents();
ob_end_clean();
logThis("**** Potential PHP generated error messages: {$phpErrors}", $path);
if (count($errors) > 0) {
foreach ($errors as $error) {
logThis("****** SilentUpgrade ERROR: {$error}", $path);
}
echo "FAILED\n";
示例4: ob_end_clean
}
}
//logThis('Checking for leads_assigned_user relationship and if not found then create.', $path);
@createMissingRels();
//logThis('Checked for leads_assigned_user relationship.', $path);
ob_end_clean();
//// run fix on dropdown lists that may have been incorrectly named
//fix_dropdown_list();
}
set_upgrade_progress('end', 'in_progress', 'end', 'in_progress');
/////////////////////////Old Logger settings///////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
if (function_exists('deleteCache')) {
set_upgrade_progress('end', 'in_progress', 'deleteCache', 'in_progress');
@deleteCache();
set_upgrade_progress('end', 'in_progress', 'deleteCache', 'done');
}
///////////////////////////////////////////////////////////////////////////////
//// HANDLE REMINDERS
if (empty($errors)) {
commitHandleReminders($skippedFiles, $path);
}
if (file_exists(clean_path(getcwd()) . '/original451files')) {
rmdir_recursive(clean_path(getcwd()) . '/original451files');
}
require_once 'modules/Administration/Administration.php';
$admin = new Administration();
$admin->saveSetting('system', 'adminwizard', 1);
if ($ce_to_pro_ent) {
//check to see if there are any new files that need to be added to systems tab
//retrieve old modules list
示例5: checkSchemaDropStatus
function checkSchemaDropStatus() {
\tif(document.getElementById('select_schema_drop') != null){
\t\tvar schemaSelect = document.getElementById('select_schema_drop');
\t\tvar schemaDropMethod = document.getElementById('schema_drop');
\t\tif(schemaSelect.options[schemaSelect.selectedIndex].value == 'manual') {
\t\t\tschemaDropMethod.value = 'manual';
\t\t} else {
\t\t\tschemaDropMethod.value = 'sugar';
\t\t}
}
}
checkSchemaDropStatus();
</script>
eoq;
//set the upgrade progress status.
set_upgrade_progress('commit', 'done', 'commit', 'done');
$showBack = false;
$showCancel = false;
$showRecheck = false;
$showNext = $stop ? false : true;
$GLOBALS['top_message'] = "<b>{$mod_strings['LBL_UW_COMMIT_DESC']}</b>";
$stepBack = $_REQUEST['step'] - 1;
//Skip ahead to the end page as no layouts need to be merged.
$skipLayouts = true;
foreach ($_SESSION['sugarMergeRunResults'] as $mergeModule => $mergeModuleFileList) {
if (!empty($mergeModuleFileList)) {
$skipLayouts = false;
}
}
$stepNext = $skipLayouts ? $_REQUEST['step'] + 2 : $_REQUEST['step'] + 1;
$stepCancel = -1;
示例6: getValidPatchName
//// END UPLOAD FILE PROCESSING FORM
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//// READY TO INSTALL UPGRADES
$validReturn = getValidPatchName();
$ready = $validReturn['ready'];
$disabled = $validReturn['disabled'];
//// END READY TO INSTALL UPGRADES
///////////////////////////////////////////////////////////////////////////////
if (isset($_SESSION['install_file']) && !empty($_SESSION['install_file']) && is_file($_SESSION['install_file'])) {
$stop = false;
} else {
$stop = true;
}
if ($stop == false) {
set_upgrade_progress('upload', 'done');
}
$frozen = $out;
if (!$stop) {
if (!empty($GLOBALS['top_message'])) {
$GLOBALS['top_message'] .= "<br />";
} else {
$GLOBALS['top_message'] = '';
}
$GLOBALS['top_message'] .= "<b>{$mod_strings['LBL_UPLOAD_SUCCESS']}</b>";
} else {
if (!$frozen) {
$GLOBALS['top_message'] .= "<br />";
} else {
$GLOBALS['top_message'] = "<b>{$frozen}</b>";
}
示例7: set_upgrade_progress
eoq;
$form5 = <<<eoq5
<br>
<div id="upgradeDiv" style="display:none">
<table cellspacing="0" cellpadding="0" border="0">
<tr><td>
<p><img src='modules/UpgradeWizard/processing.gif'></p>
</td></tr>
</table>
</div>
eoq5;
$uwMain = $final . $form5;
//set the upgrade progress status.
set_upgrade_progress('preflight', 'done');
} else {
$stop = true;
if (empty($mod_strings['LBL_INCOMPATIBLE_PHP_VERSION'])) {
$mod_strings['LBL_INCOMPATIBLE_PHP_VERSION'] = 'Php version 5.2.1 or above is required.';
}
$php_verison_warning = <<<eoq
\t<table cellpadding="3" cellspacing="0" border="0">
\t\t<tr>
\t\t\t<th colspan="2" align="left">
\t\t\t\t<span class='error'><b>{$mod_strings['LBL_INCOMPATIBLE_PHP_VERSION']}</b></span>
\t\t\t</th>
\t\t</tr>
\t</table>
eoq;
$php_warnings = $php_verison_warning;
示例8: Configurator
$Configurator = new Configurator();
if (class_exists('Configurator')) {
$Configurator->parseLoggerSettings();
}
set_upgrade_progress('configurator', 'done');
}
//unset the logger previously instantiated
if (file_exists($newtemplate_path . '/include/SugarLogger/LoggerManager.php')) {
set_upgrade_progress('logger', 'in_progress');
if (!class_exists('LoggerManager')) {
}
if (class_exists('LoggerManager')) {
unset($GLOBALS['log']);
$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
}
set_upgrade_progress('logger', 'done');
}
///////////////////////////////////////////////////////////////////////////////
//// RECORD ERRORS
$phpErrors = ob_get_contents();
ob_end_clean();
if (count($errors) > 0) {
foreach ($errors as $error) {
logThis("****** SilentUpgrade ERROR: {$error}", $path);
}
echo "FAILED\n";
} else {
logThis("***** SilentUpgrade completed successfully.", $path);
echo "********************************************************************\n";
echo "*************************** SUCCESS*********************************\n";
echo "********************************************************************\n";
示例9: formatLayoutMergeDataForDisplay
$stepNext = $_REQUEST['step'];
$showCheckBoxes = TRUE;
$GLOBALS['top_message'] = "<b>{$mod_strings['LBL_LAYOUT_MERGE_TITLE']}</b>";
}
$smarty->assign("APP", $app_strings);
$smarty->assign("APP_LIST", $app_list_strings);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("showCheckboxes", $showCheckBoxes);
$layoutMergeData = formatLayoutMergeDataForDisplay($layoutMergeData);
$smarty->assign("METADATA_DATA", $layoutMergeData);
$uwMain = $smarty->fetch('modules/UpgradeWizard/tpls/layoutsMerge.tpl');
$showBack = FALSE;
$showCancel = FALSE;
$showRecheck = FALSE;
$showNext = TRUE;
set_upgrade_progress('layouts', 'done');
/**
* Clean the merge data results, removing any emptys or blanks that should not be displayed
* to the user on the confirm layout screen.
*
* @param array $data
* @return array
*/
function cleanMergeData($data)
{
$results = array();
foreach ($data as $m => $layouts) {
if (count($layouts) > 0) {
$results[$m] = $layouts;
}
}