Skip to content

Commit

Permalink
search MDL-19822 Upgraded print_header and build_navigation calls to …
Browse files Browse the repository at this point in the history
…OUTPUT/PAGE equivilants
  • Loading branch information
samhemelryk committed Sep 4, 2009
1 parent 609adb6 commit 766ccfb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
12 changes: 7 additions & 5 deletions search/indexersplash.php
Expand Up @@ -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("<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"
Expand Down
10 changes: 6 additions & 4 deletions search/query.php
Expand Up @@ -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, '&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);
Expand Down
10 changes: 6 additions & 4 deletions search/stats.php
Expand Up @@ -44,11 +44,13 @@
$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

Expand Down

0 comments on commit 766ccfb

Please sign in to comment.