PDA


View Full Version : [Bug] Problem with display order?


bluesteel
05-22-2004, 01:53 PM
Hi guys,
Found a possible bug in the Module display order.
I created a new module, and gave it the display order of 11.
It looks like the order is being sorted by alpha instead of numeric.
i.e. The modules appear on the page as 1,11,2,3,4 etc.
I tried other numbers and got the same result.

Brian
05-23-2004, 12:17 PM
Ahhh, good catch. :)

If you'll open your forum/includes/vba_cmps_include_bottom.php file and look for this line:

function order_mods($a, $b)
{
return strcmp($a['displayorder'], $b['displayorder']);
}


Replace that with this:


function order_mods($a, $b)
{
return ($a['displayorder'] < $b['displayorder']) ? -1 : 1;
}


And that should fix the problem. :)

bluesteel
05-31-2004, 10:38 AM
Cheers Brian (Missed this fix!)