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

Change subject: Fix extension Push failing tests
......................................................................


Fix extension Push failing tests

Extension Push failing tests due to missing apihelp messages

Bug: T155030
Change-Id: I31192102b84f415393e4093d4b9ab924dd24e32f
---
M api/ApiPush.php
M api/ApiPushImages.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 42 insertions(+), 28 deletions(-)

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



diff --git a/api/ApiPush.php b/api/ApiPush.php
index 43da2cb..5d43eae 100644
--- a/api/ApiPush.php
+++ b/api/ApiPush.php
@@ -392,23 +392,22 @@
                );
        }
 
-       public function getParamDescription() {
-               return array(
-                       'page' => 'The names of the page to push. Delimitered 
by |',
-                       'targets' => 'The urls of the wikis to push to. 
Delimitered by |',
-               );
-       }
-
-       public function getDescription() {
-               return array(
-                       'Pushes the content of one ore more pages to one or 
more target wikis.'
-               );
-       }
-
+       /*
+       * @deprecated since MediaWiki core 1.25
+       */
        protected function getExamples() {
                return array(
                        'api.php?action=push&page=Main 
page&targets=http://en.wikipedia.org/w',
                );
        }
 
+       /**
+       * @see ApiBase::getExamplesMessages()
+       */
+       protected function getExamplesMessages() {
+               return array(
+                       'action=push&page=Main 
page&targets=http://en.wikipedia.org/w'
+                               => 'apihelp-push-example',
+               );
+       }
 }
diff --git a/api/ApiPushImages.php b/api/ApiPushImages.php
index 4f9f733..c7c7cc4 100644
--- a/api/ApiPushImages.php
+++ b/api/ApiPushImages.php
@@ -344,23 +344,22 @@
                );
        }
 
-       public function getParamDescription() {
-               return array(
-                       'images' => 'The names of the images to push. 
Delimitered by |',
-                       'targets' => 'The urls of the wikis to push to. 
Delimitered by |',
-               );
-       }
-
-       public function getDescription() {
-               return array(
-                       'Pushes the content of one ore more pages to one or 
more target wikis.'
-               );
-       }
-
+       /*
+       * @deprecated since MediaWiki core 1.25
+       */
        protected function getExamples() {
                return array(
                        
'api.php?action=pushimages&images=File:Foo.bar&targets=http://en.wikipedia.org/w',
                );
        }
 
+       /**
+       * @see ApiBase::getExamplesMessages()
+       */
+       protected function getExamplesMessages() {
+               return array(
+                       
'action=pushimages&images=File:Foo.bar&targets=http://en.wikipedia.org/w'
+                               => 'apihelp-pushimages-example',
+               );
+       }
 }
diff --git a/i18n/en.json b/i18n/en.json
index 65ecfad..f507507 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -81,5 +81,13 @@
        "push-special-pushing-file": "$1: Pushing file $2...",
        "push-special-return": "Push more pages",
        "push-api-err-nocurl": "cURL is not installed.\nSet 
$egPushDirectFileUploads to false on public wikis, or install cURL for private 
wikis",
-       "push-api-err-nofilesupport": "The local MediaWiki does not have 
support for posting files.\nOn public wikis, set $egPushDirectFileUploads to 
false.\nOn private wikis, apply the patch linked from the Push documentation or 
update MediaWiki itself."
+       "push-api-err-nofilesupport": "The local MediaWiki does not have 
support for posting files.\nOn public wikis, set $egPushDirectFileUploads to 
false.\nOn private wikis, apply the patch linked from the Push documentation or 
update MediaWiki itself.",
+       "apihelp-push-description": "Pushes the content of one ore more pages 
to one or more target wikis.",
+       "apihelp-push-param-page": "The names of the page to push.",
+       "apihelp-push-param-targets": "The urls of the wikis to push to.",
+       "apihelp-push-example": "Push page 'Main page' to the English 
Wikipedia.",
+       "apihelp-pushimages-description": "Pushes the content of one ore more 
pages to one or more target wikis.",
+       "apihelp-pushimages-param-images": "The names of the images to push.",
+       "apihelp-pushimages-param-targets": "The urls of the wikis to push to.",
+       "apihelp-pushimages-example": "Push file 'Foo.bar' to the English 
Wikipedia."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 9611d64..3ab5db2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -90,5 +90,13 @@
        "push-special-pushing-file": "Parameters:\n* $1 - page name\n* $2 - 
file name",
        "push-special-return": "Used as link text",
        "push-api-err-nocurl": "{{doc-important|Do not translate 
\"<code>$egPushDirectFileUploads</code>\".}}",
-       "push-api-err-nofilesupport": "{{doc-important|Do not translate 
\"<code>$egPushDirectFileUploads</code>\".}}"
+       "push-api-err-nofilesupport": "{{doc-important|Do not translate 
\"<code>$egPushDirectFileUploads</code>\".}}",
+       "apihelp-push-description": "{{doc-apihelp-description|push}}",
+       "apihelp-push-param-page": "{{doc-apihelp-param|push|page}}",
+       "apihelp-push-param-targets": "{{doc-apihelp-param|push|targets}}",
+       "apihelp-push-example": "{{doc-apihelp-example|push}}",
+       "apihelp-pushimages-description": 
"{{doc-apihelp-description|pushimages}}",
+       "apihelp-pushimages-param-images": 
"{{doc-apihelp-param|pushimages|images}}",
+       "apihelp-pushimages-param-targets": 
"{{doc-apihelp-param|pushimages|targets}}",
+       "apihelp-pushimages-example": "{{doc-apihelp-example|pushimages}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31192102b84f415393e4093d4b9ab924dd24e32f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Push
Gerrit-Branch: master
Gerrit-Owner: DatGuy <datguyst...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Nemo bis <federicol...@tiscali.it>
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