You are here

function _mongodb_watchdog_sort_top in MongoDB 6

Same name and namespace in other branches
  1. 7 mongodb_watchdog/mongodb_watchdog.admin.inc \_mongodb_watchdog_sort_top()

Helper function for usort() to sort top entries returned from a group query.

Parameters

array $x: The first entry to compare.

array $y: The second entry to compare.

Return value

bool As per uasort() expectations.

1 string reference to '_mongodb_watchdog_sort_top'
mongodb_watchdog_page_top in mongodb_watchdog/mongodb_watchdog.admin.inc
Page callback for "admin/reports/[access-denied|page-not-found]".

File

mongodb_watchdog/mongodb_watchdog.admin.inc, line 554
Settings for mongodb. Moved back to module file.

Code

function _mongodb_watchdog_sort_top(array $x, array $y) {
  $cx = $x['count'];
  $cy = $y['count'];
  return $cy - $cx;
}