From 4cae75970dc74314d0f3abeaa43f87cd07db94cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 29 Nov 2013 21:01:40 +0100 Subject: [PATCH] Fix MapView/AddressesView for UserSet. --- include/userset.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/userset.inc.php b/include/userset.inc.php index 724c376..c3ff5ac 100644 --- a/include/userset.inc.php +++ b/include/userset.inc.php @@ -383,12 +383,12 @@ class MapView implements PlView Platal::load('geoloc'); if (Get::b('ajax')) { - $pids = $this->set->getIds(new PlLimit()); + $uids = $this->set->getIds(new PlLimit()); + $pids = Profile::getPIDsFromUIDs($uids); GeolocModule::assign_json_to_map($page, $pids); $page->runJSON(); exit; } else { - $this->set->getIds(new PlLimit()); GeolocModule::prepare_map($page); return 'geoloc/index.tpl'; } @@ -459,7 +459,12 @@ class AddressesView implements PlView public function apply(PlPage $page) { - $pids = $this->set->getIds(new PlLimit()); + if ($this->set instanceof UserSet) { + $uids = $this->set->getIds(new PlLimit()); + $pids = Profile::getPIDsFromUIDs($uids); + } else { + $pids = $this->set->getIds(new PlLimit()); + } $visibility = Visibility::defaultForRead(Visibility::VIEW_AX); pl_cached_content_headers('text/x-csv', 'iso-8859-1', 1, 'adresses.csv'); -- 2.1.4