jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331992 )

Change subject: Fix extension failing tests due to missing apihelp
......................................................................


Fix extension failing tests due to missing apihelp

Extension WebPlatformSearchAutocomplete failing tests due to missing
apihelp messages.

Bug: T155033
Change-Id: I8bd10fa4513894ead43ba754fa519d0e282d196c
---
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiWebplatformSearch.php
3 files changed, 22 insertions(+), 15 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index 7a3e8d1..abb343d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,5 +4,8 @@
                        "Robert Vogel"
                ]
        },
-       "webplatformsearchautocomplete-desc": "Provides customized autocomplete 
functionality for webplatform.org search"
+       "webplatformsearchautocomplete-desc": "Provides customized autocomplete 
functionality for webplatform.org search",
+       "apihelp-webplatformsearch-description": "Search the webplatform.org 
wiki",
+       "apihelp-webplatformsearch-param-term": "Search string",
+       "apihelp-webplatformsearch-example": "Show autocomplete result of 
typing 'Te'"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 026ef72..dab9e15 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,5 +5,8 @@
                        "Shirayuki"
                ]
        },
-       "webplatformsearchautocomplete-desc": "{{desc|name=Web Platform Search 
Autocomplete|url=http://www.hallowelt.biz}}";
+       "webplatformsearchautocomplete-desc": "{{desc|name=Web Platform Search 
Autocomplete|url=http://www.hallowelt.biz}}";,
+       "apihelp-webplatformsearch-description": 
"{{doc-apihelp-description|webplatformsearch}}",
+       "apihelp-webplatformsearch-param-term": 
"{{doc-apihelp-param|webplatformsearch|term}}",
+       "apihelp-webplatformsearch-example": 
"{{doc-apihelp-example|webplatformsearch}}"
 }
diff --git a/includes/api/ApiWebplatformSearch.php 
b/includes/api/ApiWebplatformSearch.php
index 1214e91..cf3263b 100644
--- a/includes/api/ApiWebplatformSearch.php
+++ b/includes/api/ApiWebplatformSearch.php
@@ -1,7 +1,5 @@
 <?php
 /**
- *
- *
  * Created on Sep 17, 2012
  *
  * API module for MediaWiki's WebPlatformSearchAutocomplete extension
@@ -47,7 +45,7 @@
                // Open search results may be stored for a very long time
                $this->getMain()->setCacheMaxAge( $wgSearchSuggestCacheExpiry );
                $this->getMain()->setCacheMode( 'public' );
-               
+
                $db = $this->getDB( DB_SLAVE );
                $res = $db->select(
                        'page',
@@ -88,22 +86,25 @@
                );
        }
 
-       public function getParamDescription() {
-               return array(
-                       'term' => 'Search string'
-               );
-       }
-
-       public function getDescription() {
-               return 'Search the webplatform.org wiki';
-       }
-
+       /**
+       * @deprecated since MediaWiki core 1.25
+       */
        public function getExamples() {
                return array(
                        'api.php?action=webplatformsearch&term=Te'
                );
        }
 
+       /**
+       * @see ApiBase::getExamplesMessages()
+       */
+       protected function getExamplesMessages() {
+               return array(
+                       'action=webplatformsearch&term=Te'
+                               => 'apihelp-webplatformsearch-example'
+               );
+       }
+
        public function getHelpUrls() {
                return 'https://www.webplatform.org';
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/331992
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bd10fa4513894ead43ba754fa519d0e282d196c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/WebPlatformSearchAutocomplete
Gerrit-Branch: master
Gerrit-Owner: DatGuy <datguyst...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Phantom42 <nikita...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to