From: Stéphane Jacob Date: Wed, 8 Dec 2010 12:43:36 +0000 (+0100) Subject: Fixes use of wrong object to retrieve the profile's owner. X-Git-Tag: xorg/1.0.2~93 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ca17d55d9cb1997aced887373f5b111daf990af2;p=platal.git Fixes use of wrong object to retrieve the profile's owner. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index a013a1a..bbd0951 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -257,7 +257,7 @@ class ProfileSettingJob implements ProfileSetting public function save(ProfilePage &$page, $field, $value) { - $deletePrivate = S::user()->isMe($this->owner) || S::admin(); + $deletePrivate = S::user()->isMe($page->owner) || S::admin(); XDB::execute('DELETE FROM pj, pjt USING profile_job AS pj LEFT JOIN profile_job_term AS pjt ON (pj.pid = pjt.pid AND pj.id = pjt.jid) @@ -425,7 +425,7 @@ class ProfilePageJobs extends ProfilePage require_once 'emails.combobox.inc.php'; fill_email_combobox($page, $this->owner); - if (!S::user()->isMe($page->owner)) { + if (!S::user()->isMe($this->owner)) { $res = XDB::iterator('SELECT id, name FROM profile_corps_enum ORDER BY id = 1 DESC, name');