From: Stéphane Jacob Date: Wed, 27 Oct 2010 08:50:52 +0000 (+0200) Subject: Fixes jobs addresses. X-Git-Tag: xorg/1.0.2~183 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=0c408dbc04360df6fbf55200f3d95df85753c7b8;p=platal.git Fixes jobs addresses. Signed-off-by: Stéphane Jacob --- diff --git a/include/profilefields.inc.php b/include/profilefields.inc.php index cc8b73b..559686d 100644 --- a/include/profilefields.inc.php +++ b/include/profilefields.inc.php @@ -226,7 +226,7 @@ class Job public function setAddress(Address $address) { - if ($address->type == Address::LINK_JOB && $address->jobid == $this->id && $address->pid == $this->pid) { + if ($address->type == Address::LINK_JOB && $address->id == $this->id && $address->pid == $this->pid) { $this->address = $address; } } @@ -641,7 +641,7 @@ class ProfileJobs extends ProfileField $a = $addresses->get(Profile::ADDRESS_PRO); foreach ($a as $address) { if ($address->type == Address::LINK_JOB && array_key_exists($address->jobid, $this->jobs)) { - $this->jobs[$address->jobid]->setAddress($address); + $this->jobs[$address->id]->setAddress($address); } } }