# HG changeset patch # User Dominic Cleal # Date 1232916036 0 # Node ID 20870c5d9b458d976f96996fd6355f741c0a73d7 # Parent b231022614aaba84c0486816c71d10be09754ff8 Using name sorting, handling unknowns diff -r b231022614aa -r 20870c5d9b45 reproctool.cgi --- a/reproctool.cgi Sun Jan 25 20:03:54 2009 +0000 +++ b/reproctool.cgi Sun Jan 25 20:40:36 2009 +0000 @@ -220,7 +220,7 @@ INNER JOIN eveGraphics graphics ON types.graphicID = graphics.graphicID WHERE $sql_typenames GROUP BY types.typeID -ORDER BY groups.categoryID DESC, groupName ASC, typeName ASC +ORDER BY typeName ASC END my $pre_reprocess = $db->prepare($sql_reprocess); @@ -233,6 +233,7 @@ \$icon, \$ttrit, \$tpyer, \$tmexa, \$tisog, \$tnocx, \$tzydr, \$tmega, \$tmorp); +my $item_lookup = {}; my @output = (); while ($pre_reprocess->fetch()) { @@ -246,11 +247,14 @@ $meta = 0 unless defined $meta; $item = { id => $tid, name => $tname, meta => $meta, icon => $icon, price => $basePrice, reprocessIsk => $isk, reprocessDetails => $repDetails }; - - # If this item exists multiple times in the input, then they weren't stacked - # so output it multiple times - my @matching_in = grep({ $_ eq $tname } @item_names); - push @output, $item foreach (0..$#matching_in); + $item_lookup->{$tname} = $item; +} + +# Now match up the item lookups to the input list +foreach (sort @item_names) +{ + push @output, (exists $item_lookup->{$_} ? $item_lookup->{$_} + : { name => $_ } ); } my $col = 0; @@ -282,8 +286,8 @@ selling that item for a price below that number, its better to keep the item and reprocess it.

-As you might see, the items are listed just like your inventory in EVE. The -sorting is the same as when you sort by type. If you have this browser +As you might see, the items are listed similarly to your inventory in EVE. +You will need to sort your EVE window by name to match. If you have this browser window next to your inventory window, matching the columns(!), it is very easy to pick out those valuable items.