| @@ 81-90 (lines=10) @@ | ||
| 78 | $catObj = $helper->getHandler('Cat')->get($catsubscrObj->getVar('catsubscr_catid')); |
|
| 79 | $cat_mailinglist = $catObj->getVar('cat_mailinglist'); |
|
| 80 | ||
| 81 | if ($helper->getHandler('Catsubscr')->delete($catsubscrObj, true)) { |
|
| 82 | //handle mailinglists |
|
| 83 | if ($cat_mailinglist > 0) { |
|
| 84 | require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/mailinglist.php'; |
|
| 85 | subscribingMLHandler(0, $subscr_id, $cat_mailinglist); |
|
| 86 | } |
|
| 87 | } else { |
|
| 88 | $actionprot_err .= $catsubscrObj->getHtmlErrors(); |
|
| 89 | ++$count_err; |
|
| 90 | } |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| @@ 635-644 (lines=10) @@ | ||
| 632 | } elseif ('0' == $catsubcr && $catsubcr_id_old > 0) { |
|
| 633 | // unsubscribe / delete old subscription |
|
| 634 | $catsubscrObj = $helper->getHandler('Catsubscr')->get($catsubcr_id_old); |
|
| 635 | if ($helper->getHandler('Catsubscr')->delete($catsubscrObj, true)) { |
|
| 636 | // handle mailinglists |
|
| 637 | if ($cat_mailinglist > 0) { |
|
| 638 | require_once XOOPS_ROOT_PATH . '/modules/xnewsletter/include/mailinglist.php'; |
|
| 639 | subscribingMLHandler(0, $subscr_id, $cat_mailinglist); |
|
| 640 | } |
|
| 641 | } else { |
|
| 642 | $count_err++; |
|
| 643 | $actionProts_error[] = _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SAVECATSUBSCR; //$catsubscrObj->getHtmlErrors(); |
|
| 644 | } |
|
| 645 | /* |
|
| 646 | if ($count_err > 0) { |
|
| 647 | redirect_header($currentFile, 3, _AM_XNEWSLETTER_FORMDELNOTOK); |
|