X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2Factions%2Fqnaclosequestion.php;h=1ef5063a025741046493b0f4ee948e9d9cbf6f8a;hb=12588b1cf73fad7d0a76a29a46ec355150eaa54e;hp=a8607faa9f8a0bf28169e6d990391ab7bc6495dc;hpb=0dbdcf2936a00282114f1368ead2f5edebc6ae61;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/actions/qnaclosequestion.php b/plugins/QnA/actions/qnaclosequestion.php index a8607faa9f..1ef5063a02 100644 --- a/plugins/QnA/actions/qnaclosequestion.php +++ b/plugins/QnA/actions/qnaclosequestion.php @@ -80,8 +80,8 @@ class QnaclosequestionAction extends Action $this->user = common_current_user(); if (empty($this->user)) { - // TRANS: Client exception thrown trying to close a question when not logged in throw new ClientException( + // TRANS: Client exception thrown trying to close a question when not logged in _m("You must be logged in to close a question."), 403 ); @@ -128,13 +128,12 @@ class QnaclosequestionAction extends Action */ function closeQuestion() { - $user = common_current_user(); try { - if ($user->id != $this->question->profile_id) { - throw new Exception(_m('You didn\'t ask this question.')); + // TRANS: Exception thrown trying to close another user's question. + throw new Exception(_m('You did not ask this question.')); } $orig = clone($this->question);