Rule to set expired flag fails
bob-hinrichs - April 3, 2009 - 21:26
| Project: | Node Expire |
| Version: | 6.x-2.03 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Changing the code in node_expire.rules.inc seemed to fix it, though I cannot find why the code originally tested a variable $close, that appears to be a global variable of some kind but does not exist anywhere in this or the rules module.
line 76, changed
if (empty($close)) {
to if (empty($nid_no)) {
function node_expire_set_expired($nids, $set = FALSE) {
static $nid_no = array();
if (empty($nid_no)) {
$nid_no[] = $node->nid;
}
else {
if ($nids = array_diff($nids, $nid_no)) {
db_query('UPDATE {node_expire} SET expired = 1
WHERE nid IN ('. implode(',', $nids) .')');
}
}
}