You are here

function _evercurrent_write_status in Evercurrent 7.2

Same name and namespace in other branches
  1. 7 evercurrent.send.inc \_evercurrent_write_status()

Discontinues the process of sending updates. Saves a status, message and last try time.

Parameters

$severity:

$message:

2 calls to _evercurrent_write_status()
evercurrent_run_update_check in ./evercurrent.send.inc
_evercurrent_send_updates in ./evercurrent.send.inc

File

./evercurrent.send.inc, line 132

Code

function _evercurrent_write_status($severity, $message) {
  $message = check_plain($message);
  variable_set(RMH_STATUS, $severity);
  variable_set(RMH_STATUS_MESSAGE, $message);

  // If error, also log to watchdog.
  if ($severity == RMH_STATUS_ERROR) {
    watchdog('RMH', $message, array(), WATCHDOG_ERROR);
  }

  // If successful, set the last try timestamp
  if ($severity == RMH_STATUS_OK) {
    variable_set(RMH_LAST_TRY, time());
  }
}