Commit 1b24d859 authored by stevector's avatar stevector

Issue #1325132 by stevector, Dave Reid: Use entity_uri() to fix an "Access...

Issue #1325132 by stevector, Dave Reid: Use entity_uri() to fix an "Access Denied" bug. This seems to relate to the core patch http://drupal.org/node/1057242
parent 8843ba01
......@@ -1646,7 +1646,9 @@ function workbench_moderation_moderate_form_submit($form, $form_state) {
// able to redirect to the published revision.
if (!empty($form['#destination'])) {
if ($form_state['values']['state'] == workbench_moderation_state_published()) {
$form_state['redirect'] = $form['node']['#value']->uri['path'];
if ($uri = entity_uri('node', $form['node']['#value'])) {
$form_state['redirect'] = array($uri['path'], $uri['options']);
}
}
else {
$form_state['redirect'] = $form['#destination'];
......
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