Merge "(bug 41330) Default to the current year in the history page filter form"
[lhc/web/wiklou.git] / includes / api / ApiOpenSearch.php
index 19741b0..6403bd6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on Oct 13, 2006
  *
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.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
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       // Eclipse helper - will be ignored in production
-       require_once( "ApiBase.php" );
-}
-
 /**
  * @ingroup API
  */
@@ -50,7 +45,7 @@ class ApiOpenSearch extends ApiBase {
                $namespaces = $params['namespace'];
                $suggest = $params['suggest'];
 
-               // MWSuggest or similar hit
+               // Some script that was loaded regardless of wgEnableOpenSearchSuggest, likely cached.
                if ( $suggest && !$wgEnableOpenSearchSuggest ) {
                        $searches = array();
                } else {
@@ -60,7 +55,7 @@ class ApiOpenSearch extends ApiBase {
 
                        $searches = PrefixSearch::titleSearch( $search, $limit,
                                $namespaces );
-                       
+
                        // if the content language has variants, try to retrieve fallback results
                        $fallbackLimit = $limit - count( $searches );
                        if ( $fallbackLimit > 0 ) {
@@ -116,16 +111,16 @@ class ApiOpenSearch extends ApiBase {
        }
 
        public function getDescription() {
-               return 'This module implements OpenSearch protocol';
+               return 'Search the wiki using the OpenSearch protocol';
        }
 
-       protected function getExamples() {
+       public function getExamples() {
                return array(
                        'api.php?action=opensearch&search=Te'
                );
        }
 
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
+       public function getHelpUrls() {
+               return 'https://www.mediawiki.org/wiki/API:Opensearch';
        }
 }