X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2FQnAPlugin.php;h=9a05eeb0b2f60631ba72216ae50014b804e59d90;hb=62eed1e23ef641aedad0afa4f0d4cef604750d85;hp=992641b18e13684be5f888eda972e697a8e68041;hpb=c1a27922ba738f71b100a520e5db6f32985a307b;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index 992641b18e..9a05eeb0b2 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -82,13 +82,14 @@ class QnAPlugin extends MicroAppPlugin case 'QnanewanswerAction': case 'QnashowquestionAction': case 'QnashowanswerAction': + case 'QnareviseanswerAction': case 'QnavoteAction': include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php'; return false; case 'QnaquestionForm': case 'QnaanswerForm': - case 'QnaansweredForm': + case 'QnareviseanswerForm': case 'QnavoteForm': include_once $dir . '/lib/' . strtolower($cls).'.php'; break; @@ -120,9 +121,8 @@ class QnAPlugin extends MicroAppPlugin array('action' => 'qnanewquestion') ); $m->connect( - 'main/qna/newanswer/:id', - array('action' => 'qnanewanswer'), - array('id' => $UUIDregex) + 'main/qna/newanswer', + array('action' => 'qnanewanswer') ); $m->connect( 'question/vote/:id', @@ -304,13 +304,13 @@ class QnAPlugin extends MicroAppPlugin // TRANS: %s is the unpexpected object type. throw new Exception( sprintf( - _m('Unexpected type for QnA plugin: %s.'), + _m('Unexpected type for QnA plugin: %s.'), $notice->object_type ) ); } } - + function showNoticeQuestion($notice, $out) { $user = common_current_user(); @@ -321,14 +321,14 @@ class QnAPlugin extends MicroAppPlugin $out->elementStart('div', array('class' => 'entry-content question-content')); $question = QnA_Question::getByNotice($notice); - + if ($question) { if ($user) { $profile = $user->getProfile(); $answer = $question->getAnswer($profile); if ($answer) { // User has already answer; show the results. - $form = new QnaansweredForm($answer, $out); + $form = new QnareviseanswerForm($answer, $out); } else { $form = new QnaanswerForm($question, $out); }