Skip to content

Commit

Permalink
[#735 state:resolved] Removed trans_error method from MT.pm since i…
Browse files Browse the repository at this point in the history
…t already inherits one from MT::ErrorHandler which does the exact same thing and hence is redundant. Also promoted its alias, `errtrans()`, MT::ErrorHandler to make it available as universally as the former.
  • Loading branch information
jayallen committed Feb 3, 2011
1 parent bbc3d97 commit 7f496ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions lib/MT.pm
Expand Up @@ -2272,13 +2272,6 @@ sub supported_languages {
\%langs;
} ## end sub supported_languages

# For your convenience
sub trans_error {
my $app = shift;
return $app->error( $app->translate(@_) );
}
*errtrans = \&trans_error;

sub all_text_filters {
unless (%Text_filters) {
if ( my $filters = MT->registry('text_filters') ) {
Expand Down
1 change: 1 addition & 0 deletions lib/MT/ErrorHandler.pm
Expand Up @@ -31,6 +31,7 @@ sub trans_error {
return $obj->error(
$obj->can('translate') ? $obj->translate(@_) : MT->translate(@_) );
}
*errtrans = \&trans_error;

sub errstr { ref( $_[0] ) ? $_[0]->{_errstr} : $ERROR }

Expand Down

0 comments on commit 7f496ab

Please sign in to comment.