[Midnightbsd-cvs] mports: index.cgi: clean up some sorting stuff.

ctriv at midnightbsd.org ctriv at midnightbsd.org
Thu Oct 23 13:20:05 EDT 2008


Log Message:
-----------
clean up some sorting stuff.

Modified Files:
--------------
    mports/Tools/magus/www/data/magus:
        index.cgi (r1.18 -> r1.19)

-------------- next part --------------
Index: index.cgi
===================================================================
RCS file: /home/cvs/mports/Tools/magus/www/data/magus/index.cgi,v
retrieving revision 1.18
retrieving revision 1.19
diff -L Tools/magus/www/data/magus/index.cgi -L Tools/magus/www/data/magus/index.cgi -u -r1.18 -r1.19
--- Tools/magus/www/data/magus/index.cgi
+++ Tools/magus/www/data/magus/index.cgi
@@ -108,7 +108,7 @@
     run        => $_->port->run->id,
     osversion  => $_->port->run->osversion,
     id	       => $_->id,
-  }} sort { $a->port->run <=> $b->port->run } Magus::Lock->retrieve_all;
+  }} sort { ($a->machine->name cmp $b->machine->name) || ($a->port->run <=> $b->port->run) } Magus::Lock->retrieve_all;
 
   my @runs = map {{
     run       => $_->id,
@@ -276,7 +276,7 @@
     delete $where{$_} if m/\W/;
   }      
   
-  my @ports = Magus::Port->search_where(\%where, { order_by => 'name' });
+  my @ports = Magus::Port->search_where(\%where, { order_by => 'name,run' });
   
   if (@ports == 1) {
     my $id = $ports[0]->id;


More information about the Midnightbsd-cvs mailing list