]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/QnAPlugin.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / plugins / QnA / QnAPlugin.php
index e0f5fed12bc5017bf397411f06e74b2b9ebf2d00..7c6c3e00e355fd6367c604ba64be127d71b063da 100644 (file)
@@ -75,12 +75,12 @@ class QnAPlugin extends MicroAppPlugin
     /**
      * Map URLs to actions
      *
-     * @param Net_URL_Mapper $m path-to-action mapper
+     * @param URLMapper $m path-to-action mapper
      *
      * @return boolean hook value; true means continue processing, false means stop.
      */
 
-    function onRouterInitialized($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}';
 
@@ -124,7 +124,7 @@ class QnAPlugin extends MicroAppPlugin
         return true;
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array(
             'name'        => 'QnA',
@@ -424,18 +424,18 @@ 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...");
         }
     }