From: Stéphane Jacob Date: Sat, 26 Jun 2010 07:44:53 +0000 (+0200) Subject: Prevents impossible grad years to be stored. X-Git-Tag: xorg/1.0.0~25 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=830652769f5e756edb7239dc048a0d52c893d348;p=platal.git Prevents impossible grad years to be stored. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 95bd977..b6d77ff 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -260,6 +260,7 @@ class ProfileSettingEdu implements ProfileSetting foreach ($value as $key=>&$edu) { if (($edu['grad_year'] < 1921) || ($edu['grad_year'] > (date('Y') + 4))) { Platal::page()->trigWarning('L\'année d\'obtention du diplôme est mal ou non renseignée, elle doit être du type : 2004.'); + $edu['grad_year'] = null; $edu['warning'] = true; } if ($key != $i) {