当前位置: 首页>>代码示例>>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;未经允许,请勿转载。