diff options
author | Adrian Lang <lang@cosmocode.de> | 2010-08-10 12:26:19 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2010-08-10 14:13:27 +0200 |
commit | 41c141178e9733bbf38f8e937d3dea63058af0dc (patch) | |
tree | 3816797f7ecce04d6e85231110bc2ac7268dc373 /inc | |
parent | 45c5ecdccdd251af3e9202f944fa8bf103c5db0f (diff) | |
download | rpg-41c141178e9733bbf38f8e937d3dea63058af0dc.tar.gz rpg-41c141178e9733bbf38f8e937d3dea63058af0dc.tar.bz2 |
Ignore small & own changes in digest & list mails
Diffstat (limited to 'inc')
-rw-r--r-- | inc/lang/de/lang.php | 4 | ||||
-rw-r--r-- | inc/subscription.php | 21 |
2 files changed, 12 insertions, 13 deletions
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index dcc5c5a3f..c5c65abca 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -239,8 +239,8 @@ $lang['subscr_m_unsubscribe'] = 'Löschen'; $lang['subscr_m_subscribe'] = 'Abonnieren'; $lang['subscr_m_receive'] = 'Benachrichtigung'; $lang['subscr_style_every'] = 'Email bei jeder Bearbeitung'; -$lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede veränderte Seite'; -$lang['subscr_style_list'] = 'Liste der geänderten Seiten'; +$lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede veränderte Seite (Alle %.2f Tage)'; +$lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wenden Sie sich an den Systembetreuer.'; $lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wenden Sie sich an den Systembetreuer.'; $lang['i_chooselang'] = 'Wählen Sie Ihre Sprache'; diff --git a/inc/subscription.php b/inc/subscription.php index ce5da4cd4..22d8fccd5 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -284,20 +284,18 @@ function subscription_addresslist(&$data){ * Sends a digest mail showing a bunch of changes. * * @param string $subscriber_mail The target mail address - * @param array $change The newest change + * @param array $id The ID * @param int $lastupdate Time of the last notification * * @author Adrian Lang <lang@cosmocode.de> */ -function subscription_send_digest($subscriber_mail, $change, $lastupdate) { - $id = $change['id']; +function subscription_send_digest($subscriber_mail, $id, $lastupdate) { $n = 0; do { $rev = getRevisions($id, $n++, 1); $rev = (count($rev) > 0) ? $rev[0] : null; } while (!is_null($rev) && $rev > $lastupdate); - $ip = $change['ip']; $replaces = array('NEWPAGE' => wl($id, '', true, '&'), 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')); if (!is_null($rev)) { @@ -322,24 +320,25 @@ function subscription_send_digest($subscriber_mail, $change, $lastupdate) { * Sends a list mail showing a list of changed pages. * * @param string $subscriber_mail The target mail address - * @param array $changes Array of changes - * @param string $id The id of the namespace + * @param array $ids Array of ids + * @param string $ns_id The id of the namespace * * @author Adrian Lang <lang@cosmocode.de> */ -function subscription_send_list($subscriber_mail, $changes, $id) { +function subscription_send_list($subscriber_mail, $ids, $ns_id) { + if (count($ids) === 0) return; global $conf; $list = ''; - foreach ($changes as $change) { - $list .= '* ' . wl($change['id'], array(), true) . NL; + foreach ($ids as $id) { + $list .= '* ' . wl($id, array(), true) . NL; } subscription_send($subscriber_mail, array('DIFF' => rtrim($list), - 'SUBSCRIBE' => wl($id . $conf['start'], + 'SUBSCRIBE' => wl($ns_id . $conf['start'], array('do' => 'subscribe'), true, '&')), 'subscribe_list', - prettyprint_id($id), + prettyprint_id($ns_id), 'subscr_list'); } |