Code Duplication    Length = 6-7 lines in 2 locations

subscription.php 2 locations

@@ 525-530 (lines=6) @@
522
                $activationKey = base64_encode(implode('||', $act));
523
                $xoopsMailer->assign('ACTLINK', XOOPS_URL . "/modules/xnewsletter/{$currentFile}?actkey={$activationKey}");
524
                $xoopsMailer->setSubject(_MA_XNEWSLETTER_SUBSCRIPTIONSUBJECT . $GLOBALS['xoopsConfig']['sitename']);
525
                if (!$xoopsMailer->send()) {
526
                    $actionProts_error[] = _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SENDACTKEY . '<br>' . $xoopsMailer->getErrors();
527
                    redirect_header($currentFile, 3, _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SENDACTKEY . '<br>' . $xoopsMailer->getErrors());
528
                } else {
529
                    $actionProts_ok[] = str_replace('%subscr_email', $subscr_email, _MA_XNEWSLETTER_SENDMAIL_REG_OK);
530
                }
531
            } else {
532
                // activation key EXISTS
533
                // check confirmation email
@@ 707-713 (lines=7) @@
704
                $xoopsMailer->assign('USERNAME', $xoopsUser->name());
705
                $subject = _MA_XNEWSLETTER_SUBSCRIPTION_SUBJECT_CHANGE . $GLOBALS['xoopsConfig']['sitename'];
706
                $xoopsMailer->setSubject($subject);
707
                if (!$xoopsMailer->send()) {
708
                    $count_err++;
709
                    $actionProts_error[] = _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SENDACTKEY . '<br>' . $xoopsMailer->getErrors();
710
                    redirect_header($currentFile, 3, _MA_XNEWSLETTER_SUBSCRIPTION_ERROR_SENDACTKEY . '<br>' . $xoopsMailer->getErrors());
711
                } else {
712
                    $actionProts_ok[] = str_replace('%e', $subscr_email, _MA_XNEWSLETTER_SUBSCRIPTION_PROT_SENT_INFO);
713
                }
714
            }
715
            if (0 == $count_err) {
716
                if ('addnew' === $saveType) {