mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-03-21 11:00 pm

[dw-free] Zeroes replacing empty text fields on Generator journal layout

[commit: http://hg.dwscoalition.org/dw-free/rev/ef00e8e44daa]

http://bugs.dwscoalition.org/show_bug.cgi?id=532

Use empty strings, not 0, to prevent storing 0 for strings.

Patch by [personal profile] afuna.

Files modified:
  • cgi-bin/LJ/Widget/S2PropGroup.pm
--------------------------------------------------------------------------------
diff -r a3ea1c10f5fa -r ef00e8e44daa cgi-bin/LJ/Widget/S2PropGroup.pm
--- a/cgi-bin/LJ/Widget/S2PropGroup.pm	Sat Mar 21 22:57:14 2009 +0000
+++ b/cgi-bin/LJ/Widget/S2PropGroup.pm	Sat Mar 21 23:00:20 2009 +0000
@@ -362,7 +362,7 @@ sub handle_post {
         LJ::Customize->save_s2_props($u, $style, \%override, reset => 1);
         LJ::Customize->save_language($u, $post->{langcode}, reset => 1) if defined $post->{langcode};
     } else {
-        my %override = map { $_ => 0 } keys %$post;
+        my %override = map { $_ => "" } keys %$post;
         
         # ignore all values after the first true $value
         # only checkboxes have multiple values (forced post of 0, 
--------------------------------------------------------------------------------