Bug 19532: (follow-up) Fixes along recall workflow
[koha-ffzg.git] / misc / cronjobs / share_usage_with_koha_community.pl
index affa043..fa6d598 100755 (executable)
@@ -2,13 +2,14 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
+use Koha::Script -cron;
 use C4::Context;
 use C4::UsageStats;
-use C4::Log;
-use POSIX qw(strftime);
+use C4::Log qw( cronlogaction );
+use POSIX qw( strftime );
 
 my ( $help, $verbose, $force, $quiet );
 GetOptions(
@@ -19,8 +20,7 @@ GetOptions(
 ) || pod2usage(1);
 
 if ($help) {
-    pod2usage(1);
-    exit;
+    pod2usage(0);
 }
 
 unless ( C4::Context->preference('UsageStats') ) {
@@ -71,7 +71,7 @@ Only the total number is retrieved. In no case will private data be shared!
 
 In order to know which parts of Koha modules are used, this script will collect some system preference values.
 
-If you want to tell us who you are, you can fill the UsageStatsLibraryName system preference with your library name, UsageStatsLibraryUrl, UsageStatsLibraryType and/or UsageStatsCountry.
+If you want to tell us who you are, you can fill the UsageStatsLibraryName system preference with your library name, UsageStatsLibraryUrl, UsageStatsLibraryType and/or UsageStatsCountry, UsageStatsLibrariesInfo.
 
 All these data will be analyzed on the http://hea.koha-community.org Koha community website.
 
@@ -114,11 +114,17 @@ Copyright 2014 BibLibre
 
 This file is part of Koha.
 
-Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 3 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU General Public License along
-with Koha; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =cut