$success = true;
if (is_null($value)) {
$value = array();
- $res = XDB::iterator("SELECT t.display_tel AS tel, t.tel_type AS type, t.pub, t.comment
- FROM profile_phones AS t
- WHERE t.uid = {?} AND t.link_type = {?}
- ORDER BY t.tel_id",
- $this->id, $this->link_type);
+ $res = XDB::iterator('SELECT display_tel AS tel, tel_type AS type, pub, comment
+ FROM profile_phones
+ WHERE uid = {?} AND link_type = {?}
+ ORDER BY tel_id',
+ $page->pid(), $this->link_type);
if ($res->numRows() > 0) {
$value = $res->fetchAllAssoc();
} else {
if (isset($address['geoloc'])) {
$success = false;
}
+ } elseif (@$address['changed'] && !@$address['text']) {
+ $address = empty_address();
+ $address['pub'] = 'private';
}
if (isset($address['geoloc_choice']) && ($address['geoloc_choice'] == 0)) {
$mailer = new PlMailer('geoloc/geoloc.mail.tpl');