Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git] / classes / address.php
index a834a1d..289cfb1 100644 (file)
@@ -366,7 +366,7 @@ class Address
 
     public function addPhone(Phone $phone)
     {
-        if ($phone->linkType() == Phone::LINK_ADDRESS && $phone->pid() == $this->pid) {
+        if ($phone->link_type == Phone::LINK_ADDRESS && $phone->pid == $this->pid) {
             $this->phones[$phone->uniqueId()] = $phone;
         }
     }
@@ -915,7 +915,7 @@ class AddressIterator implements PlIterator
         // Adds phones to addresses.
         $it = Phone::iterate(array($data['pid']), array(Phone::LINK_ADDRESS), array($data['id']));
         while ($phone = $it->next()) {
-            $data['phones'][$phone->id()] = $phone->toFormArray();
+            $data['phones'][$phone->id] = $phone->toFormArray();
         }
         return new Address($data);
     }