X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2FQnAPlugin.php;h=2c28bf6055483bef7e6468ba4e85e7ef3469b83a;hb=4694d068f965ec733edcfe5c9afe8244ae01f00a;hp=bdd54afd2ea7ca995c394be2a1995017fab0ba37;hpb=e7c6c6fc763ee94c34214f31980eabe83177a265;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index bdd54afd2e..2c28bf6055 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -124,7 +124,7 @@ class QnAPlugin extends MicroAppPlugin return true; } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array( 'name' => 'QnA', @@ -260,7 +260,7 @@ class QnAPlugin extends MicroAppPlugin * @return boolean hook value */ - function onStartOpenNoticeListItemElement($nli) + function onStartOpenNoticeListItemElement(NoticeListItem $nli) { $type = $nli->notice->object_type; @@ -325,7 +325,7 @@ class QnAPlugin extends MicroAppPlugin * * @todo FIXME: WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation */ - function onStartShowNoticeItem($nli) + function onStartShowNoticeItem(NoticeListItem $nli) { if (!$this->isMyNotice($nli->notice)) { return true; @@ -340,7 +340,6 @@ class QnAPlugin extends MicroAppPlugin $nli->showNoticeSource(); $nli->showNoticeLocation(); $nli->showPermalink(); - $nli->showRepeat(); $nli->showNoticeOptions(); @@ -424,28 +423,28 @@ 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; } - function onEndShowStyles($action) + function onEndShowStyles(Action $action) { $action->cssLink($this->path('css/qna.css')); return true;