| @@ 1065-1083 (lines=19) @@ | ||
| 1062 | * |
|
| 1063 | * @return void |
|
| 1064 | */ |
|
| 1065 | public function deleteModuleRelations(XoopsModule $module) |
|
| 1066 | { |
|
| 1067 | $xoops = Xoops::getInstance(); |
|
| 1068 | $this->getHandlerComment()->deleteByModule($module->getVar('mid')); |
|
| 1069 | ||
| 1070 | ||
| 1071 | $configNames = array('com_rule', 'com_anonpost'); |
|
| 1072 | $config_handler = $xoops->getHandlerConfig(); |
|
| 1073 | ||
| 1074 | //Delete all configs |
|
| 1075 | $criteria = new CriteriaCompo(); |
|
| 1076 | $criteria->add(new Criteria('conf_modid', $module->getVar('mid'))); |
|
| 1077 | $criteria->add(new Criteria('conf_name', "('" . implode("','", $configNames) . "')", 'IN')); |
|
| 1078 | $configs = $config_handler->getConfigs($criteria); |
|
| 1079 | /* @var $config XoopsConfigItem */ |
|
| 1080 | foreach ($configs as $config) { |
|
| 1081 | $config_handler->deleteConfig($config); |
|
| 1082 | } |
|
| 1083 | } |
|
| 1084 | ||
| 1085 | /** |
|
| 1086 | * @return array |
|
| @@ 525-543 (lines=19) @@ | ||
| 522 | /** |
|
| 523 | * @param XoopsModule $module |
|
| 524 | */ |
|
| 525 | public function deleteModuleRelations(XoopsModule $module) |
|
| 526 | { |
|
| 527 | $xoops = Xoops::getInstance(); |
|
| 528 | $this->getHandlerNotification()->unsubscribeByModule($module->getVar('mid')); |
|
| 529 | ||
| 530 | ||
| 531 | $configNames = array('notifications_enabled', 'notification_events'); |
|
| 532 | $config_handler = $xoops->getHandlerConfig(); |
|
| 533 | ||
| 534 | //Delete all configs |
|
| 535 | $criteria = new CriteriaCompo(); |
|
| 536 | $criteria->add(new Criteria('conf_modid', $module->getVar('mid'))); |
|
| 537 | $criteria->add(new Criteria('conf_name', "('" . implode("','", $configNames) . "')", 'IN')); |
|
| 538 | $configs = $config_handler->getConfigs($criteria); |
|
| 539 | /* @var $config XoopsConfigItem */ |
|
| 540 | foreach ($configs as $config) { |
|
| 541 | $config_handler->deleteConfig($config); |
|
| 542 | } |
|
| 543 | } |
|
| 544 | ||
| 545 | /** |
|
| 546 | * @param XoopsModule $module |
|