| Index: trunk/phase3/index.php |
| — | — | @@ -59,8 +59,9 @@ |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | wfProfileIn( "main-action" ); |
| | 63 | + |
| 63 | 64 | $search = $wgRequest->getText( 'search' ); |
| 64 | | -if( !is_null( $search ) && $search !== '' ) { |
| | 65 | +if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { |
| 65 | 66 | require_once( 'includes/SpecialSearch.php' ); |
| 66 | 67 | $wgTitle = Title::makeTitle( NS_SPECIAL, "Search" ); |
| 67 | 68 | wfSpecialSearch(); |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -980,7 +980,13 @@ |
| 981 | 981 | * Leave disabled unless you're testing it. |
| 982 | 982 | */ |
| 983 | 983 | $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 | + |
| 985 | 991 | } else { |
| 986 | 992 | die(); |
| 987 | 993 | } |
| Index: trunk/phase3/includes/SpecialPage.php |
| — | — | @@ -55,6 +55,11 @@ |
| 56 | 56 | $wgSpecialPages['Data'] = new SpecialPage( 'Data' ); |
| 57 | 57 | } |
| 58 | 58 | |
| | 59 | +global $wgDisableInternalSearch; |
| | 60 | +if( !$wgDisableInternalSearch ) { |
| | 61 | + $wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' ); |
| | 62 | +} |
| | 63 | + |
| 59 | 64 | $wgSpecialPages = array_merge($wgSpecialPages, array ( |
| 60 | 65 | 'Wantedpages' => new SpecialPage( 'Wantedpages' ), |
| 61 | 66 | 'Shortpages' => new SpecialPage( 'Shortpages' ), |
| — | — | @@ -79,7 +84,6 @@ |
| 80 | 85 | 'Export' => new SpecialPage( 'Export' ), |
| 81 | 86 | 'Version' => new SpecialPage( 'Version' ), |
| 82 | 87 | 'Allmessages' => new SpecialPage( 'Allmessages' ), |
| 83 | | - 'Search' => new UnlistedSpecialPage( 'Search' ), |
| 84 | 88 | 'Log' => new SpecialPage( 'Log' ), |
| 85 | 89 | 'Blockip' => new SpecialPage( 'Blockip', 'block' ), |
| 86 | 90 | 'Asksql' => new SpecialPage( 'Asksql', 'asksql' ), |