Author: weaverryan
Date: 2010-01-24 22:04:22 +0100 (Sun, 24 Jan 2010)
New Revision: 27143

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/config/sfSympalEditorPluginConfiguration.class.php
Log:
[1.4][sfSympalPlugin][1.0] Not outputting the editor for 500 status codes - 
this sometimes causes a bad "Call to undefined function get_partial()" error 
instead of the exception.


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/config/sfSympalEditorPluginConfiguration.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/config/sfSympalEditorPluginConfiguration.class.php
    2010-01-24 19:25:13 UTC (rev 27142)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/config/sfSympalEditorPluginConfiguration.class.php
    2010-01-24 21:04:22 UTC (rev 27143)
@@ -76,11 +76,13 @@
 
   public function addEditorHtml(sfEvent $event, $content)
   {
-    if ($event->getSubject()->getStatusCode() != 404)
+    $statusCode = $event->getSubject()->getStatusCode();
+    
+    if ($statusCode == 404 || $statusCode == 500)
     {
-      return str_replace('</body>', get_sympal_editor().'</body>', $content);
-    } else {
-      return $content;
+      //return $content;
     }
+    
+    return str_replace('</body>', get_sympal_editor().'</body>', $content);
   }
 }
\ 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