You are here

function _auto_expire_notify_warning in Auto Expire 7

Same name and namespace in other branches
  1. 5 auto_expire.module \_auto_expire_notify_warning()

Sets up the warning notification for expiry.

Parameters

$nid:

$title:

$type:

$days:

$subject:

$body:

1 call to _auto_expire_notify_warning()
auto_expire_cron in ./auto_expire.module
Implements hook_cron().

File

./auto_expire.module, line 581

Code

function _auto_expire_notify_warning($nid, $title, $type, $days, $subject, $body) {
  $args = array(
    '!type' => $type,
    '@title' => $title,
    '!url' => url('node/' . $nid, array(
      'absolute' => TRUE,
    )),
    '!days' => $days,
    '!date' => format_date(_auto_expire_get_expire($nid)),
    '!daysleft' => format_interval(_auto_expire_get_expire($nid) - REQUEST_TIME),
    '!site' => variable_get('site_name', ''),
    '!siteurl' => url('<front>', array(
      'absolute' => TRUE,
    )),
  );
  _auto_expire_notify($nid, 'auto_expire_warning', $subject, $body, $args);
}