X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofilefields.inc.php;h=2de1e6ba4d30890344f85fdc622cf90e053a8fef;hb=54722967b9b605dca8cff67fc3a050194beba368;hp=b39b8f9b5767f5f57a0aa3092f977ca3def95015;hpb=164566891eef6e4027b2dfccda0040d37f10605b;p=platal.git diff --git a/include/profilefields.inc.php b/include/profilefields.inc.php index b39b8f9..2de1e6b 100644 --- a/include/profilefields.inc.php +++ b/include/profilefields.inc.php @@ -1,6 +1,6 @@ linkType() == Phone::LINK_COMPANY && $phone->linkId() == $this->id) { + 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,9 +221,9 @@ class Job return $this->address; } - public function addPhone(Phone &$phone) + public function addPhone(Phone $phone) { - if ($phone->linkType() == Phone::LINK_JOB && $phone->linkId() == $this->id && $phone->pid() == $this->pid) { + 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; } @@ -544,10 +544,10 @@ class ProfileAddresses extends ProfileField $p = $phones->get(Profile::PHONE_LINK_ADDRESS | Profile::PHONE_TYPE_ANY); foreach ($p as $phone) { /* We must iterate on the addresses because id is not uniq thus, - * $this->addresse[$phone->linkId()] is invalid. + * $this->addresse[$phone->link_id] is invalid. */ foreach ($this->addresses as $address) { - if ($address->type == Address::LINK_PROFILE && $address->id == $phone->linkId()) { + if ($address->type == Address::LINK_PROFILE && $address->id == $phone->link_id) { $address->addPhone($phone); } } @@ -634,8 +634,8 @@ class ProfileJobs extends ProfileField { $p = $phones->get(Profile::PHONE_LINK_JOB | Profile::PHONE_TYPE_ANY); foreach ($p as $phone) { - if ($phone->linkType() == Phone::LINK_JOB && array_key_exists($phone->linkId(), $this->jobs)) { - $this->jobs[$phone->linkId()]->addPhone($phone); + if ($phone->link_type == Phone::LINK_JOB && array_key_exists($phone->link_id, $this->jobs)) { + $this->jobs[$phone->link_id]->addPhone($phone); } } } @@ -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); } } } @@ -756,7 +756,7 @@ class CompanyList if (count($newcompanies)) { $it = Phone::iterate(array(), array(Phone::LINK_COMPANY), $newcompanies); while ($phone = $it->next()) { - self::$companies[$phone->linkId()]->setPhone($phone); + self::$companies[$phone->link_id]->setPhone($phone); } }