]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/QnAPlugin.php
Also for onEndShowScripts() 'Action' is the proper type-hint.
[quix0rs-gnu-social.git] / plugins / QnA / QnAPlugin.php
index bbb5fe8b5d8d4e7935f0f300b15517ad1d57a23d..98bb80e68d5a5b6fc5ee05bfd793a73cb1c8396f 100644 (file)
@@ -80,7 +80,7 @@ class QnAPlugin extends MicroAppPlugin
      * @return boolean hook value; true means continue processing, false means stop.
      */
 
-    function onRouterInitialized(URLMapper $m)
+    public function onRouterInitialized(URLMapper $m)
     {
         $UUIDregex = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
 
@@ -339,7 +339,7 @@ class QnAPlugin extends MicroAppPlugin
         $nli->showNoticeLink();
         $nli->showNoticeSource();
         $nli->showNoticeLocation();
-        $nli->showContext();
+        $nli->showPermalink();
         $nli->showRepeat();
 
         $nli->showNoticeOptions();
@@ -424,22 +424,22 @@ class QnAPlugin extends MicroAppPlugin
     {
         switch ($notice->object_type) {
         case QnA_Question::OBJECT_TYPE:
-            common_log(LOG_DEBUG, "Deleting question from notice...");
+            common_debug("Deleting question from notice...");
             $question = QnA_Question::fromNotice($notice);
             $question->delete();
             break;
         case QnA_Answer::OBJECT_TYPE:
-            common_log(LOG_DEBUG, "Deleting answer from notice...");
+            common_debug("Deleting answer from notice...");
             $answer = QnA_Answer::fromNotice($notice);
-            common_log(LOG_DEBUG, "to delete: $answer->id");
+            common_debug("to delete: $answer->id");
             $answer->delete();
             break;
         default:
-            common_log(LOG_DEBUG, "Not deleting related, wtf...");
+            common_debug("Not deleting related, wtf...");
         }
     }
 
-    function onEndShowScripts($action)
+    function onEndShowScripts(Action $action)
     {
         $action->script($this->path('js/qna.js'));
         return true;