Skip to content

Commit

Permalink
MDL12672 fixed parent::search trouble; merged from MOODLE_19_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Dec 20, 2007
1 parent cb29abc commit 3cea9c5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/adminlib.php
Expand Up @@ -1036,7 +1036,12 @@ function &locate($name, $findpath=false) {
function search($query) {
$result = array();
foreach ($this->children as $child) {
$result = array_merge($result, $child->search($query));
$subsearch = $child->search($query);
if (!is_array($subsearch)) {
debugging('Incorrect search result from '.$child->name);
continue;
}
$result = array_merge($result, $subsearch);
}
return $result;
}
Expand Down Expand Up @@ -3374,8 +3379,8 @@ function admin_page_managemods() {
}

function search($query) {
if (parent::search($query)) {
return true;
if ($result = parent::search($query)) {
return $result;
}

$found = false;
Expand Down Expand Up @@ -3415,8 +3420,8 @@ function admin_page_manageblocks() {

function search($query) {
global $CFG;
if (parent::search($query)) {
return true;
if ($result = parent::search($query)) {
return $result;
}

$found = false;
Expand Down

0 comments on commit 3cea9c5

Please sign in to comment.