fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-11-04 11:19 am

[dw-free] Revamp /update

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

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

Don't blow away existing ordering if we didn't post anything (e.g., when JS
is off, we get redirected to a page where you can tweak visibility, but not
order)

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Controller/Entry.pm
--------------------------------------------------------------------------------
diff -r 11a48ac8fe2f -r b04f39db8113 cgi-bin/DW/Controller/Entry.pm
--- a/cgi-bin/DW/Controller/Entry.pm	Fri Nov 04 17:00:01 2011 +0800
+++ b/cgi-bin/DW/Controller/Entry.pm	Fri Nov 04 19:20:15 2011 +0800
@@ -1132,6 +1132,7 @@
 
 
                 my @columns;
+                my $didpost_order = 0;
                 foreach my $column_index ( 0...2 ) {
                     my @col;
 
@@ -1139,12 +1140,13 @@
                         my ( $order, $panel ) = m/(\d+):(.+)_component/;
                         $col[$order] = $panel;
 
+                        $didpost_order = 1;
                     }
 
                     # remove any in-betweens in case we managed to skip a number in the order somehow
                     $columns[$column_index] = [ grep { $_ } @col];
                 }
-                $u->entryform_panels_order( \@columns );
+                $u->entryform_panels_order( \@columns ) if $didpost_order;
             }
 
             $u->set_prop( js_animations_minimal => $post->{minimal_animations} );
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org