Changeset 5966
- Timestamp:
- Apr 26, 2010, 2:29:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/PWG/Categories.pm
r4779 r5966 42 42 43 43 # find the parent 44 # sort by global rank, descending 45 # to make sure children come before their parents 44 46 map { 45 46 47 my $child = $records->{$_}; 48 my $parentid = _parentid($child); 47 49 if(defined $parentid){ 48 50 _addchild( … … 53 55 } 54 56 } 55 sort { $ b <=> $a}57 sort { $records->{$b}->[7] cmp $records->{$a}->[7] } 56 58 keys %$records; 57 59 … … 97 99 my $parent; 98 100 if( 1 < scalar @ucats ){ 99 101 $parent = $ucats[scalar @rank - 2 ]; 100 102 } 101 103 my $rank = $rank[scalar @rank - 1 ]; … … 118 120 $parent, 119 121 $rank, 122 $category->{global_rank}, 120 123 ]; 121 124 }
Note: See TracChangeset
for help on using the changeset viewer.