Skip to content

Commit

Permalink
Fixed a bug where Configuration search doesn't always take you to the…
Browse files Browse the repository at this point in the history
… correct configuration item (bug #722)
  • Loading branch information
mystralkk committed Dec 31, 2016
1 parent d63c0ef commit 852d2c4
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions system/classes/config.class.php
Expand Up @@ -247,12 +247,14 @@ public function &initConfig()
// continue;
}

$autoCompleteData = $row[0];

if ($row[1] !== 'unset') {
if (!array_key_exists($row[2], $this->config_array) ||
!array_key_exists($row[0], $this->config_array[$row[2]])
) {
$value = @unserialize($row[1]);
if (($value === false) && ($row[1] != $false_str)) {
if (($value === false) && ($row[1] !== $false_str)) {
if (function_exists('COM_errorLog')) {
COM_errorLog("Unable to unserialize {$row[1]} for {$row[2]}:{$row[0]}");
}
Expand All @@ -261,21 +263,17 @@ public function &initConfig()

if (strpos($row[3], '@') === 0) { // if @
if (is_array($value) && !empty($value)) {
$this->conf_tab_arr[$row[2]][$row[4]]
[$tabs[$row[2]][$row[4]][$row[5]]][$row[5]][$row[0]] = array_keys($value);
$autoCompleteData = array_keys($value);
}
} else {
$this->conf_tab_arr[$row[2]][$row[4]]
[$tabs[$row[2]][$row[4]][$row[5]]][$row[5]][$row[0]] = $row[0];
}
}
}
} else {
// set to autocomplete only
$this->conf_tab_arr[$row[2]][$row[4]]
[$tabs[$row[2]][$row[4]][$row[5]]][$row[5]][$row[0]] = $row[0];
}

// set to auto complete
$this->conf_tab_arr[$row[2]][$row[4]][$tabs[$row[2]][$row[4]][$row[5]]][$row[5]][$row[0]] = $autoCompleteData;
}

$this->_post_initconfig();
$this->_post_configuration();

Expand Down

0 comments on commit 852d2c4

Please sign in to comment.