From cca5daed60fcc325043d8c5af0469e59a28c4e32 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 16 Jun 2010 11:02:01 -0700 Subject: [PATCH] Fix the dataDefault for firstDayOfWeek. Fixes bug #11651 --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.9.7-7.9.8.pl | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 83a42f26e..747eb02da 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.9.8 + - fixed #11651: First Day of Week is a string... 7.9.7 - added #11571: Allow return from photo edit view to gallery edit view diff --git a/docs/upgrades/upgrade_7.9.7-7.9.8.pl b/docs/upgrades/upgrade_7.9.7-7.9.8.pl index fe94475e1..7c91d5648 100644 --- a/docs/upgrades/upgrade_7.9.7-7.9.8.pl +++ b/docs/upgrades/upgrade_7.9.7-7.9.8.pl @@ -22,6 +22,7 @@ use Getopt::Long; use WebGUI::Session; use WebGUI::Storage; use WebGUI::Asset; +use WebGUI::ProfileField; my $toVersion = '7.9.8'; @@ -31,6 +32,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +changeFirstDayOfWeekDefault($session); finish($session); # this line required @@ -44,6 +46,18 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +#---------------------------------------------------------------------------- +# Describe what our function does +sub changeFirstDayOfWeekDefault { + my $session = shift; + print "\tMake the default for firstDayOfWeek a number instead of a string... " unless $quiet; + my $profileField = WebGUI::ProfileField->new($session, 'firstDayOfWeek'); + my $properties = $profileField->get(); + $properties->{dataDefault} = 0; + $profileField->set($properties); + # and here's our code + print "DONE!\n" unless $quiet; +} # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------