array ( 'rules' => array ( 'rules_14' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Republish Published Content after Moderator Editing', '#active' => 1, '#weight' => '5', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 1 => array ( '#info' => array ( 'label' => 'Textual comparison of Workflow value for Live - Published Workflow State', 'label callback' => false, 'arguments' => array ( 'text1' => array ( 'label' => 'Text 1', 'type' => 'string', ), 'text2' => array ( 'label' => 'Text 2', 'type' => 'string', ), ), 'module' => 'Rules', ), '#name' => 'rules_condition_text_compare', '#settings' => array ( 'text1' => '[node:workflow-current-state-name]', 'text2' => 'live - viewable to all, authors and moderators can make new revisions', 'regex' => 0, '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'text1' => array ( 0 => 'node', ), ), ), ), '#type' => 'condition', '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#info' => array ( 'module' => 'Node', 'arguments' => array ( 'node' => array ( 'label' => 'Content', 'type' => 'node', ), ), 'label' => 'Publish the most recent pending revision', 'base' => 'rules_core_action_execute', 'action_name' => 'revisioning_publish_latest_revision_action', 'configurable' => false, ), '#name' => 'rules_core_revisioning_publish_latest_revision_action', '#settings' => array ( 'auto_save' => 0, '#argument map' => array ( 'node' => 'node', ), ), '#type' => 'action', '#weight' => 0, ), ), ), 'rules_29' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Unpublish Revision', '#active' => 1, '#weight' => '10', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 1 => array ( '#type' => 'condition', '#settings' => array ( 'text1' => '[node:workflow-current-state-name]', 'text2' => 'Unpublished - only moderators can view and edit', 'regex' => 0, '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'text1' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_text_compare', '#info' => array ( 'label' => 'Textual comparison of Workflow value for Unpublished Workflow State', 'label callback' => false, 'arguments' => array ( 'text1' => array ( 'label' => 'Text 1', 'type' => 'string', ), 'text2' => array ( 'label' => 'Text 2', 'type' => 'string', ), ), 'module' => 'Rules', ), '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#type' => 'action', '#settings' => array ( 'code' => 'nid; $vid = $node->vid; $title = $node->title; $type = $node->type; // Update node table, making sure the "published" (ie. status) flag is UNset db_query("UPDATE {node} SET vid=%d, title=\'%s\', status=0 WHERE nid=%d", $vid, $title, $nid); cache_clear_all(); drupal_set_message(t(\'Revision has been Unpublished.\')); watchdog(\'content\', \'Unpublished rev #%revision of @type %title\', array(\'@type\' => check_plain($type), \'%title\' => check_plain($title), \'%revision\' => $vid), WATCHDOG_NOTICE, l(t(\'view\'), "node/$nid/revisions/$vid/view")); // Invoke the revisioning trigger passing \'unpublish\' as the operation module_invoke_all(\'revisioning\', \'unpublish\');', 'vars' => array ( 0 => 'node', ), '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'code' => array ( 0 => 'node', ), ), 'token_rules_input_evaluator' => array ( 'code' => array ( 0 => 'node', 1 => 'node_unchanged', ), ), ), ), '#name' => 'rules_action_custom_php', '#info' => array ( 'label' => 'Execute custom PHP code', 'module' => 'PHP', 'eval input' => array ( 0 => 'code', ), ), '#weight' => 0, ), ), ), ), 'rule_sets' => array ( ), )