当前位置: 首页>>代码示例>>PHP>>正文


PHP user_pref_get_pref函数代码示例

本文整理汇总了PHP中user_pref_get_pref函数的典型用法代码示例。如果您正苦于以下问题:PHP user_pref_get_pref函数的具体用法?PHP user_pref_get_pref怎么用?PHP user_pref_get_pref使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_pref_get_pref函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mc_user_pref_get_pref

/**
 * Get the value for the specified user preference.
 *
 * @param string   $p_username    The user's username
 * @param string   $p_password    The user's password
 * @param int      $p_project_id  Project ID (0 = ALL_PROJECTS (mantisbt/core/constant_inc.php))
 * @param string   $p_pref_name   The name of the preference
 * @return string  $t_user_pref   The requested preference value
 */
function mc_user_pref_get_pref($p_username, $p_password, $p_project_id, $p_pref_name)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    return user_pref_get_pref($t_user_id, $p_pref_name, $p_project_id);
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:20,代码来源:mc_user_pref_api.php

示例2: helper_get_current_project

    $f_eta = $t_bug->eta;
    $f_severity = $t_bug->severity;
    $f_priority = $t_bug->priority;
    $f_summary = $t_bug->summary;
    $f_description = $t_bug->description;
    $f_steps_to_reproduce = $t_bug->steps_to_reproduce;
    $f_additional_info = $t_bug->additional_information;
    $f_view_state = (int) $t_bug->view_state;
    $f_due_date = $t_bug->due_date;
    $t_project_id = $t_bug->project_id;
} else {
    # Get Project Id and set it as current
    $t_current_project = helper_get_current_project();
    $t_project_id = gpc_get_int('project_id', $t_current_project);
    # If all projects, use default project if set
    $t_default_project = user_pref_get_pref(auth_get_current_user_id(), 'default_project');
    if (ALL_PROJECTS == $t_project_id && ALL_PROJECTS != $t_default_project) {
        $t_project_id = $t_default_project;
    }
    if ((ALL_PROJECTS == $t_project_id || project_exists($t_project_id)) && $t_project_id != $t_current_project) {
        helper_set_current_project($t_project_id);
        # Reloading the page is required so that the project browser
        # reflects the new current project
        print_header_redirect($_SERVER['REQUEST_URI'], true, false, true);
    }
    # New issues cannot be reported for the 'All Project' selection
    if (ALL_PROJECTS == $t_current_project) {
        print_header_redirect('login_select_proj_page.php?ref=bug_report_page.php');
    }
    access_ensure_project_level(config_get('report_bug_threshold'));
    $f_build = gpc_get_string('build', '');
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_report_page.php

示例3: date_default_timezone_set

if (!isset($g_login_anonymous)) {
    $g_login_anonymous = true;
}
# Attempt to set the current timezone to the user's desired value
# Note that PHP 5.1 on RHEL/CentOS doesn't support the timezone functions
# used here so we just skip this action on RHEL/CentOS platforms.
if (function_exists('timezone_identifiers_list')) {
    if (in_array(config_get_global('default_timezone'), timezone_identifiers_list())) {
        // if a default timezone is set in config, set it here, else we use php.ini's value
        // having a timezone set avoids a php warning
        date_default_timezone_set(config_get_global('default_timezone'));
    }
    require_api('authentication_api.php');
    if (auth_is_user_authenticated()) {
        require_api('user_pref_api.php');
        $t_user_timezone = user_pref_get_pref(auth_get_current_user_id(), 'timezone');
        if (!is_blank($t_user_timezone)) {
            date_default_timezone_set($t_user_timezone);
        }
    }
}
if (!defined('MANTIS_MAINTENANCE_MODE')) {
    require_api('collapse_api.php');
    collapse_cache_token();
}
# Load custom functions
require_api('custom_function_api.php');
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php')) {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php';
}
# Set HTTP response headers
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:core.php

示例4: current_user_get_pref

/**
 * Returns the specified field of the currently logged in user
 *
 * @param pref_name	Name of user preference as in the preferences table
 * 				definition.
 * @return Get the value of the specified preference for current user.
 * @access public
 */
