/**
  * Gets all users in the mantis database
  *
  * @return bool|mysqli_result
  */
 public function get_all_users()
 {
     $user_table = $this->get_mantis_table('user');
     $query = "SELECT id FROM {$user_table}\n          WHERE access_level < " . config_get_global('admin_site_threshold');
     $all_users = $this->mysqli->query($query);
     return $all_users;
 }
 function init()
 {
     // Get path to core folder
     $t_core_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     // Include constants
     require_once $t_core_path . 'constant_api.php';
 }
示例#3
0
/**
 * Initilise wiki engine
 * @return null
 * @access public
 */
function wiki_init()
{
    if (wiki_enabled()) {
        # handle legacy style wiki integration
        require_once config_get_global('class_path') . 'MantisCoreWikiPlugin.class.php';
        switch (config_get_global('wiki_engine')) {
            case 'dokuwiki':
                plugin_child('MantisCoreDokuwiki');
                break;
            case 'mediawiki':
                plugin_child('MantisCoreMediaWiki');
                break;
            case 'twiki':
                plugin_child('MantisCoreTwiki');
                break;
            case 'WikkaWiki':
                plugin_child('MantisCoreWikkaWiki');
                break;
            case 'xwiki':
                plugin_child('MantisCoreXwiki');
                break;
        }
        if (is_null(event_signal('EVENT_WIKI_INIT'))) {
            config_set_global('wiki_enable', OFF);
        }
    }
}
示例#4
0
 function init()
 {
     //mantisgraph_autoload();
     spl_autoload_register(array('MantisGraphPlugin', 'autoload'));
     $t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
 }
示例#5
0
function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['PHP_SELF'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php?return=' . $t_return_page);
        }
    } else {
        if (auth_get_current_user_id() == user_get_id_by_name(config_get_global('anonymous_account'))) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['PHP_SELF'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<center>';
                echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
                print_bracket_link('login_page.php?return=' . $t_return_page, lang_get('click_to_login'));
                echo '<p></p>';
                print_bracket_link('main_page.php', lang_get('proceed'));
                echo '</center>';
            }
        } else {
            echo '<center>';
            echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            print_bracket_link('main_page.php', lang_get('proceed'));
            echo '</center>';
        }
    }
    exit;
}
/**
 * Retrieves the access level needed to change the configuration option in the
 * project's parent (ALL_PROJECTS level if project, or file-level if all projects)
 * @param integer $p_project Project.
 * @param string  $p_option  Configuration option to retrieve.
 * @return integer access level
 */
function config_get_access_parent($p_project, $p_option)
{
    if ($p_project == ALL_PROJECTS) {
        return config_get_global('admin_site_threshold');
    } else {
        return config_get_access($p_option, null, ALL_PROJECTS);
    }
}
/**
 * Retrieves the value of config option for the project's parent
 * (ALL_PROJECTS level if project, or file-level if all projects)
 * @param $p_project project
 * @param $p_option config option to retrieve
 * @return mixed config option value
 */
function config_get_parent($p_project, $p_option)
{
    if ($p_project == ALL_PROJECTS) {
        return config_get_global($p_option);
    } else {
        return config_get($p_option, null, null, ALL_PROJECTS);
    }
}
示例#8
0
 function init()
 {
     spl_autoload_register(array('MantisKanbanPlugin', 'autoload'));
     $t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
     // register our custom tables
     #$GLOBALS['g_db_table']['mantis_team_user_table']    = '%db_table_prefix%_team_user%db_table_suffix%';
     #$GLOBALS['g_db_table']['mantis_team_table']         = '%db_table_prefix%_team%db_table_suffix%';
 }
