Redirect to URL with comment_srl after writing a new comment

This commit is contained in:
Kijin Sung 2019-09-14 20:14:13 +09:00
parent 9978388afb
commit 63daede292
2 changed files with 2 additions and 2 deletions

View file

@ -508,7 +508,7 @@ class boardController extends board
}
$this->setMessage('success_registed');
$this->setRedirectUrl(getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '', 'document_srl', $obj->document_srl) . '#comment_' . $obj->comment_srl);
$this->setRedirectUrl(getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '', 'document_srl', $obj->document_srl, 'comment_srl', $obj->comment_srl) . '#comment_' . $obj->comment_srl);
$this->add('mid', Context::get('mid'));
$this->add('document_srl', $obj->document_srl);
$this->add('comment_srl', $obj->comment_srl);

View file

@ -76,7 +76,7 @@ function completeInsertComment(ret_obj)
redirect(ret_obj.redirect_url);
} else {
var url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
if (comment_srl) url = url.setQuery('rnd',comment_srl)+"#comment_"+comment_srl;
if (comment_srl) url = url.setQuery('comment_srl',comment_srl)+"#comment_"+comment_srl;
redirect(url);
}
}