diff options
author | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
commit | 78fc9483d4d1fde4561905edf6594b86c4dc374e (patch) | |
tree | 7172cabba4c36bb3a7bd00a78ab09f1791a9a60c /lib/subs.php | |
parent | 75b11527c7efb1d3d9c7d53b99d80480ce06a9f5 (diff) | |
parent | 3536f01258dc43bee764c98fbdda5a6f1df7bcb2 (diff) |
Merge branch '0.9.x' into testing
Diffstat (limited to 'lib/subs.php')
-rw-r--r-- | lib/subs.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/subs.php b/lib/subs.php index 2fc3160de..4b6b03967 100644 --- a/lib/subs.php +++ b/lib/subs.php @@ -127,6 +127,12 @@ function subs_unsubscribe_to($user, $other) if (!$user->isSubscribed($other)) return _('Not subscribed!'); + // Don't allow deleting self subs + + if ($user->id == $other->id) { + return _('Couldn\'t delete self-subscription.'); + } + $sub = DB_DataObject::factory('subscription'); $sub->subscriber = $user->id; |