Index: sections.html =================================================================== --- sections.html (revision 418) +++ sections.html (revision 419) @@ -332,11 +332,18 @@ if ( $prop->{db_type} eq 'integer[]' ) { my @sections = grep { $_ != $parent_new->id } $object->sections; if ( @sections && $sections[0] == $owner->id ) { + if ( $ARGS{move} ) { + shift @sections; + unshift @sections, $parent_new->id; + } else { + push @sections, $parent_new->id; + } + } else { + if ( $ARGS{move} ) { + @sections = grep { $_ != $owner->id } @sections; + } unshift @sections, $parent_new->id; - } else { - push @sections, $parent_new->id; } - @sections = grep { $_ != $owner->id } @sections if $ARGS{move}; $object->sections( @sections ); } else { $object->sections( $parent_new->id );