From: Stéphane Jacob Date: Sun, 29 May 2011 12:28:12 +0000 (+0200) Subject: Displays redirections in succesful registration summary (Closes #1501). X-Git-Tag: xorg/1.1.2~70 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=82d707704542abf136852b0e5e70c63e9678a4b1;p=platal.git Displays redirections in succesful registration summary (Closes #1501). Signed-off-by: Stéphane Jacob --- diff --git a/ChangeLog b/ChangeLog index 921adaf..68ce17c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ Bug/Wish: * Profile: - #1497: Fixes issues with ordinary names -JAC + * Register: + - #1501: Displays redirections in succesful registration summary -JAC + * Search: - #1285: Autocompletes on internal words in university search -JAC diff --git a/bin/cron/registrations.php b/bin/cron/registrations.php index 91cb1ac..a2c22dc 100755 --- a/bin/cron/registrations.php +++ b/bin/cron/registrations.php @@ -5,19 +5,20 @@ require 'connect.db.inc.php'; $message = ''; -$res = XDB::iterRow("SELECT a.registration_date, a.hruid, s.email - FROM accounts AS a - INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms)) - INNER JOIN profile_display AS pd ON (ap.pid = pd.pid) - LEFT JOIN email_source_account AS s ON (a.uid = s.uid) +$res = XDB::iterRow("SELECT a.registration_date, a.hruid, s.email, GROUP_CONCAT(r.redirect SEPARATOR ', ') + FROM accounts AS a + INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms)) + INNER JOIN profile_display AS pd ON (ap.pid = pd.pid) + LEFT JOIN email_source_account AS s ON (a.uid = s.uid) + LEFT JOIN email_redirect_account AS r ON (a.uid = r.uid) WHERE a.registration_date > {?} GROUP BY a.hruid ORDER BY pd.promo", date("Ymd000000", strtotime('last Monday'))); if ($count = $res->total()) { $message .= "$count INSCRIPTIONS CONFIRMÉES CETTE SEMAINE :\n"; - while (list($date, $hruid, $email) = $res->next()) { - $message .= "$date, $hruid, $email\n"; + while (list($date, $hruid, $email, $redirect) = $res->next()) { + $message .= "$date, $hruid, $email, $redirect\n"; } }