X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fjobs.inc.php;h=cc39c2762a4cf08adc73436f5d8a9928547bbfc4;hb=956cd5c10a027f75283d91545a5d5feeed1874ef;hp=4726e94cdba07a72e958fb3ff4af526d36b4e5a6;hpb=4d9b63f8ec02d84eabd554234a32718758bf9e21;p=platal.git diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 4726e94..cc39c27 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -1,6 +1,6 @@ pid()), array(Phone::LINK_JOB)); while ($phone = $it->next()) { - $jobs[$phone->linkId()]['w_phone'][$phone->id()] = $phone->toFormArray(); + $jobs[$phone->link_id]['w_phone'][$phone->id] = $phone->toFormArray(); } $res = XDB::iterator("SELECT e.jtid, e.full_name, j.jid FROM profile_job_term_enum AS e @@ -224,7 +224,7 @@ class ProfileSettingJob implements ProfileSetting } if (isset($job['removed']) && $job['removed']) { - if ($job['name'] == '' && $entreprise) { + if ($job['name'] == '' && $entreprise && isset($entreprise[$entr_val - 1])) { $entreprise[$entr_val - 1]->clean(); } unset($value[$key]); @@ -296,6 +296,9 @@ class ProfileSettingJob implements ProfileSetting VALUES ' . implode(', ', $terms_values) . ' ON DUPLICATE KEY UPDATE computed = VALUES(computed)'); } + if (S::user()->isMe($page->owner) && count($value) > 1) { + Platal::page()->trigWarning('Attention, tu as plusieurs emplois sur ton profil. Pense à supprimer ceux qui sont obsolètes.'); + } } public function getText($value)