Revert r64436, r64437, r64508 per CR r64436
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 9 Jul 2010 09:46:05 +0000 (09:46 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 9 Jul 2010 09:46:05 +0000 (09:46 +0000)
RELEASE-NOTES
includes/AutoLoader.php
includes/api/ApiGo.php [deleted file]
includes/api/ApiMain.php

index a648877..805ee6e 100644 (file)
@@ -238,7 +238,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22738) Allow filtering by action type on query=logevent.
 * (bug 22764) uselang parameter for action=parse.
 * (bug 22944) API: watchlist options are inconsistent.
-* (bug 22339) "Go" result should be available through the API.
 * (bug 22868) don't list infinite block expiry date as "now" in API logevents.
 * (bug 22290) prop=revisions now outputs "comment" field even when comment.
   is empty, for consistency with list=recentchanges.
index 0f0d36e..64f57e8 100644 (file)
@@ -262,7 +262,6 @@ $wgAutoloadLocalClasses = array(
        'ApiFormatWddx' => 'includes/api/ApiFormatWddx.php',
        'ApiFormatXml' => 'includes/api/ApiFormatXml.php',
        'ApiFormatYaml' => 'includes/api/ApiFormatYaml.php',
-       'ApiGo' => 'includes/api/ApiGo.php',
        'ApiHelp' => 'includes/api/ApiHelp.php',
        'ApiImport' => 'includes/api/ApiImport.php',
        'ApiImportReporter' => 'includes/api/ApiImport.php',
diff --git a/includes/api/ApiGo.php b/includes/api/ApiGo.php
deleted file mode 100644 (file)
index ca53631..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-/**
- * Created on Mar 30, 2010
- * API for MediaWiki 1.8+
- *
- * Copyright © 2010 Matthew Britton <Firstname>.<Lastname>@btinternet.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-       // Eclipse helper - will be ignored in production
-       require_once( "ApiBase.php" );
-}
-
-/**
-* API module to determine the result of a "Go" search
-*
- * @ingroup API
- */
-class ApiGo extends ApiBase {
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
-       public function execute() {
-               $params = $this->extractRequestParams();
-               $text = $params['text'];
-
-               if ( is_null( $text ) ) {
-                       $this->dieUsageMsg( array( 'missingparam', 'text' ) );
-               }
-               
-               // Strip underscores
-               $text = str_replace( '_', ' ', $text );
-               
-               $nearMatch = SearchEngine::getNearMatch( $text );
-
-               $this->getResult()->addValue( null, $this->getModuleName(), array( 'text' => $text, 'result' => $nearMatch ) );
-       }
-
-       public function mustBePosted() {
-               return false;
-       }
-
-       public function isWriteMode() {
-               return false;
-       }
-
-       public function getAllowedParams() {
-               return array(
-                       'text' => null,
-               );
-       }
-
-       public function getParamDescription() {
-               return array(
-                       'text' => 'Text to try a "Go" match for'
-               );
-       }
-
-       public function getDescription() {
-               return 'Determine the title one will be taken to by a "Go" search, if any';
-       }
-       
-       public function getPossibleErrors() {
-               return array_merge( parent::getPossibleErrors(), array(
-                       array( 'missingparam', 'text' )
-               ) );
-       }
-
-       protected function getExamples() {
-               return array(
-                       'api.php?action=go&text=Foo'
-               );
-       }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
-}
index d183939..260be90 100644 (file)
@@ -63,7 +63,6 @@ class ApiMain extends ApiBase {
                'parse' => 'ApiParse',
                'opensearch' => 'ApiOpenSearch',
                'feedwatchlist' => 'ApiFeedWatchlist',
-               'go' => 'ApiGo',
                'help' => 'ApiHelp',
                'paraminfo' => 'ApiParamInfo',