當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UpgradeHistory::is_right_version_greater方法代碼示例

本文整理匯總了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());
}
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:38,代碼來源:SoapSync.php

示例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');
}
開發者ID:pixprod,項目名稱:Regoluna-Invoices-for-SugarCRM,代碼行數:31,代碼來源:reg_invoices_options.php


注:本文中的UpgradeHistory::is_right_version_greater方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。