[Jifty-commit] jifty branch, master, updated. 1bec81cb8221733f8f6dbc219ec161784292fef8

Jifty commits jifty-commit at lists.jifty.org
Thu Dec 31 12:28:40 EST 2009


The branch, master has been updated
       via  1bec81cb8221733f8f6dbc219ec161784292fef8 (commit)
       via  cd7d6c981a493ab6cabca36479a9dd62ae234542 (commit)
      from  28da6bb998865f7a7978bed13f6c12a6bc5027f6 (commit)

Summary of changes:
 lib/Jifty/CurrentUser.pm                           |   15 +++---
 lib/Jifty/Handler.pm                               |    2 +-
 lib/Jifty/JSON.pm                                  |   14 +++---
 lib/Jifty/Manual/Cookbook.pod                      |    2 +-
 .../Plugin/Authentication/Password/Action/Login.pm |   14 +++---
 .../Password/Notification/ConfirmEmail.pm          |    4 +-
 lib/Jifty/Plugin/ClassLoader.pm                    |   44 ++++++++--------
 lib/Jifty/Plugin/SinglePage.pm                     |   14 +++---
 lib/Jifty/Script/FastCGI.pm                        |    6 +-
 lib/Jifty/Script/Model.pm                          |    2 +-
 lib/Jifty/Test.pm                                  |   54 ++++++++++----------
 lib/Jifty/Test/WWW/Mechanize.pm                    |    6 +-
 lib/Jifty/Test/WWW/Selenium.pm                     |   32 ++++++------
 lib/Jifty/View/Declare/CRUD.pm                     |    6 +-
 lib/Jifty/View/Mason/Request.pm                    |    2 +-
 lib/Jifty/Web.pm                                   |   12 ++--
 lib/Jifty/Web/PageRegion.pm                        |   30 ++++++------
 17 files changed, 129 insertions(+), 130 deletions(-)

- Log -----------------------------------------------------------------
commit cd7d6c981a493ab6cabca36479a9dd62ae234542
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Dec 31 12:22:04 2009 -0500

    Don't just blank the login_token, remove it from the session entirely

diff --git a/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm b/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
index 69cf477..d394ef1 100755
--- a/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
+++ b/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
@@ -169,14 +169,15 @@ time out the request.
 sub validate_token {
     my $self = shift;
     my $value = shift;
+    my $token = Jifty->web->session->get('login_token');
+    Jifty->web->session->remove('login_token');
     if ($value) {
         if(int $value < (time - TOKEN_EXPIRE_TIME)) { 
             return $self->validation_error(token => "Your login attempt has timed out. Please try again.");
         }
-        if ($value ne Jifty->web->session->get('login_token')) {
+        if ($value ne $token) {
             return $self->validation_error(token => "That didn't work. Please try again.");
         }
-        Jifty->web->session->set(login_token => '');
     }
     return $self->validation_ok("token");
 }
@@ -204,7 +205,6 @@ sub take_action {
             $self->result->error($BAD_PW);
             return;
         }
-        Jifty->web->session->set( login_token => '' );
     } else {                # no password hashing over the wire
         unless ( $user->id && $user->password_is($password) ) {
             $self->result->error($BAD_PW);

commit 1bec81cb8221733f8f6dbc219ec161784292fef8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Dec 31 12:28:01 2009 -0500

    Die, tabs, die!

diff --git a/lib/Jifty/CurrentUser.pm b/lib/Jifty/CurrentUser.pm
index 001e6ee..ce82bb3 100644
--- a/lib/Jifty/CurrentUser.pm
+++ b/lib/Jifty/CurrentUser.pm
@@ -57,16 +57,15 @@ Applications should override this method to provide any application-specific use
 
 If you do nothing, code similar to this will be called by _init.
 
-	sub _init {
-	    my $self = shift;
-	    my %args = (@_);
-	
+    sub _init {
+        my $self = shift;
+        my %args = (@_);
         if (keys %args and UNIVERSAL::can(Jifty->app_class('Model', 'User'), 'new')) {
-	        $self->user_object(Jifty->app_class('Model', 'User')->new(current_user => $self));
-	        $self->user_object->load_by_cols(%args);
-	    }
+            $self->user_object(Jifty->app_class('Model', 'User')->new(current_user => $self));
+            $self->user_object->load_by_cols(%args);
+        }
         return 1;
-	}
+    }
 
 That is, it will attempt to load the columns given in the model named C<App::Model::User> (where I<App> is the name of your application class). If your notion of a user object isn't a typical Jifty model or named something else, you will definitely need to override this method. If you need to perform any additional initialization for user objects, you may want to override this as well.
 
diff --git a/lib/Jifty/Handler.pm b/lib/Jifty/Handler.pm
index 315f2eb..924e487 100644
--- a/lib/Jifty/Handler.pm
+++ b/lib/Jifty/Handler.pm
@@ -43,7 +43,7 @@ BEGIN {
         no warnings qw(redefine);
         *CGI::new = sub {
             return Jifty->handler->cgi if Jifty->handler->cgi;
-            CGI::__jifty_real_new(@_);	
+            CGI::__jifty_real_new(@_);
         }
     }
 };
