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;
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',
// 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();
$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);
}