[geeklog-hg] geeklog: Partial fix for bug regarding feed validator error

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 31 12:59:43 EDT 2014


changeset 9540:4510fbe249c2
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4510fbe249c2
user: Tom
date: Sun Aug 31 12:59:41 2014 -0400
description:
Partial fix for bug regarding feed validator error

diffstat:

 system/classes/syndication/rss.feed.class.php |  44 +++++++++++---------------
 1 files changed, 18 insertions(+), 26 deletions(-)

diffs (70 lines):

diff -r cba303c2aa0f -r 4510fbe249c2 system/classes/syndication/rss.feed.class.php
--- a/system/classes/syndication/rss.feed.class.php	Tue Aug 12 17:18:16 2014 +0900
+++ b/system/classes/syndication/rss.feed.class.php	Sun Aug 31 12:59:41 2014 -0400
@@ -113,21 +113,11 @@
                  .  '</comments>' . self::LB;
         }
 
-        if (array_key_exists('topic', $article)) {
-            $topic = (array) $article['topic'];
-
-            foreach ($topic as $subject) {
-                $xml .= '<dc:subject>'
-                     .  $this->_safeXML($subject)
-                     .  '</dc:subject>' . self::LB;
-            }
-        }
-
         if (array_key_exists('summary', $article) && (strlen($article['summary']) > 0)) {
-            $xml .= '<description>'
-                 .  $this->_safeXML($article['summary'])
-                 .  '</description>' . self::LB;
-        }
+        	$xml .= '<description>'
+            	 . $this->_safeXML($article['summary'])
+                 . '</description>' . self::LB;
+        }        
 
         if (isset($article['extensions']) && is_array($article['extensions'])) {
             $xml .= implode(self::LB, $article['extensions']) . self::LB;
@@ -159,15 +149,17 @@
                  .  $this->_safeXML($this->description)
                  .  '</description>' . self::LB;
         }
-
+        
         if (strlen($this->sitecontact) > 0) {
-            $xml .= '<managingEditor>'
-                 .  $this->_safeXML($this->sitecontact)
-                 .  '</managingEditor>' . self::LB
-                 .  '<webMaster>'
-                 .   $this->_safeXML($this->sitecontact)
-                 .  '</webMaster>' . self::LB;
-        }
+             $xml .= '<managingEditor>'
+                  . $this->_safeXML($this->sitecontact)
+                  . ' (' . $_CONF['site_name'] . ')'
+                  . '</managingEditor>' . self::LB
+                  . '<webMaster>'
+                  . $this->_safeXML($this->sitecontact)
+                  . ' (' . $_CONF['site_name'] . ')'
+                  . '</webMaster>' . self::LB;
+         }        
 
         if (strlen($this->copyright) > 0) {
             $xml .= '<copyright>'
@@ -329,10 +321,10 @@
              . '<link>' . $this->_safeXML($article['link'], false) . '</link>' . self::LB;
 
         if (array_key_exists('summary', $article) && (strlen($article['summary']) > 0)) {
-            $xml .= '<description>'
-                 .  $this->_safeXML($article['summary'])
-                 .  '</description>' . self::LB;
-        }
+        	$xml .= '<description>'
+            	 . $this->_safeXML($article['summary'])
+            	 . '</description>' . self::LB;
+         }        
 
         if (is_array($article['extensions'])) {
             $xml .= implode(self::LB, $article['extensions']) . self::LB;



More information about the geeklog-cvs mailing list