@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_22774.perl | 18 ++++++++++++++++++ .../prog/en/modules/admin/preferences/opac.pref | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_22774.perl --- a/installer/data/mysql/atomicupdate/bug_22774.perl +++ a/installer/data/mysql/atomicupdate/bug_22774.perl @@ -0,0 +1,18 @@ +$DBversion = '19.12.00.XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); + $dbh->do( q{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES + ('MaxTotalSuggestions','','Number of total suggestions','Free'), + ('NumberOfSuggestionDays','','days','Free') + }); + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 22774 - Limit Purchase Suggestion in a specified Time period)\n"; +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -695,6 +695,14 @@ OPAC: - pref: MaxOpenSuggestions class: integer - "open suggestions. Leave empty for no limit. **Note: this setting does not affect anonymous suggestions" + - + - Number of total suggestions + - pref: MaxTotalSuggestions + class: integer + - "for" + - pref: NumberOfSuggestionDays + class: integer + - "days." Privacy: - - pref: AnonSuggestions --