Revision 419

Date:
2014/02/20 19:14:13
Author:
ahitrov
Revision Log:
More accurate section add-link
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/sections.html

     
    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 );