[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
fu.
Files modified:
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
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} );
--------------------------------------------------------------------------------
