]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15351: small fix when search is not used.
authorscyrma <scyrma>
Thu, 11 Sep 2008 08:13:12 +0000 (08:13 +0000)
committerscyrma <scyrma>
Thu, 11 Sep 2008 08:13:12 +0000 (08:13 +0000)
repository/local/repository.class.php

index ad282dcbe0e924f2c56ce5d9e597a4ae6fca1231..62dce55b134998ff630e1ea1fd820be27820eda2 100755 (executable)
@@ -144,7 +144,8 @@ class repository_local extends repository {
                     if ($search && stristr($tmp['title'], $search) !== false) {
                         $_search = false;
                     }
-                    if ( $_filecount = $this->build_tree($child, $_search, $dynamicmode, $tmp['children']) ) {
+                    $_filecount = $this->build_tree($child, $_search, $dynamicmode, $tmp['children']);
+                    if ($search && $_filecount) {
                         $tmp['expanded'] = 1;
                     }