X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Faddresses.inc.php;h=24bc995239000eee2720dd3852e7ab71d36b2369;hb=48dba8feba7c3653a925aab5273fc30a6c257240;hp=c563c7e90a16ced2a75eb0cd1285d74cec43e6c5;hpb=26ba053e75092d038f571b77eaf3005509da0648;p=platal.git diff --git a/modules/profile/addresses.inc.php b/modules/profile/addresses.inc.php index c563c7e..24bc995 100644 --- a/modules/profile/addresses.inc.php +++ b/modules/profile/addresses.inc.php @@ -1,6 +1,6 @@ pid()), array(Address::LINK_PROFILE), array(0)); + $it = Address::iterate(array($page->pid()), array(Address::LINK_PROFILE), array(0), Visibility::get(Visibility::VIEW_ADMIN)); while ($address = $it->next()) { $addresses[] = $address->toFormArray(); } @@ -46,7 +46,8 @@ class ProfileSettingAddresses implements ProfileSetting $deletePrivate = S::user()->isMe($page->owner) || S::admin(); Phone::deletePhones($page->pid(), Phone::LINK_ADDRESS, null, $deletePrivate); - Address::deleteAddresses($page->pid(), Address::LINK_PROFILE, 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,8 +69,9 @@ class ProfilePageAddresses extends ProfilePage parent::__construct($wiz); $this->settings['addresses'] = new ProfileSettingAddresses(); $this->watched['addresses'] = true; + Platal::page()->assign('geocoding_removal', true); } } -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>