diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 474bb9bcb..681566da3 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - SQL Form no longer ships with WebGUI. Use Thingy instead. However, out of respect for those using it, we only uninstall it if you have no sites using it. + - Depricated $session->errorHandler in favor of $session->log. - AssetProxy macro can now use asset id as a parameter like so: ^AssetProxy(abcdefghijklmnopqrstuv,assetId); - Exposed keywords API to all assets through edit screen. Now keywords are diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 4d67766aa..52749f09a 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -60,7 +60,7 @@ B It is important to distinguish the difference between a WebGUI session $session->db $session->dbSlave $session->env - $session->errorHandler + $session->log $session->form $session->http $session->icon @@ -261,16 +261,13 @@ sub env { =head2 errorHandler ( ) -Returns a WebGUI::Session::ErrorHandler object. +An alias for log(). Depricated. Will be removed in WebGUI 8. =cut sub errorHandler { my $self = shift; - unless (exists $self->{_errorHandler}) { - $self->{_errorHandler} = WebGUI::Session::ErrorHandler->new($self); - } - return $self->{_errorHandler}; + return $self->log; } #------------------------------------------------------------------- @@ -353,6 +350,22 @@ sub id { } +#------------------------------------------------------------------- + +=head2 log ( ) + +Returns a WebGUI::Session::ErrorHandler object, which is used for logging. + +=cut + +sub log { + my $self = shift; + unless (exists $self->{_errorHandler}) { + $self->{_errorHandler} = WebGUI::Session::ErrorHandler->new($self); + } + return $self->{_errorHandler}; +} + #------------------------------------------------------------------- =head2 open ( webguiRoot, configFile [, requestObject, serverObject, sessionId, noFuss ] ) diff --git a/sbin/userImport.pl b/sbin/userImport.pl index efc7e6f77..60644a6f5 100644 --- a/sbin/userImport.pl +++ b/sbin/userImport.pl @@ -305,7 +305,7 @@ while() { $u->status($user{status}); my $cmd = "WebGUI::Auth::".$authMethod; my $load = "use ".$cmd; - $session->errorHandler->fatal("Authentication module failed to compile: $cmd.".$@) if($@); + $session->log->fatal("Authentication module failed to compile: $cmd.".$@) if($@); eval($load); my $auth = eval{$cmd->new($session, $authMethod,$u->userId)}; $auth->saveParams($u->userId,"WebGUI",{identifier=>$user{identifier}});