Line 0
Link Here
|
0 |
- |
1 |
|
|
|
2 |
#!/usr/bin/perl -w |
3 |
|
4 |
# Copyright 2010 Biblibre SARL |
5 |
# |
6 |
# This file is part of Koha. |
7 |
# |
8 |
# Koha is free software; you can redistribute it and/or modify it under the |
9 |
# terms of the GNU General Public License as published by the Free Software |
10 |
# Foundation; either version 2 of the License, or (at your option) any later |
11 |
# version. |
12 |
# |
13 |
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
14 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
15 |
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU General Public License along |
18 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
19 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
21 |
use strict; |
22 |
use warnings; |
23 |
use utf8; |
24 |
|
25 |
BEGIN { |
26 |
|
27 |
# find Koha's Perl modules |
28 |
# test carefully before changing this |
29 |
use FindBin; |
30 |
eval { require "$FindBin::Bin/../kohalib.pl" }; |
31 |
} |
32 |
|
33 |
use Getopt::Long; |
34 |
use Pod::Usage; |
35 |
use C4::Letters; |
36 |
|
37 |
my ($help); |
38 |
|
39 |
GetOptions( |
40 |
'help|?' => \$help |
41 |
); |
42 |
|
43 |
if($help){ |
44 |
print <<EOF |
45 |
This script delete message without subject nor content. |
46 |
It has to be run before sending messages. |
47 |
Parameters : |
48 |
-help|? This message |
49 |
|
50 |
example : |
51 |
export PERL5LIB=/path/to/koha;export KOHA_CONF=/etc/koha/koha-conf.xml;./purge_message_queue.pl |
52 |
EOF |
53 |
; |
54 |
exit; |
55 |
} |
56 |
|
57 |
DelEmptyMessages(); |
58 |
|