- Timestamp:
- 01/29/09 15:09:14 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ActionTrackerPlugin/lib/Foswiki/Plugins/ActionTrackerPlugin/ActionSet.pm
r2226 r2227 89 89 # of attributes by string value 90 90 sub sort { 91 my ( $this, $order ) = @_; 91 my ( $this, $order, $reverse ) = @_; 92 my @ordered; 92 93 if ( defined( $order ) ) { 93 94 $order =~ s/[^\w,]//g; 94 95 @_sortfields = split( /,\s*/, $order ); 95 @ {$this->{ACTIONS}}= sort {96 @ordered = sort { 96 97 foreach my $sf ( @_sortfields ) { 97 98 return -1 unless ref($a); … … 115 116 } @{$this->{ACTIONS}}; 116 117 } else { 117 @ {$this->{ACTIONS}}=118 @ordered = 118 119 sort { 119 120 my $x = $a->secsToGo(); … … 121 122 return $x <=> $y; 122 123 } @{$this->{ACTIONS}}; 124 } 125 if (Foswiki::Func::isTrue($reverse)) { 126 @{$this->{ACTIONS}} = reverse @ordered; 127 } else { 128 @{$this->{ACTIONS}} = @ordered; 123 129 } 124 130 }
Note: See TracChangeset
for help on using the changeset viewer.
