From ef3d487ae02a6333b4e0f0714599ff1c3b7b729e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 8 Dec 2008 13:57:28 -0500 Subject: enable block API darcs-hash:20081208185728-5ed1f-8d5f6be6decfbb50deb4ca50bee13404d0c51b72.gz --- actions/unblock.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'actions/unblock.php') diff --git a/actions/unblock.php b/actions/unblock.php index 192beaab5..d60cc7088 100644 --- a/actions/unblock.php +++ b/actions/unblock.php @@ -67,20 +67,10 @@ class UnblockAction extends Action { $cur = common_current_user(); - # Get the block record - - $block = Profile_block::get($cur->id, $this->profile->id); - - if (!$block) { - $this->client_error(_('That user is not blocked!')); - return; - } - - $result = $block->delete(); + $result = $cur->unblock($this->profile); if (!$result) { - common_log_db_error($block, 'DELETE', __FILE__); - $this->server_error(_('Could not delete block record.')); + $this->server_error(_('Error removing the block.')); return; } -- cgit v1.2.3-54-g00ecf