Commit 5302d50c authored by Dries's avatar Dries

- Patch #677544 by jhodgdon: content admin screen not clear.

parent f60739b0
...@@ -28,37 +28,37 @@ function node_configure_rebuild_confirm_submit($form, &$form_state) { ...@@ -28,37 +28,37 @@ function node_configure_rebuild_confirm_submit($form, &$form_state) {
function node_node_operations() { function node_node_operations() {
$operations = array( $operations = array(
'publish' => array( 'publish' => array(
'label' => t('Publish'), 'label' => t('Publish selected content'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)), 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)),
), ),
'unpublish' => array( 'unpublish' => array(
'label' => t('Unpublish'), 'label' => t('Unpublish selected content'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)), 'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)),
), ),
'promote' => array( 'promote' => array(
'label' => t('Promote to front page'), 'label' => t('Promote selected content to front page'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)), 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)),
), ),
'demote' => array( 'demote' => array(
'label' => t('Demote from front page'), 'label' => t('Demote selected content from front page'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)), 'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)),
), ),
'sticky' => array( 'sticky' => array(
'label' => t('Make sticky'), 'label' => t('Make selected content sticky'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)), 'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)),
), ),
'unsticky' => array( 'unsticky' => array(
'label' => t('Remove stickiness'), 'label' => t('Make selected content not sticky'),
'callback' => 'node_mass_update', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)), 'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)),
), ),
'delete' => array( 'delete' => array(
'label' => t('Delete'), 'label' => t('Delete selected content'),
'callback' => NULL, 'callback' => NULL,
), ),
); );
......
...@@ -222,28 +222,39 @@ function hook_node_grants_alter(&$grants, $account, $op) { ...@@ -222,28 +222,39 @@ function hook_node_grants_alter(&$grants, $account, $op) {
*/ */
function hook_node_operations() { function hook_node_operations() {
$operations = array( $operations = array(
'approve' => array( 'publish' => array(
'label' => t('Approve the selected posts'), 'label' => t('Publish selected content'),
'callback' => 'node_operations_approve', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)),
), ),
'promote' => array( 'unpublish' => array(
'label' => t('Promote the selected posts'), 'label' => t('Unpublish selected content'),
'callback' => 'node_operations_promote', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)),
), ),
'sticky' => array( 'promote' => array(
'label' => t('Make the selected posts sticky'), 'label' => t('Promote selected content to front page'),
'callback' => 'node_operations_sticky', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)),
), ),
'demote' => array( 'demote' => array(
'label' => t('Demote the selected posts'), 'label' => t('Demote selected content from front page'),
'callback' => 'node_operations_demote', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)),
), ),
'unpublish' => array( 'sticky' => array(
'label' => t('Unpublish the selected posts'), 'label' => t('Make selected content sticky'),
'callback' => 'node_operations_unpublish', 'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)),
),
'unsticky' => array(
'label' => t('Make selected content not sticky'),
'callback' => 'node_mass_update',
'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)),
), ),
'delete' => array( 'delete' => array(
'label' => t('Delete the selected posts'), 'label' => t('Delete selected content'),
'callback' => NULL,
), ),
); );
return $operations; return $operations;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment