diff --git a/C4/Auth.pm b/C4/Auth.pm index 268ef3544b..03b80685e1 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -398,7 +398,7 @@ sub get_template_and_user { AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), AutoLocation => C4::Context->preference("AutoLocation"), "BiblioDefaultView" . C4::Context->preference("IntranetBiblioDefaultView") => 1, - CalendarFirstDayOfWeek => ( C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday" ) ? 0 : 1, + CalendarFirstDayOfWeek => C4::Context->preference("CalendarFirstDayOfWeek"), CircAutocompl => C4::Context->preference("CircAutocompl"), FRBRizeEditions => C4::Context->preference("FRBRizeEditions"), IndependentBranches => C4::Context->preference("IndependentBranches"), @@ -472,7 +472,7 @@ sub get_template_and_user { AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), BranchesLoop => GetBranchesLoop($opac_name), BranchCategoriesLoop => GetBranchCategories( 'searchdomain', 1, $opac_name ), - CalendarFirstDayOfWeek => ( C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday" ) ? 0 : 1, + CalendarFirstDayOfWeek => C4::Context->preference("CalendarFirstDayOfWeek"), LibraryName => "" . C4::Context->preference("LibraryName"), LibraryNameTitle => "" . $LibraryNameTitle, LoginBranchname => C4::Context->userenv ? C4::Context->userenv->{"branchname"} : "", diff --git a/installer/data/mysql/de-DE/mandatory/system_preferences.sql b/installer/data/mysql/de-DE/mandatory/system_preferences.sql index 42f36b70d0..e90fd0d38e 100644 --- a/installer/data/mysql/de-DE/mandatory/system_preferences.sql +++ b/installer/data/mysql/de-DE/mandatory/system_preferences.sql @@ -30,7 +30,8 @@ UPDATE systempreferences SET value =
  • Google Scholar
  • Online-Buchhandel (Bookfinder.com)
  • ' WHERE variable = 'OPACSearchForTitleIn'; -UPDATE systempreferences SET value = 'Monday' WHERE variable = 'CalendarFirstDayOfWeek'; +-- Sunday = 0, Monday = 1, etc. +UPDATE systempreferences SET value = '1' WHERE variable = 'CalendarFirstDayOfWeek'; UPDATE systempreferences SET value = '0.07|0.19|0.00' WHERE variable = 'gist'; UPDATE systempreferences SET value = 'Dieser Text wird über den Systemparameter RoutingListNote konfiguriert.' where variable = 'RoutingListNote'; UPDATE systempreferences SET value = 'barcode stocknumber' WHERE variable = 'uniqueitemfields'; diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql index eeedc86367..cef85008ae 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql @@ -26,6 +26,7 @@ UPDATE systempreferences SET value = 'nb-NO' WHERE variable = 'opaclanguages'; UPDATE systempreferences SET value = '

    Velkommen til Koha...


    ' WHERE variable = 'OpacMainUserBlock'; UPDATE systempreferences SET value = '

    Viktige lenker kan plasseres her

    ' WHERE variable = 'OpacNav'; UPDATE systempreferences SET value = '
  • Andre bibliotek (WorldCat)
  • Andre databaser (Google Scholar)
  • Nettbutikker (Bookfinder.com)
  • ' WHERE variable = 'OPACSearchForTitleIn'; -UPDATE systempreferences SET value = 'Monday' WHERE variable = 'CalendarFirstDayOfWeek'; +-- Sunday = 0, Monday = 1, etc. +UPDATE systempreferences SET value = '1' WHERE variable = 'CalendarFirstDayOfWeek'; UPDATE systempreferences SET value = 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Æ Ø Å' WHERE variable = 'alphabet'; UPDATE systempreferences SET value = 'nor' WHERE variable = 'DefaultLanguageField008'; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index a34357198f..a8efad1129 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -75,7 +75,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BorrowerUnwantedField','',NULL,'Name the fields you don\'t need to store for a patron\'s account','free'), ('BranchTransferLimitsType','ccode','itemtype|ccode','When using branch transfer limits, choose whether to limit by itemtype or collection code.','Choice'), ('CalculateFinesOnReturn','1','','Switch to control if overdue fines are calculated on return or not','YesNo'), -('CalendarFirstDayOfWeek','Sunday','Sunday|Monday','Select the first day of week to use in the calendar.','Choice'), +('CalendarFirstDayOfWeek','0','0|1|2|3|4|5|6','Select the first day of week to use in the calendar.','Choice'), ('canreservefromotherbranches','1','','With Independent branches on, can a user from one library place a hold on an item from another library','YesNo'), ('CardnumberLength', '', '', 'Set a length for card numbers.', 'Free'), ('casAuthentication','0','','Enable or disable CAS authentication','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a04d784047..f9e3c3791d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10688,6 +10688,22 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.21.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + UPDATE systempreferences SET value='0' WHERE variable='CalendarFirstDayOfWeek' AND value='Sunday'; + }); + $dbh->do(q{ + UPDATE systempreferences SET value='1' WHERE variable='CalendarFirstDayOfWeek' AND value='Monday'; + }); + $dbh->do(q{ + UPDATE systempreferences SET options='0|1|2|3|4|5|6' WHERE variable='CalendarFirstDayOfWeek'; + }); + + print "Upgrade to $DBversion done (Bug 12137 - Extend functionality of CalendarFirstDayOfWeek to be any day)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref index df78154501..6bf97939f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref @@ -19,10 +19,15 @@ I18N/L10N: - - Use - pref: CalendarFirstDayOfWeek - default: Sunday + default: 0 choices: - Sunday: Sunday - Monday: Monday + 0: Sunday + 1: Monday + 2: Tuesday + 3: Wednesday + 4: Thursday + 5: Friday + 6: Saturday - as the first day of week in the calendar. - - "Enable the following languages on the staff interface:"