X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FMapstraction%2Factions%2Fmap.php;h=48861af9942605295b9b81bf775ed9c7032420c3;hb=ab93bb009c8533c8847aafe76ba9774d9d74e7ca;hp=9834e97f9d1c53d09bc064087f382c7e426ae141;hpb=7d191f8062e5d117ac234737bc7ab838859dc4d6;p=quix0rs-gnu-social.git diff --git a/plugins/Mapstraction/actions/map.php b/plugins/Mapstraction/actions/map.php index 9834e97f9d..48861af994 100644 --- a/plugins/Mapstraction/actions/map.php +++ b/plugins/Mapstraction/actions/map.php @@ -120,9 +120,11 @@ class MapAction extends Action $jsonArray = array(); while ($this->notice->fetch()) { - if (!empty($this->notice->lat) && !empty($this->notice->lon)) { - $jsonNotice = $this->noticeAsJson($this->notice); - $jsonArray[] = $jsonNotice; + try { + $notloc = Notice_location::locFromStored($this->notice); + $jsonArray[] = $this->noticeAsJson($this->notice); + } catch (ServerException $e) { + // no location data } } @@ -143,14 +145,14 @@ class MapAction extends Action $act = new ApiAction('/dev/null'); $arr = $act->twitterStatusArray($notice, true); - $arr['url'] = $notice->getUrl(); + $arr['url'] = $notice->getUrl(true); $arr['html'] = $notice->rendered; $arr['source'] = $arr['source']; if (!empty($notice->reply_to)) { $reply_to = Notice::getKV('id', $notice->reply_to); if (!empty($reply_to)) { - $arr['in_reply_to_status_url'] = $reply_to->getUrl(); + $arr['in_reply_to_status_url'] = $reply_to->getUrl(true); } $reply_to = null; }