diff --git a/node_revision_delete.module b/node_revision_delete.module index bbdddd2d80d7d66399b3a3f4f863dbc7b39816da..eb1e3f41e9f0343157c4d6e419da0e2562b7b664 100755 --- a/node_revision_delete.module +++ b/node_revision_delete.module @@ -266,9 +266,13 @@ function node_revision_delete_cron() { // Flag used to count how many have been deleted in this cron run. $total_deleted = 0; foreach ($node_revision_delete_track as $content_type => $content_type_info) { - // Extracting variables. - extract($node_revision_delete_track[$content_type]); - $candidate_nids = _node_revision_delete_candidates($content_type, $minimum_revisions_to_keep, $minimum_age_to_delete, $when_to_delete); + $candidate_nids = _node_revision_delete_candidates( + $content_type, + $content_type_info['minimum_revisions_to_keep'], + $content_type_info['minimum_age_to_delete'], + $content_type_info['when_to_delete'] + ); + if (!empty($candidate_nids)) { foreach ($candidate_nids as $nid) { $deleted_revisions = _node_revision_delete_do_delete($nid, $node_revision_delete_track[$content_type]['minimum_revisions_to_keep']);