Redirect to document URL with category if, and only if, the write page was loaded with a category and the document was saved to the same category #2346

This commit is contained in:
Kijin Sung 2024-05-09 02:02:07 +09:00
parent 3a91bc3038
commit 1d36b3e77a
2 changed files with 13 additions and 14 deletions

View file

@ -277,7 +277,8 @@ class BoardController extends Board
// return the results
$this->add('mid', Context::get('mid'));
$this->add('document_srl', $output->get('document_srl'));
$this->setRedirectUrl(getNotEncodedUrl('', 'mid', Context::get('mid'), 'document_srl', $output->get('document_srl')));
$this->add('category_srl', $output->get('category_srl'));
$this->setRedirectUrl(getNotEncodedFullUrl('', 'mid', Context::get('mid'), 'document_srl', $output->get('document_srl')));
// alert a message
$this->setMessage($msg_code);