jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/361060 )
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
(cherry picked from commit 163c01e7b73e9b1eff0d6f5c5de64de778e75761)
---
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:
Mglaser: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/api/de.json b/i18n/api/de.json
index 4d627ad..acc6237 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 358f43b..b834a54 100644
--- a/i18n/api/en.json
+++ b/i18n/api/en.json
@@ -38,6 +38,7 @@
"apihelp-bs-ping-tasks-description": "Ping task that provides
continuous exchange of data",
"apihelp-bs-wikisubpage-treestore-description": "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",
"bs-wikipage-tasks-error-page-read-not-allowed": "You are not allowed
to read page '$1'.",
"bs-wikipage-tasks-error-nothingtoremove": "There are no categories to
remove",
diff --git a/i18n/api/qqq.json b/i18n/api/qqq.json
index 48059c3..e247195 100644
--- a/i18n/api/qqq.json
+++ b/i18n/api/qqq.json
@@ -39,6 +39,7 @@
"apihelp-bs-ping-tasks-description":
"{{doc-apihelp-description|bs-ping-tasks}}",
"apihelp-bs-wikisubpage-treestore-description":
"{{doc-apihelp-description|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}}",
"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",
"bs-wikipage-tasks-error-nothingtoremove": "This error message occurs
if empty array is passed to task_removeCategories method",
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/361060
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If9fc2743d1ce8bb02ed4746ad5f8e0ea040c9a00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits