From 322c2a6c43c20c7cbd9cd9fb1e8b829c6039b0f9 Mon Sep 17 00:00:00 2001 From: Jay Allen Date: Tue, 27 Jul 2010 12:06:46 -0700 Subject: [PATCH] [#353 state:resolved] Promoted `MT::App::errtrans` to its parent class (the root `MT` class) and aliased it to the identical `MT::trans_error()` method to eliminate the confusion of having two identical methods with two different names in two different classes. Phew! --- lib/MT.pm | 3 ++- lib/MT/App.pm | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/MT.pm b/lib/MT.pm index cdd7ee7fb..1b4cf8491 100644 --- a/lib/MT.pm +++ b/lib/MT.pm @@ -1999,8 +1999,9 @@ sub supported_languages { # For your convenience sub trans_error { my $app = shift; - $app->error( $app->translate(@_) ); + return $app->error( $app->translate(@_) ); } +*errtrans = \&trans_error; sub all_text_filters { unless (%Text_filters) { diff --git a/lib/MT/App.pm b/lib/MT/App.pm index 5666cbc46..b10708049 100644 --- a/lib/MT/App.pm +++ b/lib/MT/App.pm @@ -3720,11 +3720,6 @@ sub document_root { return $cwd; } -sub errtrans { - my $app = shift; - return $app->error( $app->translate(@_) ); -} - sub DESTROY { ## Destroy the Request object, which is used for caching ## per-request data. We have to do this manually, because in