コード例 #1
0
ファイル: deleteaction.php プロジェクト: Br3nda/laconica
 function handle($args)
 {
     parent::handle($args);
     if (!common_logged_in()) {
         common_user_error(_('Not logged in.'));
         exit;
     } else {
         if ($this->notice->profile_id != $this->user_profile->id) {
             common_user_error(_('Can\'t delete this notice.'));
             exit;
         }
     }
 }
コード例 #2
0
ファイル: deletenotice.php プロジェクト: stevertiqo/StatusNet
 function handle($args)
 {
     parent::handle($args);
     if ($this->notice->profile_id != $this->user_profile->id && !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
         common_user_error(_('Can\'t delete this notice.'));
         exit;
     }
     // XXX: Ajax!
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $this->deleteNotice();
     } else {
         if ($_SERVER['REQUEST_METHOD'] == 'GET') {
             $this->showForm();
         }
     }
 }
コード例 #3
0
ファイル: deletenotice.php プロジェクト: phpsource/gnu-social
 function handle($args)
 {
     parent::handle($args);
     if ($this->notice->profile_id != $this->user_profile->id && !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) {
         // TRANS: Error message displayed trying to delete a notice that was not made by the current user.
         common_user_error(_('Cannot delete this notice.'));
         exit;
     }
     // XXX: Ajax!
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $this->deleteNotice();
     } else {
         if ($_SERVER['REQUEST_METHOD'] == 'GET') {
             $this->showForm();
         }
     }
 }
コード例 #4
0
ファイル: channel.php プロジェクト: bashrc/gnusocial-debian
 function error($user, $text)
 {
     common_user_error($text);
 }