Publicity restriction should be the other way around here.
authorStéphane Jacob <sj@m4x.org>
Mon, 24 Oct 2011 20:04:28 +0000 (22:04 +0200)
committerStéphane Jacob <sj@m4x.org>
Wed, 26 Oct 2011 13:29:08 +0000 (15:29 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/jobs.inc.php

index d29a5ef..268d5f3 100644 (file)
@@ -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();