X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2FQnAPlugin.php;h=7c6c3e00e355fd6367c604ba64be127d71b063da;hb=c909f351d07c50c433cd59fef00f41a67767ce9e;hp=77c4abf320d1d1a9b3cd00631024e432cfa56b75;hpb=0a95cdfa88af6d86ae455c9cf83a26c288439ebf;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index 77c4abf320..7c6c3e00e3 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -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', @@ -339,11 +339,9 @@ class QnAPlugin extends MicroAppPlugin $nli->showNoticeLink(); $nli->showNoticeSource(); $nli->showNoticeLocation(); - $nli->showContext(); + $nli->showPermalink(); $nli->showRepeat(); - $out->elementEnd('div'); - $nli->showNoticeOptions(); if ($notice->object_type == QnA_Question::OBJECT_TYPE) { @@ -426,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..."); } }