You are here

function mostpopular_get_last_run in Drupal Most Popular 6

Gets the last time the given service was run for the given interval. If no interval is specified, gets the most recent time for any interval.

Parameters

integer $sid: The service ID.

integer $iid: The interval ID.

Return value

integer The timestamp of the last time the service was run. If it was never run, returns 0.

File

./mostpopular.api.php, line 289
Provides functions for other modules to use to interact with the Most Popular data.

Code

function mostpopular_get_last_run($sid, $iid) {
  $run = MostPopularLastRun::fetch($sid, $iid);
  if (isset($run)) {
    return $run->last_run;
  }
  return 0;
}