From 67b4d856a1d7eca97c12a2350bd6e7ed3ecbccb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 17 Jun 2011 22:07:27 +0200 Subject: [PATCH] Fixes display of new promotion in profile edition. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile/general.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.1.4