Changeset 2535

Show
Ignore:
Timestamp:
06/10/08 02:18:16 (20 months ago)
Author:
fumiakiy
Message:

Send return_url when static parameter is not available. BugId:79864

Location:
branches/release-39/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/lib/MT/App/Comments.pm

    r2463 r2535  
    219219            } 
    220220        ); 
    221         return $app->login( error => $app->translate('Invalid login.') ); 
     221        return $app->login_form( error => $app->translate('Invalid login.') ); 
    222222    } 
    223223 
     
    237237                $commenter = 
    238238                  $app->_create_commenter_assign_role( $q->param('blog_id') ); 
    239                 return $app->login( error => $app->translate('Invalid login') ) 
     239                return $app->login_form( error => $app->translate('Invalid login') ) 
    240240                  unless $commenter; 
    241241            } 
     
    243243                my $registration = $app->config->CommenterRegistration; 
    244244                unless ( $registration && $registration->{Allow} && $blog->allow_commenter_regist ) { 
    245                     return $app->login( error => $app->translate('Successfully authenticated but signing up is not allowed.  Please contact system administrator.') ) 
     245                    return $app->login_form( error => $app->translate('Successfully authenticated but signing up is not allowed.  Please contact system administrator.') ) 
    246246                      unless $commenter; 
    247247                } 
     
    286286    $ctx->{app} ||= $app; 
    287287    MT::Auth->invalidate_credentials($ctx); 
    288     return $app->login( error => $error || $app->translate("Invalid login") ); 
     288    return $app->login_form( error => $error || $app->translate("Invalid login") ); 
    289289} 
    290290 
     
    335335        sub { 
    336336            $app->_send_signup_confirmation( $user->id, $user->email, 
    337                 $param->{entry_id}, $param->{blog_id}, $param->{static} ); 
     337                $param->{entry_id}, $param->{blog_id}, $param->{static} || $param->{return_url} ); 
    338338        } 
    339339    ); 
     
    532532    } 
    533533 
    534     $app->login( 
     534    $app->login_form( 
    535535        message => $app->translate( 
    536536            'Thanks for the confirmation.  Please sign in to comment.') 
  • branches/release-39/lib/MT/Template/ContextHandlers.pm

    r2530 r2535  
    1263812638 
    1263912639sub _load_sibling_categories { 
    12640     my ($ctx, $cat) = @_; 
     12640    my ($ctx, $cat, $class_type) = @_; 
    1264112641    my $blog_id = $cat->blog_id; 
    1264212642    my $r = MT::Request->instance; 
     
    1264412644    return $cats if $cats; 
    1264512645 
    12646     my @cats = MT::Category->load({blog_id => $blog_id, parent => $cat->parent}, 
     12646    my $class = MT->model($class_type); 
     12647    my @cats = $class->load({blog_id => $blog_id, parent => $cat->parent}, 
    1264712648                                  {'sort' => 'label', direction => 'ascend'}); 
    1264812649    $r->stash('__cat_cache_'.$blog_id.'_'.$cat->parent, \@cats); 
     
    1268312684        (($uncompiled =~ /<MT:?Pages/i) ? 1 : 0); 
    1268412685    my $blog_id = $cat->blog_id; 
    12685     my $cats = _load_sibling_categories($ctx, $cat); 
     12686    my $cats = _load_sibling_categories($ctx, $cat, $class_type); 
    1268612687    my ($pos, $idx); 
    1268712688    $idx = 0;