Skip to content

Commit

Permalink
v 0.4.5 r2
Browse files Browse the repository at this point in the history
goBack 관련 버그 일부 픽스
  • Loading branch information
Prev committed Sep 28, 2013
1 parent 675c4dc commit 8cd28fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion lib/functions/common.function.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ function goLogin() {
* @param $alertMessage : 정의시 해당 메시지로 경고창을 한번 뛰운 뒤 뒤로 이동
* @param $clearContents : true일때 이전 내용을 ob_clean 한 후 뒤로 이동
*/
function goBack($alertMessage=NULL, $clearContents=false) {
function goBack($alertMessage=NULL, $clearContents=true) {
if ($clearContents) {
ob_clean();

Expand All @@ -519,6 +519,9 @@ function goBack($alertMessage=NULL, $clearContents=false) {
($alertMessage ? 'alert("'.$alertMessage.'");' : '') .
'location.replace("'.getBackUrl().'");</script>' .
'</head><body></body></html>';

exit;

}else {
echo '<script type="text/javascript">' .
($alertMessage ? 'alert("'.$alertMessage.'");' : '') .
Expand Down
10 changes: 5 additions & 5 deletions modules/board/BoardArticleController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ public function init() {
if ($articleData->readable_group) {
$me = User::getCurrent();
if (!$me || !$me->checkGroup($articleData->readable_group)) {
goBack('글을 읽을 권한이 없습니다');
exit;
goBack('글을 읽을 권한이 없습니다', true);
return;
}
}

if (!$articleData->is_notice && $articleData->is_secret && !$isBoardAdmin && $articleData->writer_id != User::getCurrent()->id) {
$parentArticle = $this->model->getParentArticle($articleData->top_no, $articleData->order_key);

if (!$parentArticle || $parentArticle->writer_id != User::getCurrent()->id) {
goBack('글을 읽을 권한이 없습니다');
exit;
goBack('글을 읽을 권한이 없습니다', true);
return;
}
}

Expand Down

0 comments on commit 8cd28fc

Please sign in to comment.