function current_user_get_pref($p_pref_name)
{
    return user_pref_get_pref(auth_get_current_user_id(), $p_pref_name);
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:12,代码来源:current_user_api.php

示例5: mci_get_user_lang

/**
 * Return user's default language given a user id
 * @param integer $p_user_id User id.
 * @return string language string
 */
function mci_get_user_lang($p_user_id)
{
    $t_lang = user_pref_get_pref($p_user_id, 'language');
    if ($t_lang == 'auto') {
        $t_lang = config_get('fallback_language');
    }
    return $t_lang;
}
开发者ID:elmarculino,项目名称:mantisbt,代码行数:13,代码来源:mc_api.php

示例6: config_get_global

}

# Attempt to set the current timezone to the user's desired value
# Note that PHP 5.1 on RHEL/CentOS doesn't support the timezone functions
# used here so we just skip this action on RHEL/CentOS platforms.
if ( function_exists( 'timezone_identifiers_list' ) ) {
	if ( in_array ( config_get_global( 'default_timezone' ), timezone_identifiers_list() ) ) {
		// if a default timezone is set in config, set it here, else we use php.ini's value
		// having a timezone set avoids a php warning
		date_default_timezone_set( config_get_global( 'default_timezone' ) );
	}

	require_api( 'authentication_api.php' );
	if( auth_is_user_authenticated() ) {
		require_api( 'user_pref_api.php' );
		date_default_timezone_set( user_pref_get_pref( auth_get_current_user_id(), 'timezone' ) );
	}
}

if ( !defined( 'MANTIS_MAINTENANCE_MODE' ) ) {
	require_api( 'collapse_api.php' );
	collapse_cache_token();
}

# Load custom functions
require_api( 'custom_function_api.php' );
if ( file_exists( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php' ) ) {
	require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php' );
}

# Set HTTP response headers
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:core.php

示例7: string_get_bug_page

function string_get_bug_page($p_action, $p_user_id = null)
{
    if (null === $p_user_id) {
        if (auth_is_user_authenticated()) {
            $p_user_id = auth_get_current_user_id();
        }
    }
    $g_show_action = config_get('show_' . $p_action);
    switch ($g_show_action) {
        case BOTH:
            if (null !== $p_user_id && ON == user_pref_get_pref($p_user_id, 'advanced_' . $p_action)) {
                return 'bug_' . $p_action . '_advanced_page.php';
            } else {
                return 'bug_' . $p_action . '_page.php';
            }
        case SIMPLE_ONLY:
            return 'bug_' . $p_action . '_page.php';
        case ADVANCED_ONLY:
            return 'bug_' . $p_action . '_advanced_page.php';
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:21,代码来源:string_api.php

示例8: lang_get

$t_lang_no_bugnotes_msg = lang_get('no_bugnotes_msg');
$t_lang_projection = lang_get('projection');
$t_lang_target_version = lang_get('target_version');
$t_lang_summary = lang_get('summary');
$t_lang_description = lang_get('description');
$t_lang_steps_to_reproduce = lang_get('steps_to_reproduce');
$t_lang_additional_information = lang_get('additional_information');
$t_lang_bug_notes_title = lang_get('bug_notes_title');
$t_lang_system_profile = lang_get('system_profile');
$t_lang_attached_files = lang_get('attached_files');
$t_lang_tags = lang_get('tags');
$t_fields = config_get('bug_view_page_fields');
$t_fields = columns_filter_disabled($t_fields);
$t_show_tags = in_array('tags', $t_fields) && access_has_global_level(config_get('tag_view_threshold'));
$t_current_user_id = auth_get_current_user_id();
$t_user_bugnote_order = user_pref_get_pref($t_current_user_id, 'bugnote_order');
for ($j = 0; $j < $t_row_count; $j++) {
    $t_bug = $t_result[$j];
    $t_id = $t_bug->id;
    if ($j % 50 == 0) {
        # to save ram as report will list data once, clear cache after 50 bugs
        bug_text_clear_cache();
        bug_clear_cache();
        bugnote_clear_cache();
    }
    # display the available and selected bugs
    if (in_array($t_id, $f_bug_arr) || !$f_show_flag) {
        if ($t_count_exported > 0) {
            echo '<br style="mso-special-character: line-break; page-break-before: always" />';
        }
        $t_count_exported++;
开发者ID:spring,项目名称:spring-website,代码行数:31,代码来源:print_all_bug_page_word.php


注:本文中的user_pref_get_pref函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。