Skip to content

Commit

Permalink
Fixed missing restor_param or unset_param method when $tab_id is set …
Browse files Browse the repository at this point in the history
…to '0'
  • Loading branch information
dengenxp committed Jan 23, 2016
1 parent dec6623 commit eab7585
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/classes/config.class.php
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eab7585

Please sign in to comment.