X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile%2Faddresses.inc.php;h=3a7c52ade060aa5420d4066a6be959e2ae317aba;hb=7c8b692c4bc04cdac02c74f29a988f9f9f4ee398;hp=2961f1e09c8a0742661cc7006341ec92669ba7dd;hpb=baab50c705fd57d695f28f2d396b653493a709a0;p=platal.git diff --git a/modules/profile/addresses.inc.php b/modules/profile/addresses.inc.php index 2961f1e..3a7c52a 100644 --- a/modules/profile/addresses.inc.php +++ b/modules/profile/addresses.inc.php @@ -27,7 +27,7 @@ class ProfileSettingAddresses implements ProfileSetting $addresses = array(); if (is_null($value)) { - $it = Address::iterate(array($page->pid()), array(Address::LINK_PROFILE), array(0)); + $it = Address::iterate(array($page->pid()), array(Address::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_PRIVATE)); while ($address = $it->next()) { $addresses[] = $address->toFormArray(); } @@ -47,6 +47,7 @@ class ProfileSettingAddresses implements ProfileSetting Phone::deletePhones($page->pid(), Phone::LINK_ADDRESS, null, $deletePrivate); Address::deleteAddresses($page->pid(), Address::LINK_PROFILE, null, null, $deletePrivate); + AddressReq::purge_requests($page->pid(), 0, 0, Address::LINK_PROFILE); Address::saveFromArray($value, $page->pid(), Address::LINK_PROFILE, null, $deletePrivate); if (S::user()->isMe($page->owner) && count($value) > 1) { Platal::page()->trigWarning('Attention, tu as plusieurs adresses sur ton profil. Pense à supprimer celles qui sont obsolètes.'); @@ -68,6 +69,7 @@ class ProfilePageAddresses extends ProfilePage parent::__construct($wiz); $this->settings['addresses'] = new ProfileSettingAddresses(); $this->watched['addresses'] = true; + Platal::page()->assign('geocoding_removal', true); } }