X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frss10action.php;h=6940ab4319590d34af19d63cea6edb7641e6b843;hb=f02d32b718de732181d0f73beed2b7fdb77b1cbd;hp=744d1e4b7ab758d708c0219a9d285fc7f003e1ec;hpb=9101a1db3d6b369bf09590e8de21d66996c3eda1;p=quix0rs-gnu-social.git diff --git a/lib/rss10action.php b/lib/rss10action.php index 744d1e4b7a..6940ab4319 100644 --- a/lib/rss10action.php +++ b/lib/rss10action.php @@ -209,22 +209,26 @@ class Rss10Action extends ManagedAction $this->element('title', null, $title); $this->element('link', null, $nurl); $this->element('description', null, $profile->nickname."'s status on ".common_exact_date($notice->created)); - if ($notice->rendered) { - $this->element('content:encoded', null, common_xml_safe_str($notice->rendered)); + if ($notice->getRendered()) { + $this->element('content:encoded', null, common_xml_safe_str($notice->getRendered())); } $this->element('dc:date', null, common_date_w3dtf($notice->created)); $this->element('dc:creator', null, ($profile->fullname) ? $profile->fullname : $profile->nickname); $this->element('foaf:maker', array('rdf:resource' => $creator_uri)); $this->element('sioc:has_creator', array('rdf:resource' => $creator_uri.'#acct')); - $location = $notice->getLocation(); - if ($location && isset($location->lat) && isset($location->lon)) { - $location_uri = $location->getRdfURL(); - $attrs = array('geo:lat' => $location->lat, - 'geo:long' => $location->lon); - if (strlen($location_uri)) { - $attrs['rdf:resource'] = $location_uri; + try { + $location = Notice_location::locFromStored($notice); + if (isset($location->lat) && isset($location->lon)) { + $location_uri = $location->getRdfURL(); + $attrs = array('geo:lat' => $location->lat, + 'geo:long' => $location->lon); + if (strlen($location_uri)) { + $attrs['rdf:resource'] = $location_uri; + } + $this->element('statusnet:origin', $attrs); } - $this->element('statusnet:origin', $attrs); + } catch (ServerException $e) { + // No result, so no location data } $this->element('statusnet:postIcon', array('rdf:resource' => $profile->avatarUrl())); $this->element('cc:licence', array('rdf:resource' => common_config('license', 'url')));