diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-08 11:47:50 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-08 11:47:50 -0700 |
commit | aa02f6020e16f722d5194ad97e66a57ab1d8c29c (patch) | |
tree | 6a820222c3984586ede7ec152288aa70d4124b29 /actions | |
parent | 6c959c83ce528614f6e0837cf022d1a67b64b73c (diff) | |
parent | 67dc78b6218bce86f6b783c34e02775f5b8cb21f (diff) |
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/deletenotice.php | 11 | ||||
-rw-r--r-- | actions/hostmeta.php | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/actions/deletenotice.php b/actions/deletenotice.php index 68c43040b..2879faa5d 100644 --- a/actions/deletenotice.php +++ b/actions/deletenotice.php @@ -45,6 +45,12 @@ class DeletenoticeAction extends Action parent::prepare($args); $this->user = common_current_user(); + + if (!$this->user) { + common_user_error(_('Not logged in.')); + exit; + } + $notice_id = $this->trimmed('notice'); $this->notice = Notice::staticGet($notice_id); @@ -63,10 +69,7 @@ class DeletenoticeAction extends Action { parent::handle($args); - if (!common_logged_in()) { - common_user_error(_('Not logged in.')); - exit; - } else if ($this->notice->profile_id != $this->user_profile->id && + if ($this->notice->profile_id != $this->user_profile->id && !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) { common_user_error(_('Can\'t delete this notice.')); exit; diff --git a/actions/hostmeta.php b/actions/hostmeta.php index be73665f2..b7beee5a8 100644 --- a/actions/hostmeta.php +++ b/actions/hostmeta.php @@ -24,7 +24,9 @@ * @author Craig Andrews <candrews@integralblue.com> */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class HostMetaAction extends Action { |