X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofilefields.inc.php;h=2de1e6ba4d30890344f85fdc622cf90e053a8fef;hb=c10e9a24b920cb34b3950306b5db941f8fc6ab59;hp=f34e3b8b9cf38d8efe3f252c1d5cbe73e57064d9;hpb=ce0d7be772306674fadaf020511871aba1683816;p=platal.git diff --git a/include/profilefields.inc.php b/include/profilefields.inc.php index f34e3b8..2de1e6b 100644 --- a/include/profilefields.inc.php +++ b/include/profilefields.inc.php @@ -148,14 +148,14 @@ class Company } } - public function setPhone(Phone &$phone) + public function setPhone(Phone $phone) { if ($phone->link_type == Phone::LINK_COMPANY && $phone->link_id == $this->id) { $this->phone = $phone; } } - public function setAddress(Address &$address) + public function setAddress(Address $address) { if ($address->type == Address::LINK_COMPANY && $address->jobid == $this->id) { $this->address = $address; @@ -221,7 +221,7 @@ class Job return $this->address; } - public function addPhone(Phone &$phone) + public function addPhone(Phone $phone) { if ($phone->link_type == Phone::LINK_JOB && $phone->link_id == $this->id && $phone->pid == $this->pid) { $this->phones[$phone->uniqueId()] = $phone; @@ -235,7 +235,7 @@ class Job } } - public function addTerm(JobTerm &$term) + public function addTerm(JobTerm $term) { $this->terms[$term->jtid] = $term; } @@ -644,7 +644,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)) { + if ($address->type == Address::LINK_JOB && array_key_exists($address->id, $this->jobs)) { $this->jobs[$address->id]->setAddress($address); } } @@ -662,7 +662,7 @@ class ProfileJobs extends ProfileField $terms = $jobterms->get(); foreach ($terms as $term) { if ($this->pid == $term->pid && array_key_exists($term->jid, $this->jobs)) { - $this->jobs[$term->jid]->addTerm(&$term); + $this->jobs[$term->jid]->addTerm($term); } } }