Skip to content

Commit 2e1bb5b

Browse files
committedFeb 26, 2012
Fix #12006: Mantis Graphs - Configuration - jpgraph library path not saved
1 parent 79c04ca commit 2e1bb5b

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed
 

‎config_defaults_inc.php

+17-32
Original file line numberDiff line numberDiff line change
@@ -4108,39 +4108,24 @@
41084108

41094109
/**
41104110
* The following list of variables should never be in the database.
4111-
* These patterns will be concatenated and used as a regular expression
4112-
* to bypass the database lookup and look here for appropriate global settings.
4111+
* It is used to bypass the database lookup and look here for appropriate global settings.
41134112
* @global array $g_global_settings
41144113
*/
41154114
$g_global_settings = array(
4116-
'global_settings',
4117-
'admin_checks',
4118-
'allow_signup',
4119-
'anonymous',
4120-
'compress_html',
4121-
'content_expire',
4122-
'cookie',
4123-
'crypto_master_salt',
4124-
'custom_headers',
4125-
'database_name',
4126-
'^db_',
4127-
'display_errors',
4128-
'form_security_',
4129-
'hostname',
4130-
'html_valid_tags',
4131-
'language',
4132-
'login_method',
4133-
'plugins_enabled',
4134-
'plugins_installed',
4135-
'session_',
4136-
'show_detailed_errors',
4137-
'show_queries_',
4138-
'stop_on_errors',
4139-
'use_javascript',
4140-
'version_suffix',
4141-
'[^_]file[(_(?!threshold))$]',
4142-
'[^_]path[_$]',
4143-
'_page$',
4144-
'_table$',
4145-
'_url$',
4115+
'global_settings', 'admin_checks', 'allow_signup', 'allow_anonymous_login',
4116+
'anonymous_account', 'compress_html', 'content_expire', 'cookie_time_length', 'cookie_path',
4117+
'cookie_domain', 'cookie_version', 'cookie_prefix', 'string_cookie', 'project_cookie',
4118+
'view_all_cookie', 'manage_cookie', 'logout_cookie', 'bug_list_cookie', 'crypto_master_salt',
4119+
'custom_headers', 'database_name', 'db_username', 'db_password', 'db_schema', 'db_type',
4120+
'db_table_prefix','db_table_suffix', 'display_errors', 'form_security_validation',
4121+
'hostname','html_valid_tags', 'html_valid_tags_single_line', 'default_language',
4122+
'language_auto_map', 'fallback_language', 'login_method', 'plugins_enabled', 'session_handler',
4123+
'session_save_path', 'session_validation', 'show_detailed_errors', 'show_queries_count',
4124+
'stop_on_errors', 'use_javascript', 'version_suffix', 'custom_strings_file',
4125+
'file_upload_ftp_server', 'file_upload_ftp_user', 'file_upload_ftp_pass',
4126+
'fileinfo_magic_db_file', 'css_include_file', 'css_rtl_include_file', 'meta_include_file',
4127+
'file_type_icons', 'path', 'icon_path', 'short_path', 'absolute_path', 'core_path',
4128+
'class_path','library_path', 'language_path', 'absolute_path_default_upload_folder',
4129+
'ldap_simulation_file_path', 'plugin_path', 'bottom_include_page', 'top_include_page',
4130+
'default_home_page', 'logout_redirect_page', 'manual_url', 'logo_url', 'wiki_engine_url',
41464131
);

‎core/config_api.php

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

431431
# bypass table lookup for certain options
432432
if( $g_cache_can_set_in_database == '' ) {
433-
$g_cache_can_set_in_database = '/' . implode( '|', config_get_global( 'global_settings' ) ) . '/';
433+
$g_cache_can_set_in_database = config_get_global( 'global_settings' );
434434
}
435-
$t_bypass_lookup = ( 0 < preg_match( $g_cache_can_set_in_database, $p_option ) );
435+
$t_bypass_lookup = in_array( $p_option, $g_cache_can_set_in_database, true );
436436

437437
$g_cache_bypass_lookup[$p_option] = $t_bypass_lookup;
438438

0 commit comments

Comments
 (0)
Please sign in to comment.