Show
Ignore:
Timestamp:
10/03/08 01:07:01 (14 months ago)
Author:
bchoate
Message:

Merging fireball branch changes to-date to trunk: svn merge -r2974:3081 http://code.sixapart.com/svn/movabletype/branches/fireball .

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/MT/CMS/Blog.pm

    r3001 r3082  
    532532    my $type = $app->param('_type') || 'entry'; 
    533533    my @ids  = $app->param('id'); 
    534     $app->{goback} = "window.location='" . $app->return_uri . "'"; 
     534    $app->{goback} = $app->return_uri; 
    535535    $app->{value} ||= $app->translate('Go Back'); 
    536536    if ( $type eq 'entry' ) { 
     
    611611                $edit_type = $entry ? $entry->class : 'entry'; 
    612612            } 
    613             $app->{goback} = 
    614               "window.location='" 
    615               . $app->object_edit_uri( $edit_type, $obj_id ) . "'"; 
     613            $app->{goback} = $app->object_edit_uri( $edit_type, $obj_id ); 
    616614            $app->{value} ||= $app->translate('Go Back'); 
    617615        } 
     
    691689    elsif ($type) { 
    692690        my $special = 0; 
    693         my @options = $app->{rebuild_options} ||= {}; 
     691        my @options; 
     692        my $opts = $app->registry("rebuild_options") || {}; 
     693        if ($opts) { 
     694            foreach my $opt ( keys %$opts ) { 
     695                $opts->{$opt}{key} ||= $opt; 
     696                push @options, $opts->{$opt}; 
     697            } 
     698        } 
    694699        $app->run_callbacks( 'rebuild_options', $app, \@options ); 
    695700        for my $optn (@options) { 
    696701            if ( ( $optn->{key} || '' ) eq $type ) { 
     702                my $code = $optn->{code}; 
     703                unless ( ref($code) eq 'CODE' ) { 
     704                    $code = MT->handler_to_coderef($code); 
     705                    $optn->{code} = $code; 
     706                } 
    697707                $optn->{code}->(); 
    698708                $special = 1;