|
Lines 118-124
elsif ( $op eq 'add' ) {
Link Here
|
| 118 |
})->store; |
118 |
})->store; |
| 119 |
#log news addition |
119 |
#log news addition |
| 120 |
if (C4::Context->preference("NewsLog")) { |
120 |
if (C4::Context->preference("NewsLog")) { |
| 121 |
logaction('NEWS', 'ADD' , undef, $lang . ' | ' . $content); |
121 |
logaction('NEWS', 'ADD' , undef, $title . ' | ' . $lang . ' | ' . $content); |
| 122 |
} |
122 |
} |
| 123 |
print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl"); |
123 |
print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl"); |
| 124 |
} |
124 |
} |
|
Lines 141-147
elsif ( $op eq 'edit' ) {
Link Here
|
| 141 |
} |
141 |
} |
| 142 |
#log news modification |
142 |
#log news modification |
| 143 |
if (C4::Context->preference("NewsLog")) { |
143 |
if (C4::Context->preference("NewsLog")) { |
| 144 |
logaction('NEWS', 'MODIFY' , undef, $lang . ' | ' . $content); |
144 |
logaction('NEWS', 'MODIFY' , undef, $title . ' | ' . $lang . ' | ' . $content); |
| 145 |
} |
145 |
} |
| 146 |
print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl"); |
146 |
print $cgi->redirect("/cgi-bin/koha/tools/koha-news.pl"); |
| 147 |
} |
147 |
} |
|
Lines 151-157
elsif ( $op eq 'del' ) {
Link Here
|
| 151 |
if (C4::Context->preference("NewsLog")) { |
151 |
if (C4::Context->preference("NewsLog")) { |
| 152 |
foreach my $newsid ( @ids ) { |
152 |
foreach my $newsid ( @ids ) { |
| 153 |
my $n = Koha::News->find( $newsid ); |
153 |
my $n = Koha::News->find( $newsid ); |
| 154 |
logaction('NEWS', 'DELETE', undef, $n->lang . ' | ' . $n->content ); |
154 |
logaction('NEWS', 'DELETE', undef, $n->title . ' | ' . $n->lang . ' | ' . $n->content ); |
| 155 |
} |
155 |
} |
| 156 |
} |
156 |
} |
| 157 |
Koha::News->search({ idnew => \@ids })->delete; |
157 |
Koha::News->search({ idnew => \@ids })->delete; |
| 158 |
- |
|
|