| @@ 72-79 (lines=8) @@ | ||
| 69 | */ |
|
| 70 | function ¬ificationCategoryInfo($category_name = '', $module_id = null) |
|
| 71 | { |
|
| 72 | if (!isset($module_id)) { |
|
| 73 | global $xoopsModule; |
|
| 74 | $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0; |
|
| 75 | $module =& $xoopsModule; |
|
| 76 | } else { |
|
| 77 | $module_handler = xoops_getHandler('module'); |
|
| 78 | $module = $module_handler->get($module_id); |
|
| 79 | } |
|
| 80 | $not_config = &$module->getInfo('notification'); |
|
| 81 | if (empty($category_name)) { |
|
| 82 | return $not_config['category']; |
|
| @@ 142-149 (lines=8) @@ | ||
| 139 | */ |
|
| 140 | function ¬ificationEvents($category_name, $enabled_only, $module_id = null) |
|
| 141 | { |
|
| 142 | if (!isset($module_id)) { |
|
| 143 | global $xoopsModule; |
|
| 144 | $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0; |
|
| 145 | $module =& $xoopsModule; |
|
| 146 | } else { |
|
| 147 | $module_handler = xoops_getHandler('module'); |
|
| 148 | $module = $module_handler->get($module_id); |
|
| 149 | } |
|
| 150 | $not_config = $module->getInfo('notification'); |
|
| 151 | $config_handler = xoops_getHandler('config'); |
|
| 152 | $mod_config = $config_handler->getConfigsByCat(0, $module_id); |
|
| @@ 638-645 (lines=8) @@ | ||
| 635 | */ |
|
| 636 | public function triggerEvent($category, $item_id, $event, $extra_tags = array(), $user_list = array(), $module_id = null, $omit_user_id = null) |
|
| 637 | { |
|
| 638 | if (!isset($module_id)) { |
|
| 639 | global $xoopsModule; |
|
| 640 | $module =& $xoopsModule; |
|
| 641 | $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0; |
|
| 642 | } else { |
|
| 643 | $module_handler = xoops_getHandler('module'); |
|
| 644 | $module = $module_handler->get($module_id); |
|
| 645 | } |
|
| 646 | ||
| 647 | // Check if event is enabled |
|
| 648 | $config_handler = xoops_getHandler('config'); |
|