diff --git a/lib/Jifty/JSON.pm b/lib/Jifty/JSON.pm
index f516532..040a21e 100644
--- a/lib/Jifty/JSON.pm
+++ b/lib/Jifty/JSON.pm
@@ -91,13 +91,13 @@ sub _objToJson_syck {
 
     local $JSON::Syck::SingleQuote = $args->{singlequote};
     local $JSON::Syck::ImplicitUnicode = 1;
-	my $json = JSON::Syck::Dump($obj);
-	if (! $args->{singlequote}) {
-		$json =~ s/\n\n\n/\\n/gs;	# fix syck bug
-		$json =~ s/\n/\\n/gs;		# just to be safe
-		$json =~ s/\r/\\r/gs;
-	}
-	return $json;
+        my $json = JSON::Syck::Dump($obj);
+        if (! $args->{singlequote}) {
+                $json =~ s/\n\n\n/\\n/gs;       # fix syck bug
+                $json =~ s/\n/\\n/gs;           # just to be safe
+                $json =~ s/\r/\\r/gs;
+        }
+        return $json;
 }
 
 # We should escape double-quotes somehow, so that we can guarantee
diff --git a/lib/Jifty/Manual/Cookbook.pod b/lib/Jifty/Manual/Cookbook.pod
index ccc9b40..c6de50b 100644
--- a/lib/Jifty/Manual/Cookbook.pod
+++ b/lib/Jifty/Manual/Cookbook.pod
@@ -348,7 +348,7 @@ You can use the canonicalization to change data in other fields.  For
 example you might want to update the postcode field when the suburb
 field is changed.
 
-	$self->argument_value( other_field => "new value" )
+        $self->argument_value( other_field => "new value" )
 
 
 =head2 Use iepngfix.htc to add PNG support in IE5.5+
diff --git a/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm b/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
index d394ef1..9985bfb 100755
--- a/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
+++ b/lib/Jifty/Plugin/Authentication/Password/Action/Login.pm
@@ -62,7 +62,7 @@ sub arguments {
 
               password => { type => 'password',
                             label => _('Password'),
-			    # mandatory in some cases; see validate_password
+                            # mandatory in some cases; see validate_password
                             mandatory => 0,
                         },
               hashed_password => { type => 'hidden',
@@ -73,9 +73,9 @@ sub arguments {
                             hints => _('Your browser can remember your login for you'),
                             default => 0,
                           },
-	      token => { type => 'hidden',
-			 label => 'token',
-			 mandatory => 0 },
+              token => { type => 'hidden',
+                         label => 'token',
+                         mandatory => 0 },
 
           });
 
