Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 22f830c

Browse files
committedFeb 26, 2012
Fix #12006: Mantis Graphs - Configuration - jpgraph library path not saved
1 parent 407b013 commit 22f830c

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed
 

‎config_defaults_inc.php

+13-6
Original file line numberDiff line numberDiff line change
@@ -3881,15 +3881,22 @@
38813881

38823882
/**
38833883
* The following list of variables should never be in the database.
3884-
* These patterns will be concatenated and used as a regular expression
3885-
* to bypass the database lookup and look here for appropriate global settings.
3884+
* It is used to bypass the database lookup and look here for appropriate global settings.
38863885
* @global array $g_global_settings
38873886
*/
38883887
$g_global_settings = array(
3889-
'_table$', 'cookie', '^db_', 'hostname', 'allow_signup', 'database_name', 'show_queries_', 'admin_checks', 'version_suffix', 'global_settings',
3890-
'_path$', 'use_iis', 'language', 'use_javascript', 'minimal_jscss', 'display_errors', 'show_detailed_errors', 'stop_on_errors', 'login_method', '_file$',
3891-
'anonymous', 'content_expire', 'html_valid_tags', 'custom_headers', 'rss_key_seed', 'plugins_enabled', 'session_', 'form_security_',
3892-
'compress_html', '_page$', '_url$',
3888+
'path', 'icon_path', 'short_path', 'absolute_path', 'core_path', 'class_path', 'absolute_path_default_upload_folder',
3889+
'ldap_simulation_file_path', 'cookie_path', 'plugin_path', 'db_table_prefix', 'db_table_suffix', 'db_table',
3890+
'cookie_time_length', 'cookie_domain', 'cookie_version', 'cookie_prefix', 'string_cookie', 'project_cookie',
3891+
'view_all_cookie', 'manage_cookie', 'logout_cookie', 'bug_list_cookie', 'db_username', 'db_password', 'db_schema', 'db_type',
3892+
'hostname', 'allow_signup', 'database_name', 'show_queries_count', 'show_queries_threshold', 'show_queries_list',
3893+
'admin_checks', 'version_suffix', 'global_settings', 'use_iis', 'default_language', 'language_choices_arr',
3894+
'language_auto_map', 'fallback_language', 'use_javascript', 'minimal_jscss', 'display_errors', 'show_detailed_errors',
3895+
'stop_on_errors', 'login_method', 'fileinfo_magic_db_file', 'css_include_file', 'css_rtl_include_file', 'meta_include_file',
3896+
'allow_anonymous_login', 'anonymous_account', 'content_expire', 'html_valid_tags', 'html_valid_tags_single_line',
3897+
'custom_headers', 'rss_key_seed', 'plugins_enabled', 'session_handler', 'session_key', 'session_save_path',
3898+
'session_validation', 'form_security_validation', 'compress_html', 'bottom_include_page', 'top_include_page',
3899+
'default_home_page', 'logout_redirect_page', 'manual_url', 'logo_url', 'create_short_url', 'wiki_engine_url',
38933900
);
38943901

38953902
/***************

‎core/config_api.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ function config_can_set_in_database( $p_option ) {
419419

420420
# bypass table lookup for certain options
421421
if( $g_cache_can_set_in_database == '' ) {
422-
$g_cache_can_set_in_database = '/' . implode( '|', config_get_global( 'global_settings' ) ) . '/';
422+
$g_cache_can_set_in_database = config_get_global( 'global_settings' );
423423
}
424-
$t_bypass_lookup = ( 0 < preg_match( $g_cache_can_set_in_database, $p_option ) );
424+
$t_bypass_lookup = in_array( $p_option, $g_cache_can_set_in_database, true );
425425

426426
$g_cache_bypass_lookup[$p_option] = $t_bypass_lookup;
427427

0 commit comments

Comments
 (0)
Please sign in to comment.