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

Change subject: Add 'options' param to allowed params 
inBSApiWikiSubPageTreeStore
......................................................................


Add 'options' param to allowed params inBSApiWikiSubPageTreeStore

Param options is expected but not added to allowed params causing crash

Needs cherry-picking to REL1_23

Change-Id: If9fc2743d1ce8bb02ed4746ad5f8e0ea040c9a00
---
M i18n/api/de.json
M i18n/api/en.json
M i18n/api/qqq.json
M includes/api/BSApiWikiSubPageTreeStore.php
4 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Pwirth: Looks good to me, approved
  Mglaser: Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/i18n/api/de.json b/i18n/api/de.json
index a807f09..4113b56 100644
--- a/i18n/api/de.json
+++ b/i18n/api/de.json
@@ -40,6 +40,7 @@
        "apihelp-bs-ping-tasks-description": "Ping-Aufgabe, die den 
kontinuierlichen Austausch von Daten ermöglicht.",
        "apihelp-bs-wikisubpage-treestore-description": "Listet die Unterseiten 
einer bestimmten Wikiseite auf",
        "apihelp-bs-wikisubpage-treestore-param-node": "Der Titel der Wikiseite 
einschließlich Namensraumpräfix",
+       "apihelp-bs-wikisubpage-treestore-param-options": "Liste der Optionen",
        "apihelp-bs-upload-license-store-description": "Listet alle verfügbaren 
Lizenzen für das Hochladen einer Datei auf",
        "bs-wikipage-tasks-error-page-read-not-allowed": "Du bist nicht 
berechtigt, die Seite „$1“ zu lesen.",
        "bs-wikipage-tasks-error-nothingtoremove": "Es sind keine Kategorien 
zum Entfernen vorhanden.",
diff --git a/i18n/api/en.json b/i18n/api/en.json
index 2a63e71..49e5b44 100644
--- a/i18n/api/en.json
+++ b/i18n/api/en.json
@@ -49,6 +49,7 @@
        "apihelp-bs-wikisubpage-treestore-description": "Lists the subpages of 
a specific wikipage",
        "apihelp-bs-wikisubpage-treestore-summary": "Lists the subpages of a 
specific wikipage",
        "apihelp-bs-wikisubpage-treestore-param-node": "The prefixed title of 
the wikipage ",
+       "apihelp-bs-wikisubpage-treestore-param-options": "List of options",
        "apihelp-bs-upload-license-store-description": "Lists all available 
licences for a file upload",
        "apihelp-bs-upload-license-store-summary": "Lists all available 
licences for a file upload",
        "bs-wikipage-tasks-error-page-read-not-allowed": "You are not allowed 
to read page '$1'.",
diff --git a/i18n/api/qqq.json b/i18n/api/qqq.json
index 8f224ab..c1e88df 100644
--- a/i18n/api/qqq.json
+++ b/i18n/api/qqq.json
@@ -51,6 +51,7 @@
        "apihelp-bs-wikisubpage-treestore-description": 
"{{doc-apihelp-description|bs-wikisubpage-treestore}}",
        "apihelp-bs-wikisubpage-treestore-summary": 
"{{doc-apihelp-summary|bs-wikisubpage-treestore}}",
        "apihelp-bs-wikisubpage-treestore-param-node": 
"{{doc-apihelp-param|bs-wikisubpage-treestore|node}}",
+       "apihelp-bs-wikisubpage-treestore-param-options": 
"{{doc-apihelp-param|bs-wikisubpage-treestore|options}}",
        "apihelp-bs-upload-license-store-description": 
"{{doc-apihelp-description|bs-upload-license-store}}",
        "apihelp-bs-upload-license-store-summary": 
"{{doc-apihelp-summary|bs-upload-license-store}}",
        "bs-wikipage-tasks-error-page-read-not-allowed": "An error message that 
occurs if a user is not allowed to read page with name '$1'.\n\nParameters:\n* 
$1 - a page title",
diff --git a/includes/api/BSApiWikiSubPageTreeStore.php 
b/includes/api/BSApiWikiSubPageTreeStore.php
index d8259b1..88790b2 100644
--- a/includes/api/BSApiWikiSubPageTreeStore.php
+++ b/includes/api/BSApiWikiSubPageTreeStore.php
@@ -31,6 +31,12 @@
                                ApiBase::PARAM_TYPE => 'string',
                                ApiBase::PARAM_DFLT => '',
                                ApiBase::PARAM_HELP_MSG => 
'apihelp-bs-wikisubpage-treestore-param-node',
+                       ),
+                       'options' => array(
+                               ApiBase::PARAM_TYPE => 'string',
+                               ApiBase::PARAM_DFLT => '{}',
+                               ApiBase::PARAM_REQUIRED => false,
+                               ApiBase::PARAM_HELP_MSG => 
'apihelp-bs-wikisubpage-treestore-param-options',
                        )
                );
        }
@@ -41,7 +47,7 @@
         * @param array $aOptions
         * @return stdClass[]
         */
-       protected function makeNamespaceNodes( $sQuery, $aOptions ) {
+       protected function makeNamespaceNodes( $sQuery, $aOptions = [] ) {
                $aNamespaceIds = $this->getLanguage()->getNamespaceIds();
                $aDataSets = array();
                foreach( $aNamespaceIds as $iNamespaceId ) {
@@ -80,7 +86,7 @@
         * @param array $aOptions
         * @return stdClass[]
         */
-       protected function makeRootPageNodes( $sNamespacePrefix, $sQuery, 
$aOptions ) {
+       protected function makeRootPageNodes( $sNamespacePrefix, $sQuery, 
$aOptions = [] ) {
                $aDataSets = array();
 
                $oDummyTitle = Title::newFromText( $sNamespacePrefix.':X' );
@@ -113,7 +119,7 @@
         * @param array $aOptions
         * @return array of objects
         */
-       protected function makePageNodes( $oParent, $sQuery, $aOptions ) {
+       protected function makePageNodes( $oParent, $sQuery, $aOptions = [] ) {
                $aDataSets = array();
 
                $res = $this->getDB()->select(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9fc2743d1ce8bb02ed4746ad5f8e0ea040c9a00
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to