diff --git a/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm b/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
index 1a820eb..012c4d5 100755
--- a/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
+++ b/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
@@ -26,8 +26,8 @@ sub setup {
     my $LoginUser   = Jifty->app_class('Model', 'User');
 
     unless ( UNIVERSAL::isa($self->to, $LoginUser) ){
-	$self->log->error((ref $self) . " called with invalid user argument");
-	return;
+        $self->log->error((ref $self) . " called with invalid user argument");
+        return;
     } 
    
 
diff --git a/lib/Jifty/Plugin/ClassLoader.pm b/lib/Jifty/Plugin/ClassLoader.pm
index ddce3fa..9a1aebe 100644
--- a/lib/Jifty/Plugin/ClassLoader.pm
+++ b/lib/Jifty/Plugin/ClassLoader.pm
@@ -123,50 +123,50 @@ sub Jifty::Plugin::ClassLoader::INC {
     # this is a class the plugin intends to autocreate
     if ( $module =~ m{^(?:$base)::CurrentUser$} ) {
         my $method = "${plugin}::CurrentUser";
-	if ( Jifty::Util->already_required($method) ) {
-	    Jifty->log->debug("Implementing $module using $method");
+        if ( Jifty::Util->already_required($method) ) {
+            Jifty->log->debug("Implementing $module using $method");
             $Jifty::ClassLoader::AUTOGENERATED{$module} = 1;
             return Jifty::ClassLoader->return_class(
                   "use warnings; use strict; package $module;\n"
                 . "use base qw/$method/;\n"
                 . "1;" ) 
-	}
-	else {
-	    Jifty->log->debug("Couldn't implement $module using $method");
-	}
+        }
+        else {
+            Jifty->log->debug("Couldn't implement $module using $method");
+        }
     } elsif ( $module =~ m!^(?:$base)::Action::(Create|Update|Delete|Search)([^\.]+)$! ) {
         my $model = "::Model::" . $2;
         my $method = $plugin . "::Action::" . $1 . $2;
 
         # Check to see if this is an action for a model that this plugin 
         # doesn't provide
-	return undef unless Jifty::Util->already_required("$plugin$model");
+        return undef unless Jifty::Util->already_required("$plugin$model");
 
-	if ( Jifty::Util->already_required($method) ) {
-	    Jifty->log->debug("Implementing $module using $method");
+        if ( Jifty::Util->already_required($method) ) {
+            Jifty->log->debug("Implementing $module using $method");
             $Jifty::ClassLoader::AUTOGENERATED{$module} = 1;
-	    return Jifty::ClassLoader->return_class(
+            return Jifty::ClassLoader->return_class(
                   "use warnings; use strict; package $module;\n"
                 . "use base qw/$method/;\n"
                 . "sub record_class { '$base$model' };\n"
                 . "1;" )
-	}
-	else {
-	    Jifty->log->debug("Couldn't implement $module using $method");
-	}
+        }
+        else {
+            Jifty->log->debug("Couldn't implement $module using $method");
+        }
     } elsif ( $module =~ m{^(?:$base)::(Action|Notification)([^\.]+)$} ) {
-	my $method = $plugin . "::" . $1 . $2;
-	if ( Jifty::Util->already_required($method) ) {
-	    Jifty->log->debug("Implementing $module using $method");
+        my $method = $plugin . "::" . $1 . $2;
+        if ( Jifty::Util->already_required($method) ) {
+            Jifty->log->debug("Implementing $module using $method");
             $Jifty::ClassLoader::AUTOGENERATED{$module} = 1;
-	    return Jifty::ClassLoader->return_class(
+            return Jifty::ClassLoader->return_class(
                   "use warnings; use strict; package $module;\n"
                 . "use base qw/$method/;\n"
                 . "1;" )
-	}
-	else {
-	    Jifty->log->debug("Couldn't implement $module using $method");
-	}
+        }
+        else {
+            Jifty->log->debug("Couldn't implement $module using $method");
+        }
 
     } 
 
diff --git a/lib/Jifty/Plugin/SinglePage.pm b/lib/Jifty/Plugin/SinglePage.pm
index d8eb3b4..7a0ed97 100644
--- a/lib/Jifty/Plugin/SinglePage.pm
+++ b/lib/Jifty/Plugin/SinglePage.pm
@@ -78,13 +78,13 @@ sub _sp_link {
                 args         => { %{$args->{parameters}}} });
         }
         elsif (exists $args->{submit} && !$args->{onclick}) {
-	    if ($args->{_form} && $args->{_form}{submit_to}) {
-		my $to = $args->{_form}{submit_to};
-		$self->_push_onclick($args, { beforeclick => qq{return SPA._sp_submit_form(this, event, "$to");} });
-	    }
-	    else {
-		$self->_push_onclick($args, { refresh_self => 1, submit => $args->{submit} });
-	    }
+            if ($args->{_form} && $args->{_form}{submit_to}) {
+                my $to = $args->{_form}{submit_to};
+                $self->_push_onclick($args, { beforeclick => qq{return SPA._sp_submit_form(this, event, "$to");} });
+            }
+            else {
+                $self->_push_onclick($args, { refresh_self => 1, submit => $args->{submit} });
+            }
             $args->{as_button} = 1;
         }
         if (my $form = delete $args->{_form}) {
diff --git a/lib/Jifty/Script/FastCGI.pm b/lib/Jifty/Script/FastCGI.pm
index 11bddee..bbda17b 100755
--- a/lib/Jifty/Script/FastCGI.pm
+++ b/lib/Jifty/Script/FastCGI.pm
@@ -141,9 +141,9 @@ sub run {
             $ENV{$_} = '' if (defined $ENV{$_} );
         }
         Jifty->handler->handle_request( cgi => $cgi );
-	if ($self->{maxrequests} && ++$requests >= $self->{maxrequests}) {
-	    exit 0;
-	}
+        if ($self->{maxrequests} && ++$requests >= $self->{maxrequests}) {
+            exit 0;
+        }
     }
 }
 
diff --git a/lib/Jifty/Script/Model.pm b/lib/Jifty/Script/Model.pm
index 6579984..ca9c673 100644
--- a/lib/Jifty/Script/Model.pm
+++ b/lib/Jifty/Script/Model.pm
@@ -170,7 +170,7 @@ sub _write {
         my ($volume, $dir, $file) = File::Spec->splitpath($path);
 
         # Make sure the directories we need are there
-	Jifty::Util->make_path($dir);
+        Jifty::Util->make_path($dir);
 
         # If it already exists, bail
         if (-e $path and not $self->{force}) {
diff --git a/lib/Jifty/Test.pm b/lib/Jifty/Test.pm
index ba15ac1..f6d3417 100644
--- a/lib/Jifty/Test.pm
+++ b/lib/Jifty/Test.pm
@@ -259,34 +259,34 @@ sub setup_test_database {
     }
 
     if ($ENV{JIFTY_FAST_TEST}) {
-	local $SIG{__WARN__} = sub {};
-	eval { Jifty->new( no_version_check => 1 ); Jifty->handle->check_schema_version };
-	my $booted;
-	if (Jifty->handle && !$@) {
-	    my $baseclass = Jifty->app_class;
-	    for my $model_class ( grep {/^\Q$baseclass\E::Model::/} Jifty::Schema->new->models ) {
-		# We don't want to get the Collections, for example.
-		next unless $model_class->isa('Jifty::DBI::Record');
-		Jifty->handle->simple_query('TRUNCATE '.$model_class->table );
-		Jifty->handle->simple_query('ALTER SEQUENCE '.$model_class->table.'_id_seq RESTART 1');
-	    }
-	    # Load initial data
-	    eval {
-		my $bootstrapper = Jifty->app_class("Bootstrap");
-		Jifty::Util->require($bootstrapper);
-		$bootstrapper->run() if $bootstrapper->can('run');
-	    };
-	    die $@ if $@;
-	    $booted = 1;
-	}
-	if (Jifty->handle) {
-	    Jifty->handle->disconnect;
-	    Jifty->handle(undef);
-	}
-	if ($booted) {
+        local $SIG{__WARN__} = sub {};
+        eval { Jifty->new( no_version_check => 1 ); Jifty->handle->check_schema_version };
+        my $booted;
+        if (Jifty->handle && !$@) {
+            my $baseclass = Jifty->app_class;
+            for my $model_class ( grep {/^\Q$baseclass\E::Model::/} Jifty::Schema->new->models ) {
+                # We don't want to get the Collections, for example.
+                next unless $model_class->isa('Jifty::DBI::Record');
+                Jifty->handle->simple_query('TRUNCATE '.$model_class->table );
+                Jifty->handle->simple_query('ALTER SEQUENCE '.$model_class->table.'_id_seq RESTART 1');
+            }
+            # Load initial data
+            eval {
+                my $bootstrapper = Jifty->app_class("Bootstrap");
+                Jifty::Util->require($bootstrapper);
+                $bootstrapper->run() if $bootstrapper->can('run');
+            };
+            die $@ if $@;
+            $booted = 1;
+        }
+        if (Jifty->handle) {
+            Jifty->handle->disconnect;
+            Jifty->handle(undef);
+        }
+        if ($booted) {
             Jifty->new();
-	    return;
-	}
+            return;
+        }
     }
 
     Jifty->new( no_handle => 1, pre_init => 1 );
diff --git a/lib/Jifty/Test/WWW/Mechanize.pm b/lib/Jifty/Test/WWW/Mechanize.pm
index 70da389..1eb037c 100644
--- a/lib/Jifty/Test/WWW/Mechanize.pm
+++ b/lib/Jifty/Test/WWW/Mechanize.pm
@@ -56,12 +56,12 @@ any more arguments to this method, or the method will return undef.
 NOTE that if you're using this in a series of different pages or forms, 
 you'll need to run it again for each new form:
 
-    $mech->fill_in_action_ok($mech->moniker_for('MyApp::Action::UpdateInfo'), 
+    $mech->fill_in_action_ok($mech->moniker_for('MyApp::Action::UpdateInfo'),
                              owner_id => 'someone');
-    $mech->submit_html_ok();  
+    $mech->submit_html_ok();
 
     is($mech->action_field_value($mech->moniker_for("MyApp::Action::UpdateInfo"),
-			     'owner_id'), 
+                                 'owner_id'),
        'someone',
        "Owner was reassigned properly to owner 'someone'");
 
diff --git a/lib/Jifty/Test/WWW/Selenium.pm b/lib/Jifty/Test/WWW/Selenium.pm
index cde2aec..051c120 100644
--- a/lib/Jifty/Test/WWW/Selenium.pm
+++ b/lib/Jifty/Test/WWW/Selenium.pm
@@ -42,7 +42,7 @@ sub rc_ok {
     my %args = @_;
 
     $class->_skip_rest("live test doesn't work on Win32 at the moment")
-		if $^O eq 'MSWin32';
+                if $^O eq 'MSWin32';
 
     $ENV{JIFTY_OPENID_WHITELIST_HOST} = $ENV{SELENIUM_RC_TEST_AGAINST} || 'localhost';
 
@@ -97,31 +97,31 @@ my @cleanup;
 sub _start_src {
     my ($self, %args) = @_;
     eval 'require Alien::SeleniumRC; 1'
-	or die 'requires Alien::SeleniumRC to start selenium-rc.';
+        or die 'requires Alien::SeleniumRC to start selenium-rc.';
 
     my $pid = fork();
     die if $pid == -1;
     if ($pid) {
-	push @cleanup, $pid;
-	return ('localhost', 4444);
+        push @cleanup, $pid;
+        return ('localhost', 4444);
     }
     else {
         unless ($^O eq 'MSWin32') {
             require POSIX;
             POSIX::setsid();  # Win32 doesn't have this.
         }
-	unless ($ENV{TEST_VERBOSE}) {
-	    close *STDERR;
-	    close *STDOUT;
-	}
-	$ENV{LANG} = $args{lang} || 'en_US.UTF-8';
-	$ENV{PATH} = "$ENV{PATH}:/usr/lib/firefox:/usr/lib/mozilla-firefox";
-	Test::More::diag "start selenium rc [$$]";
-	local $SIG{CHLD} = \&_REAPER;
-	local $SIG{TERM} = sub { exit 0 };
-	Alien::SeleniumRC::start(@{ $args{args} || [] });
-	Test::More::diag "selenium rc [$$] finished.";
-	exit;
+        unless ($ENV{TEST_VERBOSE}) {
+            close *STDERR;
+            close *STDOUT;
+        }
+        $ENV{LANG} = $args{lang} || 'en_US.UTF-8';
+        $ENV{PATH} = "$ENV{PATH}:/usr/lib/firefox:/usr/lib/mozilla-firefox";
+        Test::More::diag "start selenium rc [$$]";
+        local $SIG{CHLD} = \&_REAPER;
+        local $SIG{TERM} = sub { exit 0 };
+        Alien::SeleniumRC::start(@{ $args{args} || [] });
+        Test::More::diag "selenium rc [$$] finished.";
+        exit;
     }
 }
 
diff --git a/lib/Jifty/View/Declare/CRUD.pm b/lib/Jifty/View/Declare/CRUD.pm
index d7c48e5..cf96503 100644
--- a/lib/Jifty/View/Declare/CRUD.pm
+++ b/lib/Jifty/View/Declare/CRUD.pm
@@ -123,11 +123,11 @@ sub _dispatch_template {
     my $class = shift;
     my $code  = shift;
     if ($VIEW{$code} && !UNIVERSAL::isa($_[0], 'Evil')) {
-	my ( $object_type, $id ) = ( $class->object_type, get('id') );
-	@_ = ($class, $class->_get_record($id), @_);
+        my ( $object_type, $id ) = ( $class->object_type, get('id') );
+        @_ = ($class, $class->_get_record($id), @_);
     }
     else {
-	unshift @_, $class;
+        unshift @_, $class;
     }
     goto $code;
 }
diff --git a/lib/Jifty/View/Mason/Request.pm b/lib/Jifty/View/Mason/Request.pm
index 7e067aa..9b3f23b 100644
--- a/lib/Jifty/View/Mason/Request.pm
+++ b/lib/Jifty/View/Mason/Request.pm
@@ -46,7 +46,7 @@ sub exec
 
     if (my $err = $@)
     {
-	$retval = isa_mason_exception($err, 'Abort')   ? $err->aborted_value  :
+        $retval = isa_mason_exception($err, 'Abort')   ? $err->aborted_value  :
                   isa_mason_exception($err, 'Decline') ? $err->declined_value :
                   rethrow_exception $err;
     }
diff --git a/lib/Jifty/Web.pm b/lib/Jifty/Web.pm
index 02f465a..677dfb2 100644
--- a/lib/Jifty/Web.pm
+++ b/lib/Jifty/Web.pm
@@ -316,7 +316,7 @@ sub handle_request {
     # In the case where we have a continuation and want to redirect
     if ( $self->request->continuation_path && Jifty->web->request->argument('_webservice_redirect') ) {
         # for continuation - perform internal redirect under webservices
-	$self->webservices_redirect($self->request->continuation_path);
+        $self->webservices_redirect($self->request->continuation_path);
         return;
     }
 
@@ -781,8 +781,8 @@ sub _redirect {
     }
 
     if (my $redir = Jifty->web->request->argument('_webservice_redirect')) {
-	push @$redir, $page;
-	return;
+        push @$redir, $page;
+        return;
     }
     # $page can't lead with // or it assumes it's a URI scheme.
     $page =~ s{^/+}{/};
@@ -980,7 +980,7 @@ sub render_template {
     my $template = shift;
     my $handler;
     my $content;
-	my $void_context = ( defined wantarray ? 0 :1);
+        my $void_context = ( defined wantarray ? 0 :1);
 
     # Look for a possible handler, and cache it for future requests.
     # With DevelMode, always look it up.
@@ -1022,7 +1022,7 @@ sub render_template {
         if ($template eq '/errors/500') {
             $self->log->warn("Can't render internal_error: $err");
             # XXX Built-in static "oh noes" page?
-			die "ABORT";
+                        die "ABORT";
         }
 
         # XXX: This may leave a half-written tag open
@@ -1040,7 +1040,7 @@ sub render_template {
         Jifty->web->_redirect( "/errors/500?J:C=" . $c->id );
     } elsif ($err) {
         Jifty->handler->buffer->pop while Jifty->handler->buffer->depth > $start_depth;
-		die "ABORT";
+                die "ABORT";
 
     } else {
         return $content;
diff --git a/lib/Jifty/Web/PageRegion.pm b/lib/Jifty/Web/PageRegion.pm
index 35a7730..5db344f 100644
--- a/lib/Jifty/Web/PageRegion.pm
+++ b/lib/Jifty/Web/PageRegion.pm
@@ -368,28 +368,28 @@ sub render_as_subrequest {
 
     my %args;
     if ($self->path =~ m/\?/) {
-	# XXX: this only happens if we are redirect within region AND
-	# with continuation, which is already taken care of by the
-	# clone.
-	my ($path, $arg) = split(/\?/, $self->path, 2);
-	$subrequest->path( $path );
-	%args = (map { split /=/, $_ } split /&/, $arg);
-	if ($args{'J:C'}) {
-	    $subrequest->continuation($args{'J:C'});
-	}
+        # XXX: this only happens if we are redirect within region AND
+        # with continuation, which is already taken care of by the
+        # clone.
+        my ($path, $arg) = split(/\?/, $self->path, 2);
+        $subrequest->path( $path );
+        %args = (map { split /=/, $_ } split /&/, $arg);
+        if ($args{'J:C'}) {
+            $subrequest->continuation($args{'J:C'});
+        }
     }
     # Remove all of the actions
     unless ($enable_actions) {
-	$_->active(0) for ($subrequest->actions);
+        $_->active(0) for ($subrequest->actions);
     }
     # $subrequest->clear_actions;
     local Jifty->web->{request} = $subrequest;
     if ($args{'J:RETURN'}) {
-	my $top = Jifty->web->request->top_request;
-	my $cont = Jifty->web->session->get_continuation($args{'J:RETURN'});
-	$cont->return;
-	# need to set this as subrequest again as it's clobbered by the return
-	Jifty->web->request->top_request($top);
+        my $top = Jifty->web->request->top_request;
+        my $cont = Jifty->web->session->get_continuation($args{'J:RETURN'});
+        $cont->return;
+        # need to set this as subrequest again as it's clobbered by the return
+        Jifty->web->request->top_request($top);
     }
 
     # Call into the dispatcher

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list