@@ 88-97 (lines=10) @@ | ||
85 | $catObj = $helper->getHandler('Cat')->get($catsubscrObj->getVar('catsubscr_catid')); |
|
86 | $cat_mailinglist = $catObj->getVar('cat_mailinglist'); |
|
87 | ||
88 | if ($helper->getHandler('Catsubscr')->delete($catsubscrObj, true)) { |
|
89 | //handle mailinglists |
|
90 | if ($cat_mailinglist > 0) { |
|
91 | require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/mailinglist.php'; |
|
92 | subscribingMLHandler(_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE, $subscr_id, $cat_mailinglist); |
|
93 | } |
|
94 | } else { |
|
95 | $actionprot_err .= $catsubscrObj->getHtmlErrors(); |
|
96 | ++$count_err; |
|
97 | } |
|
98 | } |
|
99 | } |
|
100 |
@@ 80-89 (lines=10) @@ | ||
77 | foreach ($catsubscrObjs as $catsubscr_id => $catsubscrObj) { |
|
78 | $catObj = $this->helper->getHandler('Cat')->get($catsubscrObj->getVar('catsubscr_catid')); |
|
79 | $cat_mailinglist = $catObj->getVar('cat_mailinglist'); |
|
80 | if ($this->helper->getHandler('Catsubscr')->delete($catsubscrObj, $force)) { |
|
81 | // handle mailinglists |
|
82 | if (0 != $cat_mailinglist) { |
|
83 | require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/mailinglist.php'; |
|
84 | subscribingMLHandler(_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE, $subscr_id, $cat_mailinglist); |
|
85 | } |
|
86 | } else { |
|
87 | $res = false; |
|
88 | $subscrObj->setErrors($catsubscrObj->getErrors()); |
|
89 | } |
|
90 | } |
|
91 | } |
|
92 | // delete subscriber ({@link subscr} object) |
@@ 640-649 (lines=10) @@ | ||
637 | } elseif ('0' == $catsubcr && $catsubcr_id_old > 0) { |
|
638 | // unsubscribe / delete old subscription |
|
639 | $catsubscrObj = $helper->getHandler('Catsubscr')->get($catsubcr_id_old); |
|
640 | if ($helper->getHandler('Catsubscr')->delete($catsubscrObj, true)) { |
|
641 | // handle mailinglists |
|
642 | if ($cat_mailinglist > 0) { |
|
643 | require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/mailinglist.php'; |
|
644 | subscribingMLHandler(_XNEWSLETTER_MAILINGLIST_UNSUBSCRIBE, $subscr_id, $cat_mailinglist); |
|
645 | } |
|
646 | } else { |
|
647 | $count_err++; |
|
648 | $actionProts_error[] = _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SAVECATSUBSCR; //$catsubscrObj->getHtmlErrors(); |
|
649 | } |
|
650 | /* |
|
651 | if ($count_err > 0) { |
|
652 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELNOTOK); |