| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: revision_moderation_actions.inc,v 1.3 2007/12/18 03:14:40 webchick Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
/** |
/** |
| 10 |
* Implementation of hook_action_info. |
* Implement hook_action_info. |
| 11 |
*/ |
*/ |
| 12 |
function revision_moderation_action_info() { |
function revision_moderation_action_info() { |
| 13 |
$actions['revision_moderation_enable_action'] = array( |
$actions['revision_moderation_enable_action'] = array( |
| 14 |
'type' => 'node', |
'type' => 'node', |
| 15 |
'description' => t('Enable revision moderation on node'), |
'label' => t('Enable revision moderation on node'), |
| 16 |
'configurable' => FALSE, |
'configurable' => FALSE, |
| 17 |
'hooks' => array( |
'triggers' => array('comment_delete', 'comment_insert', 'comment_update', 'node_presave', 'node_insert', 'node_update', ), |
|
'nodeapi' => array('presave', 'insert', 'update'), |
|
|
'comment' => array('delete', 'insert', 'update') |
|
|
), |
|
| 18 |
); |
); |
| 19 |
$actions['revision_moderation_disable_action'] = array( |
$actions['revision_moderation_disable_action'] = array( |
| 20 |
'type' => 'node', |
'type' => 'node', |
| 21 |
'description' => t('Disable revision moderation on node'), |
'label' => t('Disable revision moderation on node'), |
| 22 |
'configurable' => FALSE, |
'configurable' => FALSE, |
| 23 |
'hooks' => array( |
'triggers' => array('comment_delete', 'comment_insert', 'comment_update', 'node_presave', 'node_insert', 'node_update', ), |
|
'nodeapi' => array('presave', 'insert', 'update'), |
|
|
'comment' => array('delete', 'insert', 'update') |
|
|
), |
|
| 24 |
); |
); |
| 25 |
return $actions; |
return $actions; |
| 26 |
} |
} |
| 27 |
|
|
| 28 |
/** |
/** |
| 29 |
* Implementation of a Drupal action; enables revision moderation |
* Implement a Drupal action; enables revision moderation |
| 30 |
* on a node. |
* on a node. |
| 31 |
*/ |
*/ |
| 32 |
function revision_moderation_enable_action(&$node, $context) { |
function revision_moderation_enable_action(&$node, $context) { |
| 37 |
} |
} |
| 38 |
|
|
| 39 |
/** |
/** |
| 40 |
* Implementation of a Drupal action; disables revision moderation |
* Implement a Drupal action; disables revision moderation |
| 41 |
* on a node. |
* on a node. |
| 42 |
*/ |
*/ |
| 43 |
function revision_moderation_disable_action(&$node, $context) { |
function revision_moderation_disable_action(&$node, $context) { |