function wiki_mediawiki_get_url_for_page_id($p_page_id)
{
    $t_root_url = config_get_global('wiki_engine_url');
    $t_root_namespace = config_get('wiki_root_namespace');
    if (is_blank($t_root_namespace)) {
        $t_page_id = $p_page_id;
    } else {
        $t_page_id = $t_root_namespace . ':' . $p_page_id;
    }
    return $t_root_url . 'index.php/' . urlencode($t_page_id);
}
 function menu()
 {
     require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'userprojectapi.php';
     if (!userprojectapi::checkPluginIsRegisteredInWhiteboardMenu()) {
         userprojectapi::addPluginToWhiteboardMenu();
     }
     if ((!plugin_is_installed('WhiteboardMenu') || !file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
         return '<a href="' . plugin_page('UserProject') . '&sortVal=userName&sort=ASC">' . plugin_lang_get('menu_title') . '</a>';
     }
     return null;
 }
示例#11
0
 /**
  * Create the resource link to load the chosen library.
  */
 function resources($p_event)
 {
     $markup = '';
     $plugin_path = config_get_global('path') . 'plugins/' . plugin_get_current();
     $style = $plugin_path . '/lib/chosen.min.css';
     $script = $plugin_path . '/js/chosen_for_mantisbt.js';
     $chosen_script = $plugin_path . '/lib/chosen.jquery.min.js';
     $markup .= '<link rel="stylesheet" type="text/css" href="' . $style . '" />';
     $markup .= '<script type="text/javascript" src="' . $chosen_script . '"></script>';
     $markup .= '<script type="text/javascript" src="' . $script . '"></script>';
     return $markup;
 }
示例#12
0
/**
 * Log an event
 * @param int $p_level
 * @param string $p_msg
 * @return null
 */
function log_event($p_level, $p_msg)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    $t_now = date(config_get_global('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    $t_plugin_event = '[' . $t_level . '] ' . $p_msg;
    if (function_exists('event_signal')) {
        event_signal('EVENT_LOG', array($t_plugin_event));
    }
    $t_php_event = $t_now . ' ' . $t_level . ' ' . $p_msg;
    $t_log_destination = config_get_global('log_destination');
    if (is_blank($t_log_destination)) {
        $t_destination = '';
    } else {
        # Use @ to avoid error when there is no delimiter in log destination
        @(list($t_destination, $t_modifiers) = explode(':', $t_log_destination, 2));
    }
    switch ($t_destination) {
        case 'file':
            error_log($t_php_event . PHP_EOL, 3, $t_modifiers);
            break;
        case 'firebug':
            if (!class_exists('FirePHP')) {
                if (file_exists(BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php')) {
                    require_once BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
                }
            }
            if (class_exists('FirePHP')) {
                static $firephp;
                if ($firephp === null) {
                    $firephp = FirePHP::getInstance(true);
                }
                $firephp->log($t_php_event);
                return;
            }
            // if firebug is not available, fall through
        // if firebug is not available, fall through
        default:
            # use default PHP error log settings
            error_log($t_php_event . PHP_EOL);
            break;
    }
    # If running from command line, echo log event to stdout
    if (php_sapi_name() == 'cli') {
        echo $t_php_event . PHP_EOL;
    }
}
示例#13
0
/**
 * Calculates a key to be used for RSS authentication based on user name, cookie and password.
 * if the user changes his user name or password, then the key becomes invalid.
 * @param int $p_user_id
 * @return string
 */
function rss_calculate_key($p_user_id = null)
{
    if ($p_user_id === null) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = $p_user_id;
    }
    $t_seed = config_get_global('rss_key_seed');
    $t_username = user_get_field($t_user_id, 'username');
    $t_password = user_get_field($t_user_id, 'password');
    $t_cookie = user_get_field($t_user_id, 'cookie_string');
    return md5($t_seed . $t_username . $t_cookie . $t_password);
}
 /**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     html_page_top1($string);
     echo '<script language="javascript" type="text/javascript" src="' . SPECMANAGEMENT_PLUGIN_URL . 'files/checkbox.js"></script>';
     echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
/**
 * Initialise bug action group api
 * @param string $p_action Custom action to run.
 * @return void
 */
function bug_group_action_init($p_action)
{
    $t_valid_actions = bug_group_action_get_commands(current_user_get_accessible_projects());
    $t_action = strtoupper($p_action);
    if (!isset($t_valid_actions[$t_action]) && !isset($t_valid_actions['EXT_' . $t_action])) {
        trigger_error(ERROR_GENERIC, ERROR);
    }
    $t_include_file = config_get_global('absolute_path') . 'bug_actiongroup_' . $p_action . '_inc.php';
    if (!file_exists($t_include_file)) {
        trigger_error(ERROR_GENERIC, ERROR);
    } else {
        require_once $t_include_file;
    }
}
示例#16
0
function test_bug_attachments_allow_flags()
{
    $t_pass = true;
    $t_own_view = config_get_global('allow_view_own_attachments');
    $t_own_download = config_get_global('allow_download_own_attachments');
    $t_own_delete = config_get_global('allow_delete_own_attachments');
    if ($t_own_delete == ON && $t_own_download == FALSE) {
        $t_pass = false;
    } else {
        if ($t_own_download == ON && $t_own_view == OFF) {
            $t_pass = false;
        }
    }
    print_test_row('Bug attachments allow own flags (allow_view_own_attachments, ' . 'allow_download_own_attachments, allow_delete_own_attachments)', $t_pass);
    return $t_pass;
}
示例#17
0
文件: rss_api.php 项目: gtn/mantisbt
/**
 * Calculates a key to be used for RSS authentication based on user name,
 * cookie and password. If the user changes their user name or password, this
 * RSS authentication key will become invalidated.
 * @param integer $p_user_id User ID for the user which the key is being calculated for.
 * @return string RSS authentication key (384bit) encoded according to the base64 with URI safe alphabet approach described in RFC4648.
 */
function rss_calculate_key($p_user_id = null)
{
    if ($p_user_id === null) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = $p_user_id;
    }
    $t_username = user_get_field($t_user_id, 'username');
    $t_password = user_get_field($t_user_id, 'password');
    $t_cookie = user_get_field($t_user_id, 'cookie_string');
    $t_key_raw = hash('whirlpool', 'rss_key' . config_get_global('crypto_master_salt') . $t_username . $t_password . $t_cookie, true);
    # Note: We truncate the last 8 bits from the hash output so that base64
    # encoding can be performed without any trailing padding.
    $t_key_base64_encoded = base64_encode(substr($t_key_raw, 0, 63));
    $t_key = strtr($t_key_base64_encoded, '+/', '-_');
    return $t_key;
}
示例#18
0
 public function create()
 {
     $t_issue_ext_table = plugin_table("issue");
     # Insert the rest of the data
     $query = "INSERT INTO {$t_issue_ext_table}\n\t\t\t\t\t    ( project_id ,              issue_id,       report_id,   report_fingerprint,\n                        file_path,               phone_model,    phone_build, phone_brand,\n                        product_name,            total_mem_size, available_mem_size, custom_data,\n                        initial_configuration,   crash_configuration, display, user_comment,\n                        dumpsys_meminfo,         dropbox,        eventslog,    radiolog,\n                        is_silent,               device_id,      installation_id,  user_email,\n                        device_features,         environment,    settings_system, settings_secure,\n                        shared_preferences,      android_version,app_version,     crash_date,\n                        report_date,             install_date\n\t\t\t\t\t    )\n\t\t\t\t\t  VALUES\n\t\t\t\t\t    ( " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . 'now()' . ',' . db_param() . ')';
     $t_display_errors = config_get_global('display_errors');
     $t_on_error_handler = $t_display_errors[E_USER_ERROR];
     $t_display_errors[E_USER_ERROR] = "none";
     config_set_global('display_errors', $t_display_errors);
     $t_result = db_query_bound($query, array($this->project_id, $this->issue_id, $this->report_id, $this->report_fingerprint, $this->file_path, $this->phone_model, $this->phone_build, $this->phone_brand, $this->product_name, $this->total_mem_size, $this->available_mem_size, $this->custom_data, $this->initial_configuration, $this->crash_configuration, $this->display, $this->user_comment, $this->dumpsys_meminfo, $this->dropbox, $this->eventslog, $this->radiolog, $this->is_silent, $this->device_id, $this->installation_id, $this->user_email, $this->device_features, $this->environment, $this->settings_system, $this->settings_secure, $this->shared_preferences, $this->android_version, $this->app_version, $this->crash_date . $this->report_date, $this->install_date));
     $t_display_errors[E_USER_ERROR] = $t_on_error_handler;
     config_set_global('display_errors', $t_display_errors);
     if ($t_result === false) {
         return false;
     }
     $this->id = db_insert_id($t_issue_ext_table);
     return true;
 }
示例#19
0
function db_pconnect($p_dsn, $p_hostname = null, $p_username = null, $p_password = null, $p_database_name = null)
{
    global $g_db_connected, $g_db;
    if ($p_dsn === false) {
        $g_db = ADONewConnection(config_get_global('db_type'));
        $t_result = $g_db->PConnect($p_hostname, $p_username, $p_password, $p_database_name);
    } else {
        $g_db = ADONewConnection($p_dsn);
        $t_result = $g_db->IsConnected();
    }
    if (!$t_result) {
        db_error();
        trigger_error(ERROR_DB_CONNECT_FAILED, ERROR);
        return false;
    }
    $g_db_connected = true;
    return true;
}
示例#20
0
 function __construct($p_session_id = null)
 {
     $t_session_save_path = config_get_global('session_save_path');
     if ($t_session_save_path) {
         session_save_path($t_session_save_path);
     }
     session_cache_limiter('private_no_expire');
     if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') {
         session_set_cookie_params(0, config_get('cookie_path'), config_get('cookie_domain'), true);
     } else {
         session_set_cookie_params(0, config_get('cookie_path'), config_get('cookie_domain'), false);
     }
     if (!is_null($p_session_id)) {
         session_id($p_session_id);
     }
     session_start();
     $this->id = session_id();
 }
