summaryrefslogtreecommitdiff
path: root/actions/unblock.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-28 15:49:14 -0800
committerEvan Prodromou <evan@status.net>2009-12-28 15:49:14 -0800
commit98a579fedf36ff795e255a4b345651df0ee230bc (patch)
tree2eba012e0094cced9580523051b8ed88b6aefd6b /actions/unblock.php
parent5f6df8c0c4274e7d900335bba87341f9768e7467 (diff)
parentfa3301cf84ee0a78c4e00c7bd309de8a769fd848 (diff)
Merge branch 'master' into 0.9.x
Diffstat (limited to 'actions/unblock.php')
-rw-r--r--actions/unblock.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/actions/unblock.php b/actions/unblock.php
index c60458cd3..0f63e1dae 100644
--- a/actions/unblock.php
+++ b/actions/unblock.php
@@ -71,8 +71,17 @@ class UnblockAction extends ProfileFormAction
function handlePost()
{
- $cur = common_current_user();
- $result = $cur->unblock($this->profile);
+ $cur = common_current_user();
+
+ $result = false;
+
+ if (Event::handle('StartUnblockProfile', array($cur, $this->profile))) {
+ $result = $cur->unblock($this->profile);
+ if ($result) {
+ Event::handle('EndUnblockProfile', array($cur, $this->profile));
+ }
+ }
+
if (!$result) {
$this->serverError(_('Error removing the block.'));
return;