? substr.txt ? tracker.patch ? node.patch Index: node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.351 diff -u -F^f -r1.351 node.module --- node.module 3 May 2004 17:38:40 -0000 1.351 +++ node.module 12 May 2004 15:35:48 -0000 @@ -674,7 +674,8 @@ function node_admin_nodes() { array(t('Promote the selected posts'), 'UPDATE {node} SET status = 1, promote = 1 WHERE nid = %d'), array(t('Make the selected posts static'), 'UPDATE {node} SET status = 1, static = 1 WHERE nid = %d'), array(t('Demote the selected posts'), 'UPDATE {node} SET promote = 0 WHERE nid = %d'), - array(t('Unpublish the selected posts'), 'UPDATE {node} SET status = 0 WHERE nid = %d') + array(t('Unpublish the selected posts'), 'UPDATE {node} SET status = 0 WHERE nid = %d'), + array(t('Delete the selected unpublished posts'), 'DELETE FROM {node} WHERE moderate = 0 AND nid = %d') ); /* @@ -696,6 +697,10 @@ function node_admin_nodes() { foreach ($_POST['edit']['status'] as $nid => $value) { if ($value) { db_query($operation, $nid); + if (!db_affected_rows()) { + $node = db_fetch_object(db_query("SELECT title FROM {node} WHERE nid = %d", $nid)); + drupal_set_message(t("the update for the node '%title' failed.", array('%title' => $node->title)), 'error'); + } } }