diff -r 32429702305e -r c72b545f1304 plugins/SpecialSearch.php --- a/plugins/SpecialSearch.php Fri Dec 21 19:08:27 2007 -0500 +++ b/plugins/SpecialSearch.php Wed Dec 26 00:37:26 2007 -0500 @@ -20,17 +20,17 @@ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. */ -$plugins->attachHook('base_classes_initted', ' +$plugins->attachHook('session_started', ' global $paths; $paths->add_page(Array( - \'name\'=>\'Rebuild search index\', + \'name\'=>\'specialpage_search_rebuild\', \'urlname\'=>\'SearchRebuild\', \'namespace\'=>\'Special\', \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', )); $paths->add_page(Array( - \'name\'=>\'Search\', + \'name\'=>\'specialpage_search\', \'urlname\'=>\'Search\', \'namespace\'=>\'Special\', \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', @@ -40,7 +40,10 @@ function page_Special_SearchRebuild() { global $db, $session, $paths, $template, $plugins; // Common objects - if(!$session->get_permissions('mod_misc')) die_friendly('Unauthorized', '
You need to be an administrator to rebuild the search index
'); + if ( !$session->get_permissions('mod_misc') ) + { + die_friendly('Unauthorized', 'You need to be an administrator to rebuild the search index
'); + } $template->header(); @set_time_limit(0); if($paths->rebuild_search_index(true)) @@ -54,6 +57,8 @@ { global $db, $session, $paths, $template, $plugins; // Common objects global $aggressive_optimize_html; + global $lang; + $aggressive_optimize_html = false; if ( !$q = $paths->getParam(0) ) @@ -95,7 +100,7 @@ $qin = ( isset($q) ) ? str_replace('"', '\"', htmlspecialchars($q)) : ''; $search_form = ''; @@ -103,7 +108,7 @@ { $search_start = microtime_float(); - $results = perform_search($q, $warn, ( isset($_GET['match_case']) )); + $results = perform_search($q, $warn, ( isset($_GET['match_case']) ), $word_list); $warn = array_unique($warn); if ( file_exists( ENANO_ROOT . '/themes/' . $template->theme . '/search-result.tpl' ) ) @@ -122,7 +127,7 @@ {PAGE_TEXT} {PAGE_URL} - {PAGE_LENGTH} {PAGE_LENGTH_UNIT} - - Relevance: {RELEVANCE_SCORE}% + {lang:search_lbl_relevance} {RELEVANCE_SCORE}% @@ -138,22 +143,25 @@ if ( !empty($result['page_text']) ) $result['page_text'] .= '