示例#21
0
function log_event($p_level, $p_msg)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    $t_now = date(config_get('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    list($t_destination, $t_modifiers) = split(':', config_get_global('log_destination'), 2);
    switch ($t_destination) {
        case 'file':
            error_log($t_now . ' ' . $t_level . ' ' . $p_msg . "\n", 3, $t_modifiers);
            break;
        default:
            break;
    }
}
示例#22
0
 function setupHeaders($p_event)
 {
     global $g_bypass_headers;
     if (!$g_bypass_headers && !headers_sent()) {
         http_content_headers();
         http_caching_headers();
         header('X-Frame-Options: DENY');
         $t_avatar_img_allow = '';
         if (config_get_global('show_avatar')) {
             if ($_SERVER['REQUEST_SCHEME'] == 'https') {
                 $t_avatar_img_allow = "; img-src 'self' https://secure.gravatar.com:443";
             } else {
                 $t_avatar_img_allow = "; img-src 'self' http://www.gravatar.com:80";
             }
         }
         header("X-Content-Security-Policy: allow 'self'; img-src *; options inline-script eval-script{$t_avatar_img_allow}; frame-ancestors 'none'");
         http_custom_headers();
     }
     $g_bypass_headers = true;
 }
示例#23
0
/**
 * Triggers an error if the current user is suspected to be a spammer.
 * This should be run before actions like adding issues or issue notes. If the
 * user is determined to demonstrate spammy behavior, this method will trigger an
 * error and exit the script.
 */
function antispam_check()
{
    if (OFF == config_get_global('allow_signup')) {
        return;
    }
    if (access_get_global_level() > config_get('default_new_account_access_level')) {
        return;
    }
    $t_antispam_max_event_count = config_get('antispam_max_event_count');
    if ($t_antispam_max_event_count == 0) {
        return;
    }
    # Make sure user has at least one more event to add before exceeding the limit, which will happen
    # after this method returns.
    $t_antispam_time_window_in_seconds = config_get('antispam_time_window_in_seconds');
    if (history_count_user_recent_events($t_antispam_time_window_in_seconds) < $t_antispam_max_event_count) {
        return;
    }
    error_parameters($t_antispam_max_event_count, $t_antispam_time_window_in_seconds);
    trigger_error(ERROR_SPAM_SUSPECTED, ERROR);
}
/**
 * @param $print_flag
 */
function calculate_page_content($print_flag)
{
    $specmanagement_print_api = new specmanagement_print_api();
    html_page_top1(plugin_lang_get('menu_versgraph'));
    echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
    if (!$print_flag) {
        html_page_top2();
        if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
            require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
            $whiteboard_print_api = new whiteboard_print_api();
            $whiteboard_print_api->printWhiteboardMenu();
        }
        $specmanagement_print_api->print_plugin_menu();
        echo '<div align="center">';
        echo '<hr size="1" width="100%" />';
    }
    print_table($print_flag);
    if (!$print_flag) {
        html_page_bottom1();
    }
}
示例#25
0
function db_connect($p_dsn, $p_hostname = null, $p_username = null, $p_password = null, $p_database_name = null, $p_db_schema = null, $p_pconnect = false)
{
    global $g_db_connected, $g_db;
    if ($p_dsn === false) {
        $t_db_type = config_get_global('db_type');
        $g_db = ADONewConnection($t_db_type);
        if ($p_pconnect) {
            $t_result = $g_db->PConnect($p_hostname, $p_username, $p_password, $p_database_name);
        } else {
            $t_result = $g_db->Connect($p_hostname, $p_username, $p_password, $p_database_name);
        }
    } else {
        $g_db = ADONewConnection($p_dsn);
        $t_result = $g_db->IsConnected();
    }
    if ($t_result) {
        # For MySQL, the charset for the connection needs to be specified.
        if (db_is_mysql()) {
            $c_charset = db_prepare_string(lang_get('charset'));
            # @@@ Is there a way to translate any charset name to MySQL format? e.g. remote the dashes?
            # @@@ Is this needed for other databases?
            if (strtolower($c_charset) === 'utf-8') {
                db_query('SET NAMES UTF8');
            }
        } elseif (db_is_db2() && $p_db_schema !== null && !is_blank($p_db_schema)) {
            $t_result2 = db_query('set schema ' . $p_db_schema);
            if ($t_result2 === false) {
                db_error();
                trigger_error(ERROR_DB_CONNECT_FAILED, ERROR);
                return false;
            }
        }
    } else {
        db_error();
        trigger_error(ERROR_DB_CONNECT_FAILED, ERROR);
        return false;
    }
    $g_db_connected = true;
    return true;
}
示例#26
0
文件: wiki_api.php 项目: gtn/mantisbt
/**
 * Initialise wiki engine
 * @return void
 * @access public
 */
function wiki_init()
{
    if (!wiki_enabled()) {
        return;
    }
    $t_wiki_engine = config_get_global('wiki_engine');
    if (is_blank(config_get_global('wiki_engine_url'))) {
        # Build default Wiki URL root based on MantisBT path
        $t_url = parse_url(config_get_global('path'));
        # Remove unwanted components and set path to Wiki engine name
        unset($t_url['query'], $t_url['fragment']);
        $t_url['path'] = '/' . $t_wiki_engine . '/';
        $t_url = http_build_url($t_url);
        config_set_global('wiki_engine_url', $t_url);
    }
    # handle legacy style wiki integration
    require_once config_get_global('class_path') . 'MantisCoreWikiPlugin.class.php';
    switch ($t_wiki_engine) {
        case 'dokuwiki':
            plugin_child('MantisCoreDokuwiki');
            break;
        case 'mediawiki':
            plugin_child('MantisCoreMediaWiki');
            break;
        case 'twiki':
            plugin_child('MantisCoreTwiki');
            break;
        case 'WikkaWiki':
            plugin_child('MantisCoreWikkaWiki');
            break;
        case 'xwiki':
            plugin_child('MantisCoreXwiki');
            break;
    }
    if (is_null(event_signal('EVENT_WIKI_INIT'))) {
        config_set_global('wiki_enable', OFF);
    }
}
示例#27
0
 * @uses config_api.php
 * @uses gpc_api.php
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
require_api('config_api.php');
require_api('gpc_api.php');
$f_type = gpc_get_string('type', 'text');
header('Content-Type: application/opensearchdescription+xml');
?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<?php 
$t_path = config_get_global('path');
if (utf8_strtolower($f_type) == 'id') {
    echo '<ShortName>MantisBT IssueId</ShortName>';
    echo '<Description>MantisBT Issue Id</Description>';
    echo '<InputEncoding>UTF-8</InputEncoding>';
} else {
    echo '<ShortName>MantisBT Search</ShortName>';
    echo '<Description>MantisBT Text Search</Description>';
    echo '<InputEncoding>UTF-8</InputEncoding>';
}
?>
<Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%0D%12%00%00%0D%3A%01%E8%DD%99%DE%00%00%00%07tIME%07%D8%0A%1B%035%18L%0A%18d%00%00%02AIDAT8%CB%8D%93%BDOZa%18%C5%7F%7C(%97%8FF%CA%0DU%7B%5BCj%D0Z%E3%AA%12%1C%D4%85A%A2%5D%5C%1C%1C%8C%93%FF%83I%FF%13%07%12'0.%9A%90%88B%24%C6%0Ej4bJ%1A%8C%A2%40%FC%00%8C%20%22%B7p%3Bq%95R%9B%9E%E9%7D%CE%9Bs%F2%BC%E7y%5EM%A9%24%2B%3E_%9CX%2C%87%2C%D7x%0D%82%A0cb%C2A%20%90%40%10t%8C%8C%BC%C7%E3%F9%88%FE%EC%AC%402Y%F8%A7%18%C0%EBu%B0%B6v%06%40%B9%5Cec%E3%02%9DN%83%CEj%FD%FAm%7C%FC%03%FD%FD%22%C9d%81J%A5%D9%A8%BB%BB%8DJ%A5%CA%F9y%B1%81%CF%E7%CBhs%B9'%FC%FE%04%91H%8A%E9%E9n%FA%FA%DE6%19%B8%5C%1D%EC%ED%DD4%F1%B9%DC%13%DAzq%7D%FD%C8%D2%D2%0FDQ%60r%D2%81V%AB%01%C0f3%90%CF%97%A9%D5%14Uh%B7%0B%EAY%FF%A7k4%9AA%92%CC%CC%CD%F5!%CB5%06%06D%0E%0En%D0h%40Q%C0%E9lcv%F63%8B%8B%DF%01%9E%3Bx%89%AB%AB%12%ED%EDF%86%86%DA1%99%F4%B8%DD%9D%B8%DD%9Dj%98%A2(%60%B3%19%5E7%B0Z%0DH%92%A5%813%9B%F5%F4%F6Z%B1%DB%8D%00j%D8%0D%06%92d%06%E0%F6%B6%CC%E6%E6%A5%CA%17%8B2%DB%DB%19%BC%5E%07%F1%F8%1D%0F%0F2%C5%A2%DC%9C%C1%C2%C2%00%3B%3B%19%C2%E1%14~%7F%02E%81%9E%1E%2B%85B%05%87%E3%0DF%A3%1E%8B%A5%85L%A6%F4%F7%10%1F%1F%7F1%3A*1%3C%DC%C1%F1q%96x%FC%8El%B6%CC%FD%7D%85%99%99%1E%02%81%04SS%9F%08%85.TM%C3%13%C2%E1%14fs%0B%E9%F4%03%A2(0%3F%FF%85%C1%C1w%1C%1E%DE%B2%B5%95%E2%E8(K%B5Zcw%F7%EA%EF%1DD%A3%19%BA%BA%2C%B8%5C%1D%AC%AC%9C%B2%BE~%8E%C9%D4B%B5%AA%10%0A%5Db%B7%1B%D9%DF%BFiX%7Bm%7D%1Cu%2C%2F%FF%C4%E7%8B36%26%A1%D5j89%C9%A9w%8A%A2%10%89%A4%D5%DAf3%A0Y%5D%3DU%82%C1d%D3(%5B%5B%B58%9DVb%B1g%83%FA2%D5%E1%F1t%A1)%16%2BJ0xA4%9A%A6%5C%AE%F2%3Fx%F9%9D%7F%03%B4%C6%E9%B0%15%8B%D3U%00%00%00%00IEND%AEB%60%82</Image>
<?php 
if (utf8_strtolower($f_type) == 'id') {
    echo '<Url type="text/html" method="GET" template="', $t_path, 'view.php?id={searchTerms}"></Url>';
} else {
示例#28
0
/**
 * Determine the preferred language
 * @return string
 */
function lang_get_default()
{
    global $g_active_language;
    $t_lang = false;
    # Confirm that the user's language can be determined
    if (function_exists('auth_is_user_authenticated') && auth_is_user_authenticated()) {
        $t_lang = user_pref_get_language(auth_get_current_user_id());
    }
    # Otherwise fall back to default
    if (!$t_lang) {
        $t_lang = config_get_global('default_language');
    }
    if ($t_lang == 'auto') {
        $t_lang = lang_map_auto();
    }
    # Remember the language
    $g_active_language = $t_lang;
    return $t_lang;
}
示例#29
0
function print_lost_password_link()
{
    # lost password feature disabled or reset password via email disabled -> stop here!
    if (LDAP != config_get_global('login_method') && ON == config_get('lost_password_feature') && ON == config_get('send_reset_password') && ON == config_get('enable_email_notification')) {
        print_bracket_link('lost_pwd_page.php', lang_get('lost_password_link'));
    }
}
<?php

define('RELATIONSHIPCOLUMNVIEW_CORE_FOLDER', 'core');
// URL to RelationshipColumnView plugin
define('RELATIONSHIPCOLUMNVIEW_PLUGIN_URL', config_get_global('path') . 'plugins' . DIRECTORY_SEPARATOR . plugin_get_current() . DIRECTORY_SEPARATOR);
// URL to RelationshipColumnView plugin/core
define('RELATIONSHIPCOLUMNVIEW_CORE_RELATIVE_URL', 'plugins' . DIRECTORY_SEPARATOR . plugin_get_current() . DIRECTORY_SEPARATOR . RELATIONSHIPCOLUMNVIEW_CORE_FOLDER . DIRECTORY_SEPARATOR);
// Path to RelationshipColumnView plugin folder
define('RELATIONSHIPCOLUMNVIEW_PLUGIN_URI', config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR);
// Path to RelationshipColumnView core folder
define('RELATIONSHIPCOLUMNVIEW_CORE_URI', RELATIONSHIPCOLUMNVIEW_PLUGIN_URI . RELATIONSHIPCOLUMNVIEW_CORE_FOLDER . DIRECTORY_SEPARATOR);
// Default treshold level
define('PLUGINS_RELATIONSHIPCOLUMNVIEW_THRESHOLD_LEVEL_DEFAULT', ADMINISTRATOR);
define("MAX_TOOLTIP_CONTENT_LENGTH", 160);