diff --git a/search/indexersplash.php b/search/indexersplash.php index a21f56951ab..43755ae2412 100644 --- a/search/indexersplash.php +++ b/search/indexersplash.php @@ -50,7 +50,8 @@ require_once("$CFG->dirroot/search/lib.php"); $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); diff --git a/search/query.php b/search/query.php index 50a222daeee..51058edb2af 100644 --- a/search/query.php +++ b/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", "$strsearch -> $strquery"); } else { diff --git a/search/stats.php b/search/stats.php index 187b44df0aa..8412241ef27 100644 --- a/search/stats.php +++ b/search/stats.php @@ -1,26 +1,26 @@ 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", - "$strsearch -> $strquery"); + if (!function_exists('build_navigation')){ + print_header("$site->shortname: $strsearch: $strquery", "$site->fullname", + "$strsearch -> $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, " ", navmenu($site)); + } /// keep things pretty, even if php5 isn't available