From: Stéphane Jacob Date: Sun, 29 Aug 2010 17:30:48 +0000 (+0200) Subject: An education should always contain a university and a degree. X-Git-Tag: xorg/1.0.1~15^2~15 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3ede4850569ec8e4930a5f403dc1a9590a7b5fec;p=platal.git An education should always contain a university and a degree. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index a9afd28..4f9c1ac 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -260,6 +260,10 @@ class ProfileSettingEdu implements ProfileSetting } else { $i = 0; foreach ($value as $key=>&$edu) { + if ($edu['eduid'] < 1 || !isset($edu['degreeid']) || $edu['degreeid'] < 1) { + Platal::page()->trigError('L\'université ou le diplôme d\'une formation manque.'); + $success = false; + } 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;