Skip to content
Snippets Groups Projects
Commit 3d6e2693 authored by Chris Gross's avatar Chris Gross
Browse files

daily build 2

parent 7d498684
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ WCM Base 7.x-1.x, 2016-03-17
----------------------------
- OCIO SimpleSAMLphp Auth: Added patch to fix missing email address when
accounts are auto-provisioned.
- WCM Workbench: Patched Workbench Moderation to play nice with node export.
WCM Base 7.x-1.x, 2016-03-15
----------------------------
......
The following patches have been applied to this project:
- http://drupal.org/files/issues/node_export-2176841-4.patch
- http://drupal.org/files/playnicewithpanels-1285090-22.patch
- http://drupal.org/files/issues/view_all_unpublished-1492118-64.patch
......
......@@ -2510,6 +2510,53 @@ function workbench_moderation_node_export_node_import_alter(&$node, $original_no
$node->revision = 1;
}
/**
* Implements hook_node_export_node_alter().
*
* Manipulate a node on export.
*
* @param &$node
* The node to alter.
* @param $original_node
* The unaltered node.
*/
function workbench_moderation_node_export_node_alter(&$node, $original_node) {
// Don't proceed if moderation is not enabled on this content type
if (!workbench_moderation_node_type_moderated($node->type)) {
return;
}
//Set the current state to be the same as the current revision's state.
if(!isset($node->workbench_moderation_state_current) && isset($node->workbench_moderation) && isset($node->workbench_moderation['current'])){
$node->workbench_moderation_state_current = $node->workbench_moderation['current']->state;
}
// Set default moderation state values if they are not set.
if (!isset($node->workbench_moderation_state_current)) {
$node->workbench_moderation_state_current = ($node->status ? workbench_moderation_state_published() : workbench_moderation_state_none());
};
if (isset($node->workbench_moderation_state_current)) {
// Set the new state to be the same as the current.
$node->workbench_moderation_state_new = $node->workbench_moderation_state_current;
}
//Node revisions will not be exported so remove moderation states tied to revisions
unset($node->workbench_moderation);
}
/**
* Implements hook_node_export_node_import_alter().
*/
function workbench_moderation_node_export_node_import_alter(&$node, $original_node, $save) {
// Don't proceed if moderation is not enabled on this content type
if (!workbench_moderation_node_type_moderated($node->type)) {
return;
}
$node->revision = 1;
}
/**
* Implements hook_ctools_plugin_pre_alter().
*
......
......@@ -23,5 +23,6 @@ projects[workbench_moderation][subdir] = contrib
projects[workbench_moderation][type] = module
projects[workbench_moderation][download][type] = git
projects[workbench_moderation][download][branch] = 7.x-1.x
projects[workbench_moderation][patch][2176841] = http://drupal.org/files/issues/node_export-2176841-4.patch
projects[workbench_moderation][patch][2098151] = http://drupal.org/files/playnicewithpanels-1285090-22.patch
projects[workbench_moderation][patch][1492118] = http://drupal.org/files/issues/view_all_unpublished-1492118-64.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment