Skip to content

Commit

Permalink
Fix #12006: Mantis Graphs - Configuration - jpgraph library path not …
Browse files Browse the repository at this point in the history
…saved
  • Loading branch information
atrol committed Feb 26, 2012
1 parent 407b013 commit 22f830c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
19 changes: 13 additions & 6 deletions config_defaults_inc.php
Expand Up @@ -3881,15 +3881,22 @@

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

/***************
Expand Down
4 changes: 2 additions & 2 deletions core/config_api.php
Expand Up @@ -419,9 +419,9 @@ function config_can_set_in_database( $p_option ) {

# bypass table lookup for certain options
if( $g_cache_can_set_in_database == '' ) {
$g_cache_can_set_in_database = '/' . implode( '|', config_get_global( 'global_settings' ) ) . '/';
$g_cache_can_set_in_database = config_get_global( 'global_settings' );
}
$t_bypass_lookup = ( 0 < preg_match( $g_cache_can_set_in_database, $p_option ) );
$t_bypass_lookup = in_array( $p_option, $g_cache_can_set_in_database, true );

$g_cache_bypass_lookup[$p_option] = $t_bypass_lookup;

Expand Down

0 comments on commit 22f830c

Please sign in to comment.