Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/125947

Change subject: API: Document 'flowaction' parameter values for list=flow
......................................................................

API: Document 'flowaction' parameter values for list=flow

Change-Id: I11f2aea2b6160b85a5879450e090b1b356e9aaaf
---
M includes/api/ApiQueryFlow.php
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/47/125947/1

diff --git a/includes/api/ApiQueryFlow.php b/includes/api/ApiQueryFlow.php
index 7c43017..6273601 100644
--- a/includes/api/ApiQueryFlow.php
+++ b/includes/api/ApiQueryFlow.php
@@ -60,6 +60,7 @@
                        ),
                        'action' => array(
                                ApiBase::PARAM_DFLT => 'view',
+                               ApiBase::PARAM_TYPE => 
$this->getReadOnlyFlowActions(),
                        ),
                        'params' => array(
                                ApiBase::PARAM_DFLT => '{}',
@@ -67,6 +68,18 @@
                );
        }
 
+       private function getReadOnlyFlowActions() {
+               global $wgFlowActions;
+               $readOnly = array();
+               foreach( $wgFlowActions as $action => $info ) {
+                       if ( $info['performs-writes'] === false ) {
+                               $readOnly[] = $action;
+                       }
+               }
+
+               return $readOnly;
+       }
+
        public function getDescription() {
                return 'Shim to query to the internal Flow API.  This API is 
not suggested ' .
                        'for external use and will soon be superseded by an 
integrated mediawiki api.';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11f2aea2b6160b85a5879450e090b1b356e9aaaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to