diff --git a/system/classes/config.class.php b/system/classes/config.class.php index 7e0df5113..962973442 100644 --- a/system/classes/config.class.php +++ b/system/classes/config.class.php @@ -395,10 +395,10 @@ function restore_param($name, $group, $sg = null, $tab_id = null) $escaped_name = DB_escapeString($name); $escaped_grp = DB_escapeString($group); - if (empty($tab_id)) { + if (empty($tab_id) && $tab_id !== '0') { $tab_id = DB_getItem($_TABLES['conf_values'], 'tab', "name = '$escaped_name' AND group_name = '$escaped_grp'"); - if (empty($tab_id)) return false; + if (empty($tab_id && $tab_id !== '0')) return false; } // check if current user other than Root has access to @@ -440,10 +440,10 @@ function unset_param($name, $group, $sg = null, $tab_id = '') $escaped_name = DB_escapeString($name); $escaped_grp = DB_escapeString($group); - if (empty($tab_id)) { + if (empty($tab_id) && $tab_id !== '0') { $tab_id = DB_getItem($_TABLES['conf_values'], 'tab', "name = '$escaped_name' AND group_name = '$escaped_grp'"); - if (empty($tab_id)) return false; + if (empty($tab_id && $tab_id !== '0')) return false; } // check if current user other than Root has access to