Author: Jonathan.Wage
Date: 2010-02-10 16:47:21 +0100 (Wed, 10 Feb 2010)
New Revision: 27817

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/content/sfSympalContentRenderer.class.php
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/modules/sympal_content_renderer/lib/Basesympal_content_rendererActions.class.php
Log:
[1.4][sfSympalPlugin][1.0] Fix for endless recursion


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/content/sfSympalContentRenderer.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/content/sfSympalContentRenderer.class.php
      2010-02-10 15:46:46 UTC (rev 27816)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/content/sfSympalContentRenderer.class.php
      2010-02-10 15:47:21 UTC (rev 27817)
@@ -51,6 +51,7 @@
 
   public function render()
   {
+    $this->_format = $this->_format ? $this->_format : 'html';
     $variables = $this->getRenderVariables();
 
     if ($this->_format == 'html')
@@ -80,19 +81,14 @@
           $return = $event->getReturnValue();
         }
     }
-    if (isset($return))
+    if (isset($return) && $return)
     {
-      if ($return)
-      {
-        $response = $this->_symfonyContext->getResponse();
-        $response->setContent($return);
-        $response->send();
-        exit;
-      } else {
-        return $this;
-      }
+      $response = $this->_symfonyContext->getResponse();
+      $response->setContent($return);
+      $response->send();
+      exit;
     } else {
-      return $this;
+      throw new RuntimeException(sprintf('Unknown render format: "%s"', 
$this->_format));
     }
   }
 

Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/modules/sympal_content_renderer/lib/Basesympal_content_rendererActions.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/modules/sympal_content_renderer/lib/Basesympal_content_rendererActions.class.php
   2010-02-10 15:46:46 UTC (rev 27816)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/modules/sympal_content_renderer/lib/Basesympal_content_rendererActions.class.php
   2010-02-10 15:47:21 UTC (rev 27817)
@@ -4,6 +4,6 @@
 {
   public function executeIndex(sfWebRequest $request)
   {
-    $this->renderer = 
$this->getSympalContentActionLoader()->loadContentRenderer()->renderNonHtmlFormats();
+    $this->renderer = 
$this->getSympalContentActionLoader()->loadContentRenderer();
   }
 }
\ No newline at end of file

-- 
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