Issue #1087044 by agentrickard | davidhwang, Dave Reid, kirby14, mfer:...
Issue #1087044 by agentrickard | davidhwang, Dave Reid, kirby14, mfer: preserve custom paths on revisioned nodes when pathauto is enabled. For now, this still requires the pathauto_persist module.
* This function is called by drupal_register_shutdown_function().
* The purpose is to delay a node_save() call so that a live revision
* is not called during hook_node_update().
*
* Instead, we delay the update until the new revision is saved. This way,
* we can more safely call the revision and pick up changes to items
* that are not revisioned (such as menu and path assignments).
*
* @see workbench_moderation_moderate()
*
* @param $node
* The node being saved.
*/
functionworkbench_moderation_store($node){
if(!isset($node->nid)){
watchdog('Workbench moderation','Failed to save node revision: node not passed to shutdown function.',array(),WATCHDOG_NOTICE);
return;
}
watchdog('Workbench moderation','Saved node revision: %node as live version for node %live.',array('%node'=>$node->vid,'%live'=>$node->nid),WATCHDOG_NOTICE,l($node->title,'node/'.$node->nid));