From c5541c4c805ac230a6ac89bda2511ab2e490e42f Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 24 Jun 2015 23:24:21 -0500 Subject: [PATCH] Fix incorrect documen_date variable + fix issue in redirection from gradebook certificate edition whereby some certificate-related icons disappeared - refs #7745 --- main/document/edit_document.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 5df8147b0b..91717e0988 100755 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -187,7 +187,7 @@ if (isset($_POST['comment'])) { // Just in case see BT#3525 if (empty($title)) { - $title = $documen_data['title']; + $title = $document_data['title']; } if (empty($title)) { @@ -333,7 +333,7 @@ if ($is_allowed_to_edit) { $dir, api_get_user_id() ); - header('Location: document.php?id=' . $document_data['parent_id'] . '&' . api_get_cidreq()); + header('Location: document.php?id=' . $document_data['parent_id'] . '&' . api_get_cidreq() . ($is_certificate_mode?'&curdirpath=/certificates&selectcat=1':'')); exit; } else { $msgError = get_lang('Impossible'); @@ -421,6 +421,9 @@ if ($owner_id == api_get_user_id() || ) ) { $action = api_get_self().'?id='.$document_data['id'].'&'.api_get_cidreq(); + if ($is_certificate_mode) { + $action .= '&curdirpath=/certificates&selectcat=1'; + } $form = new FormValidator('formEdit', 'post', $action, null, array('class' => 'form-vertical')); // Form title