X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FLog.pm;h=80c3493dfd94c4e1290c8833f31da45fef562585;hb=b47e0360d897c30cab80d0ccdf97c12a6ee62a87;hp=6b8ff17e45b26fad3a0cb26a22bcb6b292660d46;hpb=944831555e89c8fdb4dc865764de51887a98a23b;p=koha.git diff --git a/C4/Log.pm b/C4/Log.pm index 6b8ff17e45..80c3493dfd 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -31,7 +31,7 @@ use vars qw($VERSION @ISA @EXPORT); BEGIN { # set the version for version checking - $VERSION = 3.01; + $VERSION = 3.07.00.049; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(&logaction &GetLogStatus &displaylog &GetLogs); @@ -73,6 +73,7 @@ sub logaction { # the scalar '0'. my $userenv = C4::Context->userenv(); my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : 0; + $usernumber ||= 0; my $dbh = C4::Context->dbh; my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info) values (now(),?,?,?,?,?)"); @@ -240,7 +241,6 @@ sub GetLogs { my @logs; while( my $row = $sth->fetchrow_hashref ) { - $row->{$row->{module}} = 1; push @logs , $row; } return \@logs;