[Jifty-commit] r3353 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Jun 4 20:18:53 EDT 2007


Author: clkao
Date: Mon Jun  4 20:18:52 2007
New Revision: 3353

Modified:
   jifty/trunk/lib/Jifty/Web.pm

Log:
Disable in-region redirect unless SPA is enabled.

Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Mon Jun  4 20:18:52 2007
@@ -689,10 +689,15 @@
 
 
 
-    if ($self->current_region) { 
-        # If we're within a region stack, we don't really want to redirect. We want to redispatch.
-        $self->replace_current_region($page);        
-
+    # It's an experimental feature to support redirect within a
+    # region.  It's currently enabled only for SPA.  We should make
+    # sure we understand what existing code is call this kind of replace.
+    my ($spa) = Jifty->find_plugin('Jifty::Plugin::SinglePage');
+
+    if ($spa && $self->current_region) { 
+        # If we're within a region stack, we don't really want to
+        # redirect. We want to redispatch.
+        $self->replace_current_region($page);
         Jifty::Dispatcher::_abort;
         return;
     }


More information about the Jifty-commit mailing list