X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FBase.pm;h=838bad0a5b7f000e9eb8dca872cd44284d077ae7;hp=39708504a719d869b777b5b8a382f444f14713bd;hb=919e930aa9279b3c5cd12b593889cd6de79d67bf;hpb=75162bb14b3e38d66617077843f4dfdcaf09d5c4 diff --git a/rt/lib/RT/Base.pm b/rt/lib/RT/Base.pm index 39708504a..838bad0a5 100644 --- a/rt/lib/RT/Base.pm +++ b/rt/lib/RT/Base.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -69,7 +69,6 @@ RT::Base =cut -# {{{ sub CurrentUser =head2 CurrentUser @@ -100,20 +99,9 @@ sub CurrentUser { if ref $self->{'user'} && $self->{'user'} == $self; } - unless ( ref $self->{'user'} && $self->{'user'}->isa('RT::CurrentUser') ) { - my $msg = "$self was created without a CurrentUser." - ." Any RT object which is subclass of RT::Base must be created" - ." with a RT::CurrentUser or a RT::User object as the first argument."; - $msg .= "\n". Carp::longmess() if @_; - - $RT::Logger->error( $msg ); - return $self->{'user'} = undef; - } - return ( $self->{'user'} ); } -# }}} sub OriginalUser { my $self = shift; @@ -168,10 +156,10 @@ sub _ImportOverlays { my $class = shift; my ($package,undef,undef) = caller(); $package =~ s|::|/|g; - for (qw(Overlay Vendor Local)) { - my $filename = $package."_".$_.".pm"; + for my $type (qw(Overlay Vendor Local)) { + my $filename = $package."_".$type.".pm"; eval { require $filename }; - die $@ if ($@ && $@ !~ qr{^Can't locate $filename}); + die $@ if ($@ && $@ !~ m{^Can't locate $filename}); } }