You are here

function node_expire_set_expired in Node expire 7

Same name and namespace in other branches
  1. 8 node_expire.module \node_expire_set_expired()
  2. 6.2 node_expire.module \node_expire_set_expired()

Sets expired values.

Parameters

int $nid: Node ID that should set the expired flag.

1 call to node_expire_set_expired()
node_expire_cron in ./node_expire.module
Implements hook_cron().

File

./node_expire.module, line 281
Set a timer into your content, allowing you to perform customized actions.

Code

function node_expire_set_expired($nid) {
  db_update('node_expire')
    ->fields(array(
    'expired' => 1,
    'lastnotify' => REQUEST_TIME,
  ))
    ->condition('nid', $nid)
    ->condition(db_or()
    ->condition('lastnotify', 0)
    ->condition('expired', 1, '!='))
    ->execute();
}