Skip to content

Commit

Permalink
Fix part of #11293 - if we have a project_override set, that should l…
Browse files Browse the repository at this point in the history
…ead to the same behaviour as calling config_get with a project id
  • Loading branch information
mantis committed Dec 22, 2009
1 parent c207d04 commit c2bf8fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/config_api.php
Expand Up @@ -54,7 +54,7 @@
# 3.use GLOBAL[config_id]
function config_get( $p_option, $p_default = null, $p_user = null, $p_project = null ) {
global $g_cache_config, $g_cache_config_access, $g_cache_db_table_exists, $g_cache_filled;
global $g_cache_config_user, $g_cache_config_project;
global $g_cache_config_user, $g_cache_config_project, $g_project_override;

# @@ debug @@ echo "lu o=$p_option ";
# bypass table lookup for certain options
Expand All @@ -63,7 +63,10 @@ function config_get( $p_option, $p_default = null, $p_user = null, $p_project =
# @@ debug @@ if ($t_bypass_lookup) { echo "bp=$p_option match=$t_match_pattern <br />"; }

if( !$t_bypass_lookup ) {

if( $g_project_override != null ) {
* check default value *
$p_project = $g_project_override;
}
# @@ debug @@ if ( ! db_is_connected() ) { echo "no db "; }
# @@ debug @@ echo "lu table=" . ( db_table_exists( $t_config_table ) ? "yes " : "no " );
if( !$g_cache_db_table_exists ) {
Expand Down

0 comments on commit c2bf8fb

Please sign in to comment.