Skip to content

Commit

Permalink
Fix bug in config_set_global - we need to clear the cache else config…
Browse files Browse the repository at this point in the history
… changes by this function do not take affect.
  • Loading branch information
mantis committed May 17, 2009
1 parent e2b4fee commit d26d7cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/config_api.php
Expand Up @@ -370,8 +370,11 @@ function config_set( $p_option, $p_value, $p_user = NO_USER, $p_project = ALL_PR
# Does *not* persist the value between sessions. If override set to
# false, then the value will only be set if not already existent.
function config_set_global( $p_option, $p_value, $p_override = true ) {
global $g_cache_config_eval;

if( $p_override || !isset( $GLOBALS['g_' . $p_option] ) ) {
$GLOBALS['g_' . $p_option] = $p_value;
unset( $g_cache_config_eval['g_' . $p_option] );
}

return true;
Expand Down

0 comments on commit d26d7cf

Please sign in to comment.