Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/86351
Change subject: Add hooks for EchoEvent's
......................................................................
Add hooks for EchoEvent's
BeforeEchoEventInsert can be used to modify an EchoEvent
before it is created, and EchoEventInsertComplete can be
used to run stuff once it's been created.
Change-Id: I376708ac7aafc419bf87bceeff6de7de9bdc2f4e
---
M model/Event.php
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/51/86351/1
diff --git a/model/Event.php b/model/Event.php
index c820de4..5199baf 100644
--- a/model/Event.php
+++ b/model/Event.php
@@ -128,8 +128,12 @@
throw new MWException( "Invalid user parameter" );
}
+ wfRunHooks( 'BeforeEchoEventInsert', array( &$obj ) );
+
$obj->insert();
+ wfRunHooks( 'EchoEventInsertComplete', array( &$obj ) );
+
global $wgEchoUseJobQueue;
EchoNotificationController::notify( $obj, $wgEchoUseJobQueue );
--
To view, visit https://gerrit.wikimedia.org/r/86351
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I376708ac7aafc419bf87bceeff6de7de9bdc2f4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits