|
Lines 46-52
$debug or $debug = $cgi_debug;
Link Here
|
| 46 |
my $do_it = $input->param('do_it'); |
46 |
my $do_it = $input->param('do_it'); |
| 47 |
my @modules = $input->param("modules"); |
47 |
my @modules = $input->param("modules"); |
| 48 |
my $user = $input->param("user"); |
48 |
my $user = $input->param("user"); |
| 49 |
my $action = $input->param("action"); |
49 |
my @action = $input->param("action"); |
| 50 |
my $object = $input->param("object"); |
50 |
my $object = $input->param("object"); |
| 51 |
my $info = $input->param("info"); |
51 |
my $info = $input->param("info"); |
| 52 |
my $datefrom = $input->param("from"); |
52 |
my $datefrom = $input->param("from"); |
|
Lines 103-114
$template->param(
Link Here
|
| 103 |
|
103 |
|
| 104 |
if ($do_it) { |
104 |
if ($do_it) { |
| 105 |
|
105 |
|
| 106 |
my $results = GetLogs($datefrom,$dateto,$user,\@modules,$action,$object,$info); |
106 |
my @data; |
| 107 |
my $total = scalar @$results; |
107 |
my $results = GetLogs($datefrom,$dateto,$user,\@modules,\@action,$object,$info); |
| 108 |
foreach my $result (@$results){ |
108 |
@data=@$results; |
| 109 |
if ($result->{'info'} eq 'item'){ |
109 |
my $total = scalar @data; |
|
|
110 |
foreach my $result (@data){ |
| 111 |
if ($result->{'info'} eq 'item'||$result->{module} eq "CIRCULATION"){ |
| 110 |
# get item information so we can create a working link |
112 |
# get item information so we can create a working link |
| 111 |
my $item=GetItem($result->{'object'}); |
113 |
my $itemnumber=$result->{'object'}; |
|
|
114 |
$itemnumber=$result->{'info'} if ($result->{module} eq "CIRCULATION"); |
| 115 |
my $item=GetItem($itemnumber); |
| 112 |
$result->{'biblionumber'}=$item->{'biblionumber'}; |
116 |
$result->{'biblionumber'}=$item->{'biblionumber'}; |
| 113 |
$result->{'biblioitemnumber'}=$item->{'biblionumber'}; |
117 |
$result->{'biblioitemnumber'}=$item->{'biblionumber'}; |
| 114 |
} |
118 |
} |
|
Lines 119-131
if ($do_it) {
Link Here
|
| 119 |
$template->param ( |
123 |
$template->param ( |
| 120 |
logview => 1, |
124 |
logview => 1, |
| 121 |
total => $total, |
125 |
total => $total, |
| 122 |
looprow => $results, |
126 |
looprow => \@data, |
| 123 |
do_it => 1, |
127 |
do_it => 1, |
| 124 |
datefrom => $datefrom, |
128 |
datefrom => $datefrom, |
| 125 |
dateto => $dateto, |
129 |
dateto => $dateto, |
| 126 |
user => $user, |
130 |
user => $user, |
| 127 |
object => $object, |
131 |
object => $object, |
| 128 |
action => $action, |
132 |
action => \@action, |
| 129 |
info => $info, |
133 |
info => $info, |
| 130 |
src => $src, |
134 |
src => $src, |
| 131 |
); |
135 |
); |
|
Lines 143-149
if ($do_it) {
Link Here
|
| 143 |
-filename => "$basename.csv" |
147 |
-filename => "$basename.csv" |
| 144 |
); |
148 |
); |
| 145 |
my $sep = C4::Context->preference("delimiter"); |
149 |
my $sep = C4::Context->preference("delimiter"); |
| 146 |
foreach my $line (@$results) { |
150 |
foreach my $line (@data) { |
| 147 |
#next unless $modules[0] eq "catalogue"; |
151 |
#next unless $modules[0] eq "catalogue"; |
| 148 |
foreach (qw(timestamp firstname surname action info title author)) { |
152 |
foreach (qw(timestamp firstname surname action info title author)) { |
| 149 |
print $line->{$_} . $sep; |
153 |
print $line->{$_} . $sep; |
| 150 |
- |
|
|