]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Mapstraction/actions/map.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / Mapstraction / actions / map.php
index 3fad900b5a3e9754bb4daf906ba0e1ee9aa935fa..14712bb99232cefc7dc98dc558c40529995a4568 100644 (file)
@@ -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
             }
         }
 
@@ -144,7 +146,7 @@ class MapAction extends Action
 
         $arr = $act->twitterStatusArray($notice, true);
         $arr['url'] = $notice->getUrl(true);
-        $arr['html'] = $notice->rendered;
+        $arr['html'] = $notice->getRendered();
         $arr['source'] = $arr['source'];
 
         if (!empty($notice->reply_to)) {