X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fjobs.inc.php;h=eada2bdcfa78b4f72c89956d8f907a59eb648383;hb=92ac93ec91a6e7b0f00fd21c6d19c31d46fe9f52;hp=d29a5ef401a14ffdd3de436152bc6539f54fde28;hpb=22771578c2d44fe4488546116a84e1561f083ed7;p=platal.git diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index d29a5ef..eada2bd 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -86,11 +86,11 @@ class ProfileSettingJob implements ProfileSetting $backtrack[$job['id']] = $key; } - $it = Address::iterate(array($page->pid()), array(Address::LINK_JOB)); + $it = Address::iterate(array($page->pid()), array(Address::LINK_JOB), array(), Visibility::get(Visibility::VIEW_PRIVATE)); while ($address = $it->next()) { $jobs[$address->id]['w_address'] = $address->toFormArray(); } - $it = Phone::iterate(array($page->pid()), array(Phone::LINK_JOB)); + $it = Phone::iterate(array($page->pid()), array(Phone::LINK_JOB), array(), Visibility::get(Visibility::VIEW_PRIVATE)); while ($phone = $it->next()) { $jobs[$phone->link_id]['w_phone'][$phone->id] = $phone->toFormArray(); } @@ -178,7 +178,7 @@ class ProfileSettingJob implements ProfileSetting } } - if (Visibility::isLessRestrictive($job['w_email_pub'], $job_level)) { + if (Visibility::isLessRestrictive($job_level, $job['w_email_pub'])) { $job['w_email_pub'] = $job_level; } $job['w_phone'] = Phone::formatFormArray($job['w_phone'], $s, $job_level); @@ -248,7 +248,7 @@ class ProfileSettingJob implements ProfileSetting // Force the address publicity to be at least as restricted as // the job publicity. $job_level = $job['pub']; - if (Visibility::isLessRestrictive($address->pub, $job_level)) { + if (Visibility::isLessRestrictive($job_level, $address->pub)) { $address->pub = $job_level; } $job['w_address'] = $address->toFormArray();