fixed #9851: New Users have blank profile field privacy settings

This commit is contained in:
Yung Han Khoe 2009-06-03 15:24:20 +00:00
parent 8d12d12db0
commit 1ea08936f4
5 changed files with 48 additions and 1 deletions

View file

@ -22,6 +22,7 @@
that still allows non-realm based Basic authentication.
- fixed #10228: Calendar: Weekly re-occurence function not working properly
( Martin Kamerbeek / Oqapi )
- fixed #9851: New Users have blank profile field privacy settings
7.7.8
- fixed: Basic Auth doesn't work if password contains colon (Arjan Widlak,

View file

@ -34,6 +34,7 @@ my $session = start(); # this line required
# upgrade functions go here
repackTemplates( $session );
deleteUnattachedAddressBooks( $session );
addDefaultPrivacySettings( $session );
finish($session); # this line required
@ -47,6 +48,16 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
sub addDefaultPrivacySettings {
my $session = shift;
print "\tAdding default privacy setting to profile fields..." unless $quiet;
$session->db->write("alter table userProfileField add defaultPrivacySetting char(128);");
$session->db->write("update userProfileField set defaultPrivacySetting = 'all' where profileCategoryId IN(2,3,6);");
$session->db->write("update userProfileField set defaultPrivacySetting = 'none' where !(profileCategoryId IN(2,3,6));");
print "Done.\n" unless $quiet;
}
#----------------------------------------------------------------------------
# Repack all templates since the packed columns may have been wiped out due to the bug.
sub repackTemplates {