From c5de3262312f814bc44e596d9031c2df22420e27 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 28 Dec 2009 10:42:55 -0800 Subject: events for blocking a user --- actions/block.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actions/block.php') diff --git a/actions/block.php b/actions/block.php index 71a34e087..5fae45dff 100644 --- a/actions/block.php +++ b/actions/block.php @@ -156,7 +156,12 @@ class BlockAction extends ProfileFormAction { $cur = common_current_user(); - $result = $cur->block($this->profile); + if (Event::handle('StartBlockProfile', array($cur, $this->profile))) { + $result = $cur->block($this->profile); + if ($result) { + Event::handle('EndBlockProfile', array($cur, $this->profile)); + } + } if (!$result) { $this->serverError(_('Failed to save block information.')); @@ -164,4 +169,3 @@ class BlockAction extends ProfileFormAction } } } - -- cgit v1.2.3-54-g00ecf