From 43547be5ec1e41f3724a4349953aee8bf9fa19e6 Mon Sep 17 00:00:00 2001
From: Damien Regad <damien.regad@merckserono.net>
Date: Mon, 28 Mar 2011 19:55:49 +0200
Subject: [PATCH] Fix #12884: Checks for obsolete config fails to report error

Function config_obsolete in core/config_api.php failed to report deprecated
configs defined in core/obsolete.php and displaying replacement parameter,
due to inverted parameters in call to print_test_warn_row.

Also fixes an error when calling the function with a single parameter (as
is sometimes the case in obsolete.php) by making the 2nd parameter optional
and defaulting to ''.
---
 core/config_api.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/config_api.php b/core/config_api.php
index 12609de..3790350 100644
--- a/core/config_api.php
+++ b/core/config_api.php
@@ -521,7 +521,7 @@ function config_flush_cache( $p_option = '', $p_user = ALL_USERS, $p_project = A
 # ------------------
 # Checks if an obsolete configuration variable is still in use.  If so, an error
 # will be generated and the script will exit.  This is called from admin_check.php.
-function config_obsolete( $p_var, $p_replace ) {
+function config_obsolete( $p_var, $p_replace = '' ) {
 
 	# @@@ we could trigger a WARNING here, once we have errors that can
 	#     have extra data plugged into them (we need to give the old and
@@ -542,7 +542,7 @@ function config_obsolete( $p_var, $p_replace ) {
 			$t_info = '';
 		}
 
-		print_test_warn_row( $t_description, $t_info, false );
+		print_test_warn_row( $t_description, false, $t_info );
 	}
 }
 
-- 
1.7.1

