Robert Vogel has uploaded a new change for review.

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

Change subject: BSReview: Added hook BSReviewVoteComplete
......................................................................

BSReview: Added hook BSReviewVoteComplete

=> NEEDS cherry-pick to REL1_27 and back port to REL1_23

Change-Id: Idb4342b09cac2dd797345651fc3e1ee0064701c9
---
M Review/Review.class.php
M Review/doc/Hooks.txt
2 files changed, 23 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/04/322904/1

diff --git a/Review/Review.class.php b/Review/Review.class.php
index 07257e0..3a58f0f 100644
--- a/Review/Review.class.php
+++ b/Review/Review.class.php
@@ -1388,8 +1388,22 @@
                        );
                }
 
+               $oStatus = Status::newGood( $oReviewProcess );
+               Hooks::run( 'BSReviewVoteComplete', array(
+                       $this,
+                       $step_id,
+                       $oReviewProcess,
+                       $oTitle,
+                       $oParams,
+                       $oUser,
+                       $oStatus,
+               ));
+
+               if( $oStatus->isOK() ) {
+                       return $oStatus;
+               }
                if ( $oReviewProcess->isFinished() === false ) {
-                       return Status::newGood( $oReviewProcess );
+                       return $oStatus;
                }
 
                // Let flagged revision know that it's all goooooood (or not 
approved)
diff --git a/Review/doc/Hooks.txt b/Review/doc/Hooks.txt
index f4cf8cb..35f6594 100644
--- a/Review/doc/Hooks.txt
+++ b/Review/doc/Hooks.txt
@@ -37,6 +37,14 @@
 &$oVariable:
  &$aPrefs:
 
+'BSReviewVoteComplete':
+       $this: Review
+       $step_id: int
+       $oReviewProcess: BsReviewProcess
+       $oTitle: Title
+       $oParams: stdClass
+       $oUser: User
+       $oStatus: Status
 
 ==SpecialReview.class.php==
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb4342b09cac2dd797345651fc3e1ee0064701c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>

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

Reply via email to