]> git.mjollnir.org Git - moodle.git/commitdiff
search MDL-19822 Upgraded print_header and build_navigation calls to OUTPUT/PAGE...
authorsamhemelryk <samhemelryk>
Fri, 4 Sep 2009 07:34:39 +0000 (07:34 +0000)
committersamhemelryk <samhemelryk>
Fri, 4 Sep 2009 07:34:39 +0000 (07:34 +0000)
search/indexersplash.php
search/query.php
search/stats.php

index 916a3ef6da35efc71687ee0dfd626fbca5135861..94c8c296202d670e75b83b99e192684ecf918bde 100644 (file)
         $strquery  = get_string('stats');
         
         // print page header
-        $navlinks[] = array('name' => $strsearch, 'link' => "index.php", 'type' => 'misc');
-        $navlinks[] = array('name' => $strquery, 'link' => "stats.php", 'type' => 'misc');
-        $navlinks[] = array('name' => get_string('runindexer','search'), 'link' => null, 'type' => 'misc');
-        $navigation = build_navigation($navlinks);
         $site = get_site();
-        print_header("$strsearch", "$site->fullname" , $navigation, "", "", true, "&nbsp;", navmenu($site));
+
+        $PAGE->navbar->add($strsearch, new moodle_url($CFG->wwwroot.'/search/index.php'));
+        $PAGE->navbar->add($strquery, new moodle_url($CFG->wwwroot.'/search/stats.php'));
+        $PAGE->navbar->add(get_string('runindexer','search'));
+        $PAGE->set_title($strsearch);
+        $PAGE->set_heading($site->fullname);
+        echo $OUTPUT->header();
      
         mtrace("<pre>The data directory ($indexinfo->path) contains $indexinfo->filecount files, and\n"
               ."there are ".$indexinfo->dbcount." records in the <em>block_search_documents</em> table.\n"
index 55253859e319f4c388e8fc57e15211720a080027..6182fd169776ae058e2eea3879d2cbf94a81e65d 100644 (file)
     $strquery  = get_string('enteryoursearchquery', 'search');
 
     // print the header
-    $navlinks[] = array('name' => $strsearch, 'link' => "index.php", 'type' => 'misc');
-    $navlinks[] = array('name' => $strquery, 'link' => null, 'type' => 'misc');
-    $navigation = build_navigation($navlinks);
     $site = get_site();
-    print_header("$strsearch", "$site->fullname" , $navigation, '', '', true, '&nbsp;', navmenu($site));
+
+    $PAGE->navbar->add($strsearch, new moodle_url($CFG->wwwroot.'/search/index.php'));
+    $PAGE->navbar->add($strquery, new moodle_url($CFG->wwwroot.'/search/stats.php'));
+    $PAGE->set_title($strsearch);
+    $PAGE->set_heading($site->fullname);
+    echo $OUTPUT->header();
 
     if (!empty($error)){
         notice ($error);
index 995929ace32816c88f0126603beebfd4b5449454..88bc62c17c6aa1a21eed5a30ad1381e2472ff173 100644 (file)
@@ -44,11 +44,13 @@ require_once($CFG->dirroot.'/search/lib.php');
     $strsearch = get_string('search', 'search');
     $strquery  = get_string('statistics', 'search');
 
-    $navlinks[] = array('name' => $strsearch, 'link' => "index.php", 'type' => 'misc');
-    $navlinks[] = array('name' => $strquery, 'link' => null, 'type' => 'misc');
-    $navigation = build_navigation($navlinks);
     $site = get_site();
-    print_header("$strsearch", "$site->fullname" , $navigation, '', '', true, '&nbsp;', navmenu($site));
+
+    $PAGE->navbar->add($strsearch, new moodle_url($CFG->wwwroot.'/search/index.php'));
+    $PAGE->navbar->add($strquery, new moodle_url($CFG->wwwroot.'/search/stats.php'));
+    $PAGE->set_title($strsearch);
+    $PAGE->set_heading($site->fullname);
+    echo $OUTPUT->header();
 
 /// keep things pretty, even if php5 isn't available