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 79c04ca commit 2e1bb5b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 34 deletions.
49 changes: 17 additions & 32 deletions config_defaults_inc.php
Expand Up @@ -4108,39 +4108,24 @@

/**
* 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(
'global_settings',
'admin_checks',
'allow_signup',
'anonymous',
'compress_html',
'content_expire',
'cookie',
'crypto_master_salt',
'custom_headers',
'database_name',
'^db_',
'display_errors',
'form_security_',
'hostname',
'html_valid_tags',
'language',
'login_method',
'plugins_enabled',
'plugins_installed',
'session_',
'show_detailed_errors',
'show_queries_',
'stop_on_errors',
'use_javascript',
'version_suffix',
'[^_]file[(_(?!threshold))$]',
'[^_]path[_$]',
'_page$',
'_table$',
'_url$',
'global_settings', 'admin_checks', 'allow_signup', 'allow_anonymous_login',
'anonymous_account', 'compress_html', 'content_expire', 'cookie_time_length', 'cookie_path',
'cookie_domain', 'cookie_version', 'cookie_prefix', 'string_cookie', 'project_cookie',
'view_all_cookie', 'manage_cookie', 'logout_cookie', 'bug_list_cookie', 'crypto_master_salt',
'custom_headers', 'database_name', 'db_username', 'db_password', 'db_schema', 'db_type',
'db_table_prefix','db_table_suffix', 'display_errors', 'form_security_validation',
'hostname','html_valid_tags', 'html_valid_tags_single_line', 'default_language',
'language_auto_map', 'fallback_language', 'login_method', 'plugins_enabled', 'session_handler',
'session_save_path', 'session_validation', 'show_detailed_errors', 'show_queries_count',
'stop_on_errors', 'use_javascript', 'version_suffix', 'custom_strings_file',
'file_upload_ftp_server', 'file_upload_ftp_user', 'file_upload_ftp_pass',
'fileinfo_magic_db_file', 'css_include_file', 'css_rtl_include_file', 'meta_include_file',
'file_type_icons', 'path', 'icon_path', 'short_path', 'absolute_path', 'core_path',
'class_path','library_path', 'language_path', 'absolute_path_default_upload_folder',
'ldap_simulation_file_path', 'plugin_path', 'bottom_include_page', 'top_include_page',
'default_home_page', 'logout_redirect_page', 'manual_url', 'logo_url', 'wiki_engine_url',
);
4 changes: 2 additions & 2 deletions core/config_api.php
Expand Up @@ -430,9 +430,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 2e1bb5b

Please sign in to comment.