From: Mikael Nordfeldth Date: Wed, 1 Jan 2014 19:30:30 +0000 (+0100) Subject: updating prepare and handle X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=915d329b5a17ac9c4e582ff55672037072f73c32;hp=4ab56f34dd05ce351bcc91c0533d7597a00f3605;p=quix0rs-gnu-social.git updating prepare and handle --- diff --git a/actions/shownotice.php b/actions/shownotice.php index 6a026d2d36..1f92978062 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -70,7 +70,7 @@ class ShownoticeAction extends Action * * @return success flag */ - function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); if ($this->boolean('ajax')) { @@ -117,16 +117,16 @@ class ShownoticeAction extends Action * * @return Notice */ - function getNotice() + protected function getNotice() { $id = $this->arg('notice'); $notice = Notice::getKV('id', $id); - if (empty($notice)) { + if (!$notice instanceof Notice) { // Did we used to have it, and it got deleted? $deleted = Deleted_notice::getKV($id); - if (!empty($deleted)) { + if ($deleted instanceof Deleted_notice) { // TRANS: Client error displayed trying to show a deleted notice. $this->clientError(_('Notice deleted.'), 410); } else { @@ -211,9 +211,9 @@ class ShownoticeAction extends Action * * @return void */ - function handle($args) + protected function handle() { - parent::handle($args); + parent::handle(); if ($this->boolean('ajax')) { $this->showAjax();