@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_23866.perl | 7 +++++++ installer/data/mysql/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 9 +++++++++ .../intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 3 ++- .../intranet-tmpl/prog/en/modules/admin/usage_statistics.tt | 10 ++++++++-- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23866.perl --- a/installer/data/mysql/atomicupdate/bug_23866.perl +++ a/installer/data/mysql/atomicupdate/bug_23866.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE systempreferences SET value = '2' WHERE value = '0' AND variable = 'UsageStats'" ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23866 - Set HEA syspref to prompt for review)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -642,7 +642,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'), ('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'), ('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'), -('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'), +('UsageStats', 2, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'), ('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'), ('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'), ('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library.', 'Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -30,6 +30,15 @@ [% END %] [% END %] + [% IF ( CAN_user_parameters_manage_usage_stats ) %] + [% IF ( Koha.Preference('UsageStats') == 2 ) %] +
+ [% END %] + [% END %]misc/cronjobs/share_usage_with_koha_community.pl
cronjob. Ask your system administrator to schedule it."
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt
@@ -57,12 +57,18 @@