summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-30 13:09:15 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-30 13:09:15 +0100
commit790b77202079261b11d425e0c814608d626eea70 (patch)
treea0ac11ba59a10a9e818508f46e6c50a2294fcb77 /inc/common.php
parent10b5c32d6486ab0884deda109b1e5947f7ec7662 (diff)
downloadrpg-790b77202079261b11d425e0c814608d626eea70.tar.gz
rpg-790b77202079261b11d425e0c814608d626eea70.tar.bz2
moved registration notification to subscription class
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php27
1 files changed, 2 insertions, 25 deletions
diff --git a/inc/common.php b/inc/common.php
index d17061a1b..20e0af389 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1126,36 +1126,13 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$to = $data['addresslist'];
if(empty($to)) return false;
$tpl = 'subscr_single';
- } elseif($who == 'register') {
- if(empty($conf['registernotify'])) return false;
- $text = rawLocale('registermail');
- $to = $conf['registernotify'];
} else {
return false; //just to be safe
}
// prepare content
- if($who == 'register') {
- $subject = $lang['mail_new_user'].' '.$summary;
- } else {
- $subscription = new Subscription();
- return $subscription->send_diff($to, $tpl, $id, $rev, $summary);
- }
-
-
- // send mail
- $mail = new Mailer();
- $mail->to($to);
- $mail->subject($subject);
- $mail->setBody($text, $trep, $hrep);
- if($who == 'subscribers') {
- $mail->setHeader(
- 'List-Unsubscribe',
- '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>',
- false
- );
- }
- return $mail->send();
+ $subscription = new Subscription();
+ return $subscription->send_diff($to, $tpl, $id, $rev, $summary);
}
/**