]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
[fix] RSS Feeds don't validate / W3C #384
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index 87c00b78c970a03fd869c8145031db0706989b3b..0c4143e190f3a87c20dfe9109017588e38e4ff0f 100755 (executable)
@@ -35,6 +35,7 @@ class Poche
       'ru_RU.utf8' => 'Pусский',
       'sl_SI.utf8' => 'Slovenščina',
       'uk_UA.utf8' => 'Українська',
+      'pt_BR.utf8' => 'Brasileiro',
     );
     public function __construct()
     {
@@ -366,7 +367,7 @@ class Poche
         // Saving and clearing context
         $REAL = array();
         foreach( $GLOBALS as $key => $value ) {
-            if( $key != "GLOBALS" && $key != "_SESSION" ) {
+            if( $key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS' ) {
                 $GLOBALS[$key] = array();
                 $REAL[$key] = $value;
             }
@@ -660,6 +661,7 @@ class Poche
                     'entries' => '',
                     'page_links' => '',
                     'nb_results' => '',
+                    'listmode' => (isset($_COOKIE['listmode']) ? true : false),
                 );
                 
                 //if id is given - we retrive entries by tag: id is tag id
@@ -1145,8 +1147,9 @@ class Poche
         $feed = new FeedWriter(RSS2);
         $feed->setTitle('wallabag — ' . $type . ' feed');
         $feed->setLink(Tools::getPocheUrl());
-        $feed->setChannelElement('updated', date(DATE_RSS , time()));
-        $feed->setChannelElement('author', 'wallabag');
+        $feed->setChannelElement('pubDate', date(DATE_RSS , time()));
+        $feed->setChannelElement('generator', 'wallabag');
+        $feed->setDescription('wallabag ' . $type . ' elements');
 
         if ($type == 'tag') {
             $entries = $this->store->retrieveEntriesByTag($tag_id, $user_id);