From: Stéphane Jacob Date: Fri, 17 Jun 2011 20:07:27 +0000 (+0200) Subject: Fixes display of new promotion in profile edition. X-Git-Tag: xorg/1.1.2~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=67b4d856a1d7eca97c12a2350bd6e7ed3ecbccb1;p=platal.git Fixes display of new promotion in profile edition. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 6eef643..12731d2 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -507,7 +507,13 @@ class ProfileSettingPromo implements ProfileSetting } Platal::page()->assign('promo_choice', $promoChoice); } - return $yearpromo; + + // If this profile belongs to an X, return grad year minus education duration. + if ($page->profile->mainEducation() == 'X') { + return $gradYear - $page->profile->mainEducationDuration(); + } + + return $gradYear; } // If this profile belongs to an X, $promoNew needs to be changed to