You are here

function _recently_read_sort_fcn in Recently Read 7.2

Same name and namespace in other branches
  1. 6 recently_read.module \_recently_read_sort_fcn()
  2. 7 recently_read.module \_recently_read_sort_fcn()
1 string reference to '_recently_read_sort_fcn'
recently_read_get_read_items in ./recently_read.module

File

./recently_read.module, line 319
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function _recently_read_sort_fcn($a, $b) {
  $delta = $b['timestamp'] - $a['timestamp'];
  if ($delta > 0) {
    return 1;
  }
  if ($delta < 0) {
    return -1;
  }
  return 0;
}