X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fmarketing.php;h=5068fd40c6aa14c904efcccd3f1ecc866c07087c;hb=e7ffcfd4e56316c1b22db06dc64a5ade6bec8f8a;hp=eecab75263f0175269d215005ac3430d6cc3a6c2;hpb=913a4e9004e7c0558dc79f3600b8f712b2f216fd;p=platal.git diff --git a/modules/marketing.php b/modules/marketing.php index eecab75..5068fd4 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -64,8 +64,7 @@ class MarketingModule extends PLModule } $matricule = $user->profile()->xorg_id; - require_once('user.func.inc.php'); - $matricule_X = get_X_mat($matricule); + $matricule_X = Profile::getSchoolId($matricule); $page->assign('full_name', $user->fullName()); $page->assign('promo', $user->promo()); @@ -124,8 +123,8 @@ class MarketingModule extends PLModule $res = XDB::iterator( "SELECT r.*, a.alias FROM register_marketing AS r - LEFT JOIN aliases AS a ON (r.sender=a.id AND a.type = 'a_vie') - WHERE uid={?} + LEFT JOIN aliases AS a ON (r.sender = a.uid AND a.type = 'a_vie') + WHERE r.uid = {?} ORDER BY date", $user->id()); $page->assign('addr', $res); @@ -210,8 +209,8 @@ class MarketingModule extends PLModule } $page->assign('promo', $promo); - $uf = new UserFilter(new UFC_And(new UFC_Promo('=', UserFilter::DISPLAY, $promo), - new UFC_Not(new UFC_Registered())), + $uf = new UserFilter(new PFC_And(new UFC_Promo('=', UserFilter::DISPLAY, $promo), + new PFC_Not(new UFC_Registered())), array(new UFO_Name(Profile::LASTNAME), new UFO_Name(Profile::FIRSTNAME))); $users = $uf->getUsers(); $page->assign('nonins', $users);