From: samhemelryk Date: Fri, 4 Sep 2009 07:34:39 +0000 (+0000) Subject: search MDL-19822 Upgraded print_header and build_navigation calls to OUTPUT/PAGE... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=766ccfbd25c4e7b9e563a2efa5a970c53f052ad5;p=moodle.git search MDL-19822 Upgraded print_header and build_navigation calls to OUTPUT/PAGE equivilants --- diff --git a/search/indexersplash.php b/search/indexersplash.php index 916a3ef6da..94c8c29620 100644 --- a/search/indexersplash.php +++ b/search/indexersplash.php @@ -45,12 +45,14 @@ $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, " ", 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("
The data directory ($indexinfo->path) contains $indexinfo->filecount files, and\n"
               ."there are ".$indexinfo->dbcount." records in the block_search_documents table.\n"
diff --git a/search/query.php b/search/query.php
index 55253859e3..6182fd1697 100644
--- a/search/query.php
+++ b/search/query.php
@@ -157,11 +157,13 @@
     $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, ' ', 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);
diff --git a/search/stats.php b/search/stats.php
index 995929ace3..88bc62c17c 100644
--- a/search/stats.php
+++ b/search/stats.php
@@ -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, ' ', 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