search MDL-19822 Upgraded print_header and build_navigation calls to OUTPUT/PAGE equivilants

This commit is contained in:
samhemelryk 2009-09-04 07:34:39 +00:00
parent 609adb68d4
commit 766ccfbd25
3 changed files with 19 additions and 13 deletions

View file

@ -45,12 +45,14 @@
$strquery = get_string('stats'); $strquery = get_string('stats');
// print page header // 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(); $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("<pre>The data directory ($indexinfo->path) contains $indexinfo->filecount files, and\n" 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" ."there are ".$indexinfo->dbcount." records in the <em>block_search_documents</em> table.\n"

View file

@ -157,11 +157,13 @@
$strquery = get_string('enteryoursearchquery', 'search'); $strquery = get_string('enteryoursearchquery', 'search');
// print the header // 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(); $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)){ if (!empty($error)){
notice ($error); notice ($error);

View file

@ -44,11 +44,13 @@ require_once($CFG->dirroot.'/search/lib.php');
$strsearch = get_string('search', 'search'); $strsearch = get_string('search', 'search');
$strquery = get_string('statistics', '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(); $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 /// keep things pretty, even if php5 isn't available