return true;
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array(
'name' => 'QnA',
* @return boolean hook value
*/
- function onStartOpenNoticeListItemElement($nli)
+ function onStartOpenNoticeListItemElement(NoticeListItem $nli)
{
$type = $nli->notice->object_type;
*
* @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;
{
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;