-
sections.html
418 419 332 332 if ( $prop->{db_type} eq 'integer[]' ) { 333 333 my @sections = grep { $_ != $parent_new->id } $object->sections; 334 334 if ( @sections && $sections[0] == $owner->id ) { 335 if ( $ARGS{move} ) { 336 shift @sections; 337 unshift @sections, $parent_new->id; 338 } else { 339 push @sections, $parent_new->id; 340 } 341 } else { 342 if ( $ARGS{move} ) { 343 @sections = grep { $_ != $owner->id } @sections; 344 } 335 345 unshift @sections, $parent_new->id; 336 } else { 337 push @sections, $parent_new->id; 338 346 } 339 @sections = grep { $_ != $owner->id } @sections if $ARGS{move}; 340 347 $object->sections( @sections ); 341 348 } else { 342 349 $object->sections( $parent_new->id );