function sendNotifications($notifications = array()) { $smartModule =& sf_getModuleInfo(); $myts =& MyTextSanitizer::getInstance(); $notification_handler =& xoops_gethandler('notification'); $faqObj = new sfFaq($this->faqid()); $tags = array(); $tags['MODULE_NAME'] = $myts->displayTarea($smartModule->getVar('name')); $tags['FAQ_NAME'] = $faqObj->question(); $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/faq.php?faqid=' . $faqObj->faqid(); $tags['CATEGORY_NAME'] = $faqObj->getCategoryName(); $tags['CATEGORY_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $faqObj->categoryid(); $tags['FAQ_QUESTION'] = $faqObj->question(); // TODO : Not sure about the 'formpreview' ... $tags['FAQ_ANSWER'] = $this->answer('formpreview'); $tags['DATESUB'] = $this->datesub(); foreach ($notifications as $notification) { switch ($notification) { case _SF_NOT_ANSWER_APPROVED: // This notification is not working for PM, but is for email... and I don't understand why??? $notification_handler->triggerEvent('faq', $this->answerid(), 'answer_approved', $tags); break; case -1: default: break; } } }