You are here

public static function MostPopularLastRun::resetLastRun in Drupal Most Popular 6

Same name and namespace in other branches
  1. 7 classes/lastrun.php \MostPopularLastRun::resetLastRun()

Resets the last time the specified service was run.

Parameters

integer $sid: The service ID. If null, all services are reset.

integer $iid: The interval ID. If null, all intervals are reset.

3 calls to MostPopularLastRun::resetLastRun()
mostpopular_clear_caches in ./mostpopular.api.php
Clears all of the cached values from services, and resets the last time the service was run to 0.
mostpopular_service_config_form_submit in ./mostpopular.admin.inc
mostpopular_settings_form_submit in ./mostpopular.admin.inc

File

classes/lastrun.php, line 255
Defines a wrapper for the mostpopular_last_run table.

Class

MostPopularLastRun
@file Defines a wrapper for the mostpopular_last_run table.

Code

public static function resetLastRun($sid = NULL, $iid = NULL) {
  $runs = self::fetchAll($sid, $iid);
  foreach ($runs as $run) {
    $run->last_run = 0;
    $run
      ->save();
  }
}