MediaWiki r6724 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r6723‎ | r6724 (on ViewVC)‎ | r6725 >
Date:09:28, 21 December 2004
Author:kateturner
Status:old
Tags:
Comment:
$wgDisableInternalSearch
Modified paths:

Diff [purge]

Index: trunk/phase3/index.php
@@ -59,8 +59,9 @@
6060 }
6161
6262 wfProfileIn( "main-action" );
 63+
6364 $search = $wgRequest->getText( 'search' );
64 -if( !is_null( $search ) && $search !== '' ) {
 65+if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) {
6566 require_once( 'includes/SpecialSearch.php' );
6667 $wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
6768 wfSpecialSearch();
Index: trunk/phase3/includes/DefaultSettings.php
@@ -980,7 +980,13 @@
981981 * Leave disabled unless you're testing it.
982982 */
983983 $wgLivePreview = false;
984 -
 984+
 985+/**
 986+ * Disable the internal MySQL-based search, to allow it to be
 987+ * implemented by an extension instead.
 988+ */
 989+$wgDisableInternalSearch = false;
 990+
985991 } else {
986992 die();
987993 }
Index: trunk/phase3/includes/SpecialPage.php
@@ -55,6 +55,11 @@
5656 $wgSpecialPages['Data'] = new SpecialPage( 'Data' );
5757 }
5858
 59+global $wgDisableInternalSearch;
 60+if( !$wgDisableInternalSearch ) {
 61+ $wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' );
 62+}
 63+
5964 $wgSpecialPages = array_merge($wgSpecialPages, array (
6065 'Wantedpages' => new SpecialPage( 'Wantedpages' ),
6166 'Shortpages' => new SpecialPage( 'Shortpages' ),
@@ -79,7 +84,6 @@
8085 'Export' => new SpecialPage( 'Export' ),
8186 'Version' => new SpecialPage( 'Version' ),
8287 'Allmessages' => new SpecialPage( 'Allmessages' ),
83 - 'Search' => new UnlistedSpecialPage( 'Search' ),
8488 'Log' => new SpecialPage( 'Log' ),
8589 'Blockip' => new SpecialPage( 'Blockip', 'block' ),
8690 'Asksql' => new SpecialPage( 'Asksql', 'asksql' ),

Status & tagging log

  • 01:56, 13 October 2010 ^demon (Talk | contribs) changed the status of r6724 [removed: new added: old]
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Support
Download
Development
Communication
Toolbox