X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2Factions%2Fqnanewanswer.php;h=e565b3e93ade336e0e559ad875f61cdcd820478e;hb=9758134d1afb44be2376efb8a560d3ce02d89fd3;hp=dbab6c5eefa6692dfda3cdfc0b4bdd6808d7b62c;hpb=c97048d01bea468e0cf8865b60c3c250b4515c39;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/actions/qnanewanswer.php b/plugins/QnA/actions/qnanewanswer.php index dbab6c5eef..e565b3e93a 100644 --- a/plugins/QnA/actions/qnanewanswer.php +++ b/plugins/QnA/actions/qnanewanswer.php @@ -80,8 +80,8 @@ class QnanewanswerAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to answer a question while not logged in. throw new ClientException( + // TRANS: Client exception thrown trying to answer a question while not logged in. _m("You must be logged in to answer to a question."), 403 ); @@ -96,8 +96,8 @@ class QnanewanswerAction extends Action $this->question = QnA_Question::staticGet('id', $id); if (empty($this->question)) { - // TRANS: Client exception thrown trying to respond to a non-existing question. throw new ClientException( + // TRANS: Client exception thrown trying to respond to a non-existing question. _m('Invalid or missing question.'), 404 ); @@ -162,7 +162,6 @@ class QnanewanswerAction extends Action $this->elementStart('body'); - $nli = new NoticeAnswerListItem($notice, $this, $this->question, $answer); $nli->show(); @@ -278,7 +277,6 @@ class QnanewanswerAction extends Action $this->msg = $msg; $this->showPage(); } - } class NoticeAnswerListItem extends NoticeListItem @@ -344,10 +342,10 @@ class NoticeAnswerListItem extends NoticeListItem $form = new QnashowanswerForm($this->out, $this->answer); $form->show(); } else { + // TRANS: Error message displayed when an answer has no content. $out->text(_m('Answer data is missing.')); } $this->out->elementEnd('p'); } - -} \ No newline at end of file +}