jenkins-bot has submitted this change and it was merged.

Change subject: Simplify RevisionActionPermissions::isAllowedAny() a little
......................................................................


Simplify RevisionActionPermissions::isAllowedAny() a little

Change-Id: I0f0db4118913b88b743e4beccea083b140fdc824
---
M includes/RevisionActionPermissions.php
1 file changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/includes/RevisionActionPermissions.php 
b/includes/RevisionActionPermissions.php
index 6ba2090..ed0a7fa 100644
--- a/includes/RevisionActionPermissions.php
+++ b/includes/RevisionActionPermissions.php
@@ -104,18 +104,14 @@
                $actions = func_get_args();
                // Pull $revision out of the actions list
                array_shift( $actions );
-               $allowed = false;
 
                foreach ( $actions as $action ) {
-                       $allowed |= $this->isAllowed( $revision, $action );
-
-                       // as soon as we've found one that is allowed, break
-                       if ( $allowed ) {
-                               break;
+                       if ( $this->isAllowed( $revision, $action ) ) {
+                               return true;
                        }
                }
 
-               return $allowed;
+               return false;
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f0db4118913b88b743e4beccea083b140fdc824
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to