Browse files

Fixes MDL-14325

  • Loading branch information...
1 parent 6c9af98 commit 504c188064a8e25d937ab366fd019dcc6ba02ec3 diml committed Apr 17, 2008
Showing with 36 additions and 26 deletions.
  1. +2 −1 search/indexersplash.php
  2. +2 −1 search/query.php
  3. +32 −24 search/stats.php
View
3 search/indexersplash.php
@@ -50,7 +50,8 @@
$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');
- if ($CFG->version <= 2007021541){ // 1.8 branch stable timestamp
+ // if ($CFG->version <= 2007021541){ // 1.8 branch stable timestamp NOT RELIABLE
+ if (!function_exists('build_navigation')){ // 1.8 branch stable timestamp
$navigation = '';
} else {
$navigation = build_navigation($navlinks);
View
3 search/query.php
@@ -144,7 +144,8 @@
$strsearch = get_string('search', 'search');
$strquery = get_string('enteryoursearchquery', 'search');
- if ($CFG->version < 2007032200){
+// if ($CFG->version < 2007032200){ NOT RELIABLE
+ if (!function_exists('build_navigation')){
print_header("$site->shortname: $strsearch: $strquery", "$site->fullname",
"<a href=\"index.php\">$strsearch</a> -> $strquery");
} else {
View
56 search/stats.php
@@ -1,26 +1,26 @@
<?php
- /**
- * Global Search Engine for Moodle
- *
- * @package search
- * @category core
- * @subpackage search_engine
- * @author Michael Champanis (mchampan) [cynnical@gmail.com], Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8
- * @date 2008/03/31
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- *
- * Prints some basic statistics about the current index.
- * Does some diagnostics if you are logged in as an administrator.
- *
- */
-
- /**
- * includes and requires
- */
- require_once('../config.php');
- require_once("{$CFG->dirroot}/search/lib.php");
-
- /// checks global search is enabled
+/**
+* Global Search Engine for Moodle
+*
+* @package search
+* @category core
+* @subpackage search_engine
+* @author Michael Champanis (mchampan) [cynnical@gmail.com], Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8
+* @date 2008/03/31
+* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+*
+* Prints some basic statistics about the current index.
+* Does some diagnostics if you are logged in as an administrator.
+*
+*/
+
+/**
+* includes and requires
+*/
+require_once('../config.php');
+require_once("{$CFG->dirroot}/search/lib.php");
+
+/// checks global search is enabled
if ($CFG->forcelogin) {
require_login();
@@ -45,8 +45,16 @@
$strsearch = get_string('search', 'search');
$strquery = get_string('statistics', 'search');
- print_header("$site->shortname: $strsearch: $strquery", "$site->fullname",
- "<a href=\"index.php\">$strsearch</a> -> $strquery");
+ if (!function_exists('build_navigation')){
+ print_header("$site->shortname: $strsearch: $strquery", "$site->fullname",
+ "<a href=\"index.php\">$strsearch</a> -> $strquery");
+ } else {
+ $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));
+ }
/// keep things pretty, even if php5 isn't available

0 comments on commit 504c188

Please sign in to comment.