You are here

function revision_scheduler_operation_uasort in Revision scheduler 7

uasort() callback to order revision operations in proper execution order.

1 string reference to 'revision_scheduler_operation_uasort'
RevisionSchedulerUnitTestCase::testUasort in tests/RevisionSchedulerUnitTestCase.test

File

./revision_scheduler.module, line 552

Code

function revision_scheduler_operation_uasort($a, $b) {
  if ($a->time_scheduled != $b->time_scheduled) {
    return $a->time_scheduled < $b->time_scheduled ? -1 : 1;
  }
  else {
    return $a->id < $b->id ? -1 : 1;
  }
}