From 6bd38d3eabc79c68cb90193378c69825ddac2a43 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Wed, 15 Jun 2011 08:38:40 +0200 Subject: [PATCH] Bug 6537 - squashed version of the previous 5 commits, signed-off Bug 6537 - Move installer/data/mysql/en/mandatory/sysprefs.sql to installer/data/mysql/sysprefs.sql Bug 6537 - Make the web installer use installer/data/mysql/sysprefs.sql Bug 6537 - New syspref files with only the prefs that differ from the default I have mostly deleted old syspref files and created new ones, with a new name, mainly in order to reduce the risk of merge conflicts if the old syspref files are changed before this patch is pushed, if it is pushed. See http://wiki.koha-community.org/wiki/Simplified_syspref_handling_RFC for a description of how the new files were created to reflect sysprefs that differ from the global default. .txt files have been moved to reflect the new names of the SQL files they are associated with. Bug 6537 - Remove syspref-related tests in xt/ As far as I can see, the previous patches for this bug makes the syspref tests obsolete, and this patch removes them: xt/syspref.t xt/check_sysprefs.t Bug 6537 - Fix a problem in French syspref file Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- C4/Installer.pm | 3 + .../data/mysql/de-DE/mandatory/sysprefs.sql | 320 --------- .../de-DE/mandatory/system_preferences.sql | 20 + .../{sysprefs.txt => system_preferences.txt} | 0 .../data/mysql/es-ES/mandatory/sysprefs.sql | 319 --------- .../data/mysql/es-ES/mandatory/sysprefs.txt | 1 - .../es-ES/mandatory/system_preferences.sql | 20 + .../mandatory/system_preferences.txt} | 0 .../unimarc_standard_system_preferences.sql | 69 ++ ...> unimarc_standard_system_preferences.txt} | 0 .../unimarc_standard_systemprefs.sql | 321 --------- .../data/mysql/it-IT/necessari/sysprefs.sql | 307 -------- .../it-IT/necessari/system_preferences.sql | 70 ++ .../mysql/nb-NO/1-Obligatorisk/sysprefs.sql | 326 --------- .../1-Obligatorisk/system_preferences.sql | 29 + .../{sysprefs.txt => system_preferences.txt} | 0 .../data/mysql/pl-PL/mandatory/sysprefs.sql | 318 --------- .../pl-PL/mandatory/system_preferences.sql | 20 + .../{sysprefs.txt => system_preferences.txt} | 0 ...ferences_full_optimal_for_install_only.sql | 407 +---------- ..._preferences_only_translation_updating.sql | 667 ------------------ ..._preferences_only_translation_updating.txt | 1 - .../mysql/{en/mandatory => }/sysprefs.sql | 0 ...ferences_full_optimal_for_install_only.sql | 410 +---------- ..._preferences_only_translation_updating.sql | 667 ------------------ ..._preferences_only_translation_updating.txt | 1 - ...preferences_optimal_values_insert_only.sql | 2 - xt/check_sysprefs.t | 131 ---- xt/syspref.t | 138 ---- 29 files changed, 302 insertions(+), 4265 deletions(-) delete mode 100755 installer/data/mysql/de-DE/mandatory/sysprefs.sql create mode 100644 installer/data/mysql/de-DE/mandatory/system_preferences.sql rename installer/data/mysql/de-DE/mandatory/{sysprefs.txt => system_preferences.txt} (100%) delete mode 100755 installer/data/mysql/es-ES/mandatory/sysprefs.sql delete mode 100644 installer/data/mysql/es-ES/mandatory/sysprefs.txt create mode 100644 installer/data/mysql/es-ES/mandatory/system_preferences.sql rename installer/data/mysql/{en/mandatory/sysprefs.txt => es-ES/mandatory/system_preferences.txt} (100%) create mode 100644 installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_system_preferences.sql rename installer/data/mysql/fr-FR/1-Obligatoire/{unimarc_standard_systemprefs.txt => unimarc_standard_system_preferences.txt} (100%) delete mode 100755 installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql delete mode 100755 installer/data/mysql/it-IT/necessari/sysprefs.sql create mode 100644 installer/data/mysql/it-IT/necessari/system_preferences.sql delete mode 100644 installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql create mode 100644 installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql rename installer/data/mysql/nb-NO/1-Obligatorisk/{sysprefs.txt => system_preferences.txt} (100%) delete mode 100755 installer/data/mysql/pl-PL/mandatory/sysprefs.sql create mode 100644 installer/data/mysql/pl-PL/mandatory/system_preferences.sql rename installer/data/mysql/pl-PL/mandatory/{sysprefs.txt => system_preferences.txt} (100%) delete mode 100644 installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.sql delete mode 100644 installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.txt rename installer/data/mysql/{en/mandatory => }/sysprefs.sql (100%) delete mode 100644 installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.sql delete mode 100644 installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.txt delete mode 100755 xt/check_sysprefs.t delete mode 100755 xt/syspref.t diff --git a/C4/Installer.pm b/C4/Installer.pm index 80ef627c99..1c177b9681 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -354,6 +354,9 @@ sub load_sql_in_order { $request->execute; my ($systempreference) = $request->fetchrow; $systempreference = '' unless defined $systempreference; # avoid warning + # Make sure the global sysprefs.sql file is loaded first + my $globalsysprefs = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql"; + unshift(@fnames, $globalsysprefs); foreach my $file (@fnames) { # warn $file; undef $/; diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql deleted file mode 100755 index 6df6a9f70a..0000000000 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ /dev/null @@ -1,320 +0,0 @@ -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor',0,"If ON, the MARC editor won't display field/subfield descriptions",'','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowHoldDateInFuture','0','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACAllowHoldDateInFuture','0','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID, AWSPrivateKey, and AmazonAssocTag if enabled','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonReviews',0,'Display Amazon review on staff interface - You MUST set AWSAccessKeyID, AWSPrivateKey, and AmazonAssocTag if enabled','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems',0,'Turn ON Amazon Similar Items feature - You MUST set AWSAccessKeyID, AWSPrivateKey, and AmazonAssocTag if enabled','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID, AWSPrivateKey, and AmazonAssocTag if enabled','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems',0,'Turn ON Amazon Similar Items feature - You MUST set AWSAccessKeyID, AWSPrivateKey, and AmazonAssocTag if enabled','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web Services','US|CA|DE|FR|JP|UK','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',NULL,''); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','','YesNo'); - -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('authoritysep','--','Used to separate a list of authorities in a display. Usually --',10,'free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoBarcode','OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','incremental|annual|hbyymmincr|OFF','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoLocation',0,'If ON, IP authentication is enabled, blocking access to the staff client from unauthorized IP addresses',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutomaticItemReturn',1,'If ON, Koha will automatically set up a transfer of this item to its homebranch',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoMemberNum',1,'If ON, patron number is auto-calculated','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BiblioDefaultView','normal','Choose the default detail view in the catalog; choose between normal, marc or isbd','normal|marc|isbd','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerMandatoryField','zipcode|surname|cardnumber','Choose the mandatory fields for a patron\'s account',NULL,'free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('borrowerRelationship','Vater|Mutter','Define valid relationships between a guarantor & a guarantee (separated by | or ,)','','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersLog',1,'If ON, log edit/create/delete actions on patron data',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casAuthentication', '0', 'Enable or disable CAS authentication', '', 'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casLogout', '0', 'Does a logout from Koha should also log the user out of CAS?', '', 'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('casServerUrl', 'https://localhost:8443/cas', 'URL of the cas server', '', 'Free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CataloguingLog',1,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('checkdigit','none','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','none|katipo','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('COinSinOPACResults', 1, 'If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('delimiter',';','Define the default separator character for exporting reports',';|tabulation|,|/|\\|#|\|','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnhancedMessagingPreferences',0,'If ON, allows patrons to select to receive additional messages about items due or nearly due.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('expandedSearchOption',0,'If ON, set advanced search to be expanded by default',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FineNotifyAtCheckin',0,'If ON notify librarians of overdue fines on the items they are checking in.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FinesLog',1,'If ON, log fines',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hidelostitems',0,'If ON, disables display of\"lost\" items in OPAC.','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('hide_marc',0,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('WaitingNotifyAtCheckin',0,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IndependantBranches',0,'If ON, increases security between libraries',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('insecure',0,'If ON, bypasses all authentication. Be careful!',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetBiblioDefaultView','normal','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','normal|marc|isbd|labeled_marc','Choice'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('intranetcolorstylesheet','','Define the color stylesheet to use in the Staff Client','50','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetmainUserblock','','Add a block of HTML that will display on the intranet home page','70|10','Textarea'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetNav','','Use HTML tabs to add navigational links to the top-hand navigational bar in the Staff Client','70|10','Textarea'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('intranetreadinghistory',1,'If ON, Reading History is enabled for all patrons','','YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('intranetstylesheet','','Enter a complete URL to use an alternate layout stylesheet in Intranet','50','free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetUserCSS','','Add CSS to be included in the intranet in an embedded