]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/atom10feed.php
Merge branch '0.9.x'
[quix0rs-gnu-social.git] / lib / atom10feed.php
index c1fdeaae935719e15c0fe8d2ac33955664759e61..8d4b66d8b89211d977c9b36d89c11edbb1193f33 100644 (file)
@@ -108,8 +108,9 @@ class Atom10Feed extends XMLStringer
         if (!empty($name)) {
             $xs->element('name', null, $name);
         } else {
+            // TRANS: Atom feed exception thrown when an author element does not contain a name element.
             throw new Atom10FeedException(
-                'author element must contain a name element.'
+                _('Author element must contain a name element.')
             );
         }
 
@@ -146,15 +147,17 @@ class Atom10Feed extends XMLStringer
     }
 
     /**
-     * Add a activity feed subject via raw XML string
+     * Deprecated <activity:subject>; ignored
      *
      * @param string $xmlSubject An XML string representation of the subject
      *
      * @return void
      */
+
     function setActivitySubject($xmlSubject)
     {
-        $this->subject = $xmlSubject;
+        // TRANS: Server exception thrown when using the method setActivitySubject() in the class Atom10Feed.
+        throw new ServerException(_('Do not use this method!'));
     }
 
     function getNamespaces()
@@ -176,6 +179,14 @@ class Atom10Feed extends XMLStringer
         }
         $this->elementStart('feed', $commonAttrs);
 
+        $this->element(
+            'generator', array(
+                'uri'     => 'http://status.net',
+                'version' => STATUSNET_VERSION
+            ),
+            'StatusNet'
+        );
+
         $this->element('id', null, $this->id);
         $this->element('title', null, $this->title);
         $this->element('subtitle', null, $this->subtitle);
@@ -315,5 +326,4 @@ class Atom10Feed extends XMLStringer
 
         array_push($this->links, $attrs);
     }
-
 }