Show
Ignore:
Timestamp:
07/09/08 18:52:22 (17 months ago)
Author:
arvind
Message:

Capturing error on post_save for style directory

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/CommunityEdit/lib/MT/App/CommunityEdit.pm

    r814 r816  
    5454        $param{entry_status} = lc $entry->status_text; 
    5555        $param{magic_token} = $app->current_magic; 
    56  
     56    $param{error} = $app->param('error') || $app->errstr; 
     57     
    5758    my $ctx = $tmpl->context; 
    5859    $ctx->stash('author', $user); 
     
    167168        }  
    168169 
    169         $app->run_callbacks( 'api_post_save.entry', $app, $entry, $orig ); 
     170        my $save_result = $app->run_callbacks( 'api_post_save.entry', $app, $entry, $orig ); 
     171        if(!$save_result) { 
     172            my %param = (); 
     173            $param{error}       = $app->errstr; 
     174            $param{return_args} = $app->param('return_args'); 
     175            return $app->forward("edit_entry", \%param ); 
     176        } 
    170177 
    171178        $app->log(