You are here

function _devel_table_sort in Devel 5

Same name and namespace in other branches
  1. 6 devel.module \_devel_table_sort()
  2. 7 devel.module \_devel_table_sort()
1 string reference to '_devel_table_sort'
devel_query_table in ./devel.module
Adds a table at the bottom of the page cataloguing data on all the database queries that were made to generate the page.

File

./devel.module, line 1216

Code

function _devel_table_sort($a, $b) {
  $a = is_array($a[0]) ? $a[0]['data'] : $a[0];
  $b = is_array($b[0]) ? $b[0]['data'] : $b[0];
  if ($a < $b) {
    return 1;
  }
  if ($a > $b) {
    return -1;
  }
  return 0;
}