X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fpage.inc.php;h=78749ee17eda15f4b5fd44d948113e76ec7eb8ff;hb=e46cf8c46341b447cc3701c8afcc9baec3da11e5;hp=1aaf2c2df7c0ad7f3966fe14d74bfcb99822fa31;hpb=d1e6167749fdad08c81e23d09e1bbbf76e3b989b;p=platal.git diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index 1aaf2c2..78749ee 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -135,11 +135,11 @@ class ProfilePhones implements ProfileSetting $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 { @@ -271,6 +271,9 @@ abstract class ProfileGeocoding implements ProfileSetting 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');