本文整理汇总了PHP中UpgradeHistory::is_right_version_greater方法的典型用法代码示例。如果您正苦于以下问题:PHP UpgradeHistory::is_right_version_greater方法的具体用法?PHP UpgradeHistory::is_right_version_greater怎么用?PHP UpgradeHistory::is_right_version_greater使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UpgradeHistory
的用法示例。
在下文中一共展示了UpgradeHistory::is_right_version_greater方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_unique_system_id
function get_unique_system_id($session, $unique_key, $system_name = '', $install_method = 'web')
{
global $beanList, $beanFiles, $current_user, $server;
$error = new SoapError();
if (!empty($server->requestHeaders)) {
$header = explode('=', $server->requestHeaders);
$uh = new UpgradeHistory();
if (count($header) == 2 && $uh->is_right_version_greater(explode('.', '5.0.0'), explode('.', $header[1]))) {
$output_list = array();
if (!validate_authenticated($session)) {
$error->set_error('invalid_login');
return array('id' => '', 'error' => $error->get_soap_array());
}
$system = new System();
if ($system->canAddNewOfflineClient()) {
$system->system_key = $unique_key;
$system->user_id = $current_user->id;
$system->system_name = $system_name;
$system->install_method = $install_method;
$system->last_connect_date = TimeDate::getInstance()->nowDb();
$system_id = $system->retrieveNextKey();
if ($system_id == -1) {
$error->set_error('client_deactivated');
}
} else {
$system_id = -1;
$error->set_error('cannot_add_client');
}
} else {
$system_id = -1;
$error->set_error('upgrade_client');
}
} else {
$system_id = -1;
$error->set_error('upgrade_client');
}
return array('id' => $system_id, 'error' => $error->get_soap_array());
}
示例2: array
require_once 'modules/Administration/UpgradeHistory.php';
$admin_option_defs = array();
// Invoice options
$admin_option_defs[] = array('Administration', 'LBL_FACT_CONFIG', 'LBL_FACT_CONFIG_DESC', './index.php?module=Configurator&action=reg_invoices_Config');
// Dependencies checker
$admin_option_defs[] = array('Administration', 'LBL_FACT_CHECK', 'LBL_FACT_CHECK_DESC', './index.php?module=Administration&action=reg_invoices_Check');
/*
* Add administration options to page
* Supports:
*/
$US = new UpgradeHistory();
/*
* Prepare for < 5.5
*/
$minimal = explode(".", "5.5.0");
$current = explode(".", $GLOBALS['sugar_version']);
if (!$US->is_right_version_greater($minimal, $current, true)) {
foreach ($admin_option_defs as $key => $val) {
//Add $image_path
$admin_option_defs[$key][0] = $image_path . $admin_option_defs[$key][0];
}
}
$minimal = explode(".", "5.2.0");
$current = explode(".", $GLOBALS['sugar_version']);
// 5.2 and later
if ($US->is_right_version_greater($minimal, $current, true)) {
$admin_group_header[] = array('LBL_FACT_CONFIG_GROUP', '', false, array("Administration" => $admin_option_defs), 'LBL_FACT_CONFIG_GROUP_DESC');
//5.1 and earlier
} else {
$admin_group_header[] = array('LBL_FACT_CONFIG_GROUP', '', false, $admin_option_defs, 'LBL_FACT_CONFIG_GROUP_DESC');
}