aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2011-02-11 17:46:50 -0200
committerSilvio <silvio@devlet.com.br>2011-02-11 17:46:50 -0200
commit13eb4f9490a28180fae9b46ce83bbc82b68996ca (patch)
tree8fc10426364c84ff4605a963b575731fe693049c
parentc3477ee61325016d0ac09c0cdaf95649cae54393 (diff)
downloadnode_truncate-13eb4f9490a28180fae9b46ce83bbc82b68996ca.tar.gz
node_truncate-13eb4f9490a28180fae9b46ce83bbc82b68996ca.tar.bz2
Batch cleanup
-rw-r--r--node_truncate.module5
1 files changed, 1 insertions, 4 deletions
diff --git a/node_truncate.module b/node_truncate.module
index ce0f294..9583ccf 100644
--- a/node_truncate.module
+++ b/node_truncate.module
@@ -100,7 +100,6 @@ function node_truncate($type, &$context) {
->addExpression('COUNT(DISTINCT(nid))');
$context['sandbox']['progress'] = 0;
- $context['sandbox']['current_node'] = 0;
$context['sandbox']['max'] = $query->execute()->fetchField();
}
@@ -115,9 +114,7 @@ function node_truncate($type, &$context) {
while ($row = $result->fetchAssoc()) {
$node = node_delete($row['nid'], NULL, TRUE);
$context['sandbox']['progress']++;
- $context['sandbox']['current_node'] = $node->nid;
- $context['results'][] = $node->nid . ' : ' . check_plain($node->title);
- $context['message'] = check_plain($node->title);
+ $context['results'][] = $row['nid'];
}
if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
$context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];