Author: weaverryan
Date: 2010-02-08 02:20:14 +0100 (Mon, 08 Feb 2010)
New Revision: 27691

Modified:
   
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/sfSympalContentActionLoader.class.php
Log:
[1.4][sfSympalPlugin][1.0] Improving the stock 404 message that seems to most 
commonly occur if you have an sfSympalContent record without any related 
content type record. This would be a common mistake that a developer might 
make, and now we communicate it better.


Modified: 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/sfSympalContentActionLoader.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/sfSympalContentActionLoader.class.php
  2010-02-08 01:19:01 UTC (rev 27690)
+++ 
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalRenderingPlugin/lib/sfSympalContentActionLoader.class.php
  2010-02-08 01:20:14 UTC (rev 27691)
@@ -199,8 +199,14 @@
         {
           $this->_actions->forward('sympal_default', 'new_site');
         }
-
-        $this->_actions->forward404();
+        
+        $parameters = $this->_actions->getRoute()->getParameters();
+        $msg = sprintf(
+          'No %s record found that relates to sfSympalContent record id "%s"',
+          $parameters['sympal_content_type'],
+          $parameters['sympal_content_type_id']
+        );
+        $this->_actions->forward404($msg);
       }
     }
   }

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