本文整理汇总了PHP中UpgradeHistory::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP UpgradeHistory::getAll方法的具体用法?PHP UpgradeHistory::getAll怎么用?PHP UpgradeHistory::getAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UpgradeHistory
的用法示例。
在下文中一共展示了UpgradeHistory::getAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
global $sugar_flavor;
global $current_user;
$mod_strings = return_module_language($GLOBALS['current_language'], 'Home');
$this->ss->assign('mod', $mod_strings);
$this->ss->assign("sugarFlavor", $sugar_flavor);
//check the upgrade history to see if this instance has been upgraded, if so then present the calendar url message
//if no upgrade history exists then we can assume this is an install and we do not show the calendar message
$uh = new UpgradeHistory();
$upgrade = count($uh->getAll()) > 0 ? true : false;
if ($upgrade) {
//create the url with the user id and scrolltocal flag. This will be passed into language string
$urlForString = $mod_strings['LBL_TOUR_CALENDAR_URL_1'];
$urlForString .= '<br><a href="index.php?module=Users&action=EditView&record=' . $current_user->id . '&scrollToCal=true" target="_blank">';
$urlForString .= $mod_strings['LBL_TOUR_CALENDAR_URL_2'] . '</a>';
$this->ss->assign('view_calendar_url', $urlForString);
}
$this->ss->display('modules/Home/tour.tpl');
}
示例2: buildInstallGrid
function buildInstallGrid($view)
{
$uh = new UpgradeHistory();
$installeds = $uh->getAll();
$upgrades_installed = 0;
$installed_objects = array();
foreach ($installeds as $installed) {
$filename = from_html($installed->filename);
$date_entered = $installed->date_entered;
$type = $installed->type;
$version = $installed->version;
$upgrades_installed++;
$link = "";
switch ($type) {
case "theme":
case "langpack":
case "module":
case "patch":
$manifest_file = extractManifest($filename);
require_once $manifest_file;
$name = empty($manifest['name']) ? $filename : $manifest['name'];
$description = empty($manifest['description']) ? $mod_strings['LBL_UW_NONE'] : $manifest['description'];
if (($upgrades_installed == 0 || $uh->UninstallAvailable($installeds, $installed)) && is_file($filename) && !empty($manifest['is_uninstallable'])) {
$link = urlencode($filename);
} else {
$link = 'false';
}
break;
default:
break;
}
if ($view == 'default' && $type != 'patch') {
continue;
}
if ($view == 'module' && $type != 'module' && $type != 'theme' && $type != 'langpack') {
continue;
}
$target_manifest = remove_file_extension($filename) . "-manifest.php";
require_once "{$target_manifest}";
if (isset($manifest['icon']) && $manifest['icon'] != "") {
$manifest_copy_files_to_dir = isset($manifest['copy_files']['to_dir']) ? clean_path($manifest['copy_files']['to_dir']) : "";
$manifest_copy_files_from_dir = isset($manifest['copy_files']['from_dir']) ? clean_path($manifest['copy_files']['from_dir']) : "";
$manifest_icon = clean_path($manifest['icon']);
$icon = "<img src=\"" . $manifest_copy_files_to_dir . ($manifest_copy_files_from_dir != "" ? substr($manifest_icon, strlen($manifest_copy_files_from_dir) + 1) : $manifest_icon) . "\">";
} else {
$icon = getImageForType($manifest['type']);
}
$installed_objects[] = array('icon' => $icon, 'name' => $name, 'type' => $type, 'version' => $version, 'date_entered' => $date_entered, 'description' => $description, 'file' => $link);
//print( "<form action=\"" . $form_action . "_prepare\" method=\"post\">\n" );
//print( "<tr><td>$icon</td><td>$name</td><td>$type</td><td>$version</td><td>$date_entered</td><td>$description</td><td>$link</td></tr>\n" );
//print( "</form>\n" );
}
}
示例3: elseif
} elseif ($_REQUEST['step'] >= count($steps['files'])) {
$_REQUEST['step'] = 0;
}
} else {
// first time through - kill off old sessions
unset($_SESSION['step']);
$_REQUEST['step'] = 0;
}
$file = $steps['files'][$_REQUEST['step']];
require 'modules/UpgradeWizard/' . $file . '.php';
//// END LOGIC
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//// UPGRADE HISTORY
// display installed pieces and versions
$installeds = $uh->getAll();
$upgrades_installed = 0;
$uwHistory = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED'] . "<br>\n";
$uwHistory .= "<ul>\n";
$uwHistory .= "<table>\n";
$uwHistory .= <<<eoq
\t<tr>
\t\t<th></th>
\t\t<th align=left>
\t\t\t{$mod_strings['LBL_ML_NAME']}
\t\t</th>
\t\t<th align=left>
\t\t\t{$mod_strings['LBL_ML_TYPE']}
\t\t</th>
\t\t<th align=left>
\t\t\t{$mod_strings['LBL_ML_VERSION']}