From 3ede4850569ec8e4930a5f403dc1a9590a7b5fec Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 29 Aug 2010 19:30:48 +0200 Subject: [PATCH] An education should always contain a university and a degree. 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 | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.1.4