Author: Jonathan.Wage
Date: 2010-01-17 01:59:06 +0100 (Sun, 17 Jan 2010)
New Revision: 26745

Modified:
   
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
Log:
[1.4][sfSympalPlugin][1.0] Another fix for rss feeds


Modified: 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php 
    2010-01-17 00:56:50 UTC (rev 26744)
+++ 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContent.class.php 
    2010-01-17 00:59:06 UTC (rev 26745)
@@ -310,6 +310,7 @@
       return $this->getRecord()->getFeedDescription();
     }
 
+    $slot = false;
     foreach ($this->getFeedDescriptionPotentialSlots() as $slotName)
     {
       if ($this->hasSlot($slotName))
@@ -319,14 +320,19 @@
       }
     }
 
-    if ($this->Slots->count() > 0)
+    if ($slot === false && $this->Slots->count() > 0)
     {
       $slot = $this->Slots->getFirst();
     }
 
-    $slot->setContentRenderedFor($this);
+    if ($slot instanceof sfSympalContentSlot)
+    {
+      $slot->setContentRenderedFor($this);
 
-    return $slot->render();
+      return $slot->render();
+    } else {
+      return (string) $this;
+    }
   }
 
   public function getFormatData($format)

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.


Reply via email to