An education should always contain a university and a degree.
authorStéphane Jacob <sj@m4x.org>
Sun, 29 Aug 2010 17:30:48 +0000 (19:30 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 29 Aug 2010 17:30:48 +0000 (19:30 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/general.inc.php

index a9afd28..4f9c1ac 100644 (file)
@@ -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;