]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/QnAPlugin.php
Fix i18n issues.
[quix0rs-gnu-social.git] / plugins / QnA / QnAPlugin.php
index 992641b18e13684be5f888eda972e697a8e68041..9a05eeb0b2f60631ba72216ae50014b804e59d90 100644 (file)
@@ -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);
                 }