X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frssaction.php;h=c3e1283fed0d2c90a472cbfa8239793da52f56ea;hb=7e65f4f6ea86124c074e72ea42c07cd6a99887a0;hp=dac7fa4606e8d4fa5563f4229b10fc8a22b5a275;hpb=87d46e1ae5e5effcc985021ff5af3f10815f3d3c;p=quix0rs-gnu-social.git diff --git a/lib/rssaction.php b/lib/rssaction.php index dac7fa4606..c3e1283fed 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -89,7 +89,7 @@ class Rss10Action extends Action if (!isset($_SERVER['PHP_AUTH_USER'])) { // This header makes basic auth go - header('WWW-Authenticate: Basic realm="StatusNet RSS"'); + header('WWW-Authenticate: Basic realm="GNU social RSS"'); // If the user hits cancel -- bam! $this->show_basic_auth_error(); @@ -278,8 +278,8 @@ class Rss10Action extends Action $attachments = $notice->attachments(); if($attachments){ foreach($attachments as $attachment){ - $enclosure=$attachment->getEnclosure(); - if ($enclosure) { + try { + $enclosure = $attachment->getEnclosure(); $attribs = array('rdf:resource' => $enclosure->url); if ($enclosure->title) { $attribs['dc:title'] = $enclosure->title; @@ -294,6 +294,8 @@ class Rss10Action extends Action $attribs['enc:type'] = $enclosure->mimetype; } $this->element('enc:enclosure', $attribs); + } catch (ServerException $e) { + // There was not enough metadata available } $this->element('sioc:links_to', array('rdf:resource'=>$attachment->url)); }