global search MDL-25056 fixed refering to $CFG->var when it isn't set yet.
authorAparup Banerjee <nebgor@gmail.com>
Fri, 5 Nov 2010 09:55:25 +0000 (09:55 +0000)
committerAparup Banerjee <nebgor@gmail.com>
Fri, 5 Nov 2010 09:55:25 +0000 (09:55 +0000)
blocks/search/settings.php

index dd2a2b1..fee5188 100644 (file)
@@ -54,8 +54,11 @@ if ($ADMIN->fulltree) {
 
 
     // modules activations
-
-    $types = explode(',', $CFG->block_search_filetypes);
+    if (isset($CFG->block_search_filetypes)) {
+        $types = explode(',', $CFG->block_search_filetypes);
+    } else {
+        $types = explode(',', $defaultfiletypes);
+    }
     if (!empty($types)) {
         foreach($types as $type) {
             $utype = strtoupper($type);