Fixes display of corps in bounce list (Closes #1479).
authorStéphane Jacob <sj@m4x.org>
Thu, 28 Apr 2011 15:04:49 +0000 (17:04 +0200)
committerStéphane Jacob <sj@m4x.org>
Thu, 28 Apr 2011 15:04:49 +0000 (17:04 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/email.php

index de8af94..15d1e31 100644 (file)
@@ -872,10 +872,11 @@ class EmailModule extends PLModule
 
                 $csv = fopen('php://output', 'w');
                 fputcsv($csv, array('nom', 'promo', 'bounces', 'nbmails', 'url', 'corps', 'job', 'networking'), ';');
+                $corpsList = DirEnum::getOptions(DirEnum::CURRENTCORPS);
                 foreach ($broken_user_list as $uid => $mails) {
                     $profile = Profile::get($uid);
                     $corps = $profile->getCorps();
-                    $current_corps = ($corps && $corps->current) ? $corps->current : '';
+                    $current_corps = ($corps && $corps->current) ? $corpsList[$corps->current] : '';
                     $jobs = $profile->getJobs();
                     $companies = array();
                     foreach ($jobs as $job) {