diff options
-rw-r--r-- | modules/node/node.module | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index f1e23aeb1..4bc4b95e1 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1213,52 +1213,56 @@ function node_last_changed($nid) { */ function node_node_operations() { $operations = array( - 'approve' => array( - 'label' => t('Approve the selected posts'), - 'callback' => 'node_operations_approve', + 'publish' => array( + 'label' => t('Publish'), + 'callback' => 'node_operations_publish', + ), + 'unpublish' => array( + 'label' => t('Unpublish'), + 'callback' => 'node_operations_unpublish', ), 'promote' => array( - 'label' => t('Promote the selected posts'), + 'label' => t('Promote to front page'), 'callback' => 'node_operations_promote', ), - 'sticky' => array( - 'label' => t('Make the selected posts sticky'), - 'callback' => 'node_operations_sticky', - ), 'demote' => array( - 'label' => t('Demote the selected posts'), + 'label' => t('Demote from front page'), 'callback' => 'node_operations_demote', ), - 'unpublish' => array( - 'label' => t('Unpublish the selected posts'), - 'callback' => 'node_operations_unpublish', + 'sticky' => array( + 'label' => t('Make sticky'), + 'callback' => 'node_operations_sticky', + ), + 'unsticky' => array( + 'label' => t('Remove stickiness'), + 'callback' => 'node_operations_unsticky', ), 'delete' => array( - 'label' => t('Delete the selected posts'), + 'label' => t('Delete'), ), ); return $operations; } /** - * Callback function for admin mass approving nodes. + * Callback function for admin mass publishing nodes. */ -function node_operations_approve($nodes) { +function node_operations_publish($nodes) { db_query('UPDATE {node} SET status = 1 WHERE nid IN(%s)', implode(',', $nodes)); } /** - * Callback function for admin mass promoting nodes. + * Callback function for admin mass unpublishing nodes. */ -function node_operations_promote($nodes) { - db_query('UPDATE {node} SET status = 1, promote = 1 WHERE nid IN(%s)', implode(',', $nodes)); +function node_operations_unpublish($nodes) { + db_query('UPDATE {node} SET status = 0 WHERE nid IN(%s)', implode(',', $nodes)); } /** - * Callback function for admin mass editing nodes to be sticky. + * Callback function for admin mass promoting nodes. */ -function node_operations_sticky($nodes) { - db_query('UPDATE {node} SET status = 1, sticky = 1 WHERE nid IN(%s)', implode(',', $nodes)); +function node_operations_promote($nodes) { + db_query('UPDATE {node} SET status = 1, promote = 1 WHERE nid IN(%s)', implode(',', $nodes)); } /** @@ -1269,10 +1273,17 @@ function node_operations_demote($nodes) { } /** - * Callback function for admin mass unpublishing nodes. + * Callback function for admin mass editing nodes to be sticky. */ -function node_operations_unpublish($nodes) { - db_query('UPDATE {node} SET status = 0 WHERE nid IN(%s)', implode(',', $nodes)); +function node_operations_sticky($nodes) { + db_query('UPDATE {node} SET status = 1, sticky = 1 WHERE nid IN(%s)', implode(',', $nodes)); +} + +/** + * Callback function for admin mass editing nodes to remove stickiness. + */ +function node_operations_unsticky($nodes) { + db_query('UPDATE {node} SET sticky = 0 WHERE nid IN(%s)', implode(',', $nodes)); } /** |