From 55c2dcb6648ffa78f698a4cca453662ba6a14189 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 14 Dec 2010 12:30:40 -0500 Subject: [PATCH] bug #3137351 User preferences and hide_db --- libraries/config/validate.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/config/validate.lib.php b/libraries/config/validate.lib.php index 59df2b8f4..60aa33b4c 100644 --- a/libraries/config/validate.lib.php +++ b/libraries/config/validate.lib.php @@ -307,7 +307,9 @@ function validate_regex($path, $values) test_php_errormsg(); $matches = array(); - preg_match($values[$path], '', $matches); + // in libraries/List_Database.class.php _checkHideDatabase(), + // a '/' is used as the delimiter for hide_db + preg_match('/' . $values[$path] . '/', '', $matches); test_php_errormsg(false); @@ -457,4 +459,4 @@ function validate_upper_bound($path, $values, $max_value) $result = $values[$path] <= $max_value; return array($path => ($result ? '' : sprintf(__('Value must be equal or lower than %s'), $max_value))); } -?> \ No newline at end of file +?>