비밀글 답글에 대한 조회

비회원이 쓴 비밀글에 대한 관리자의 일반답글(비밀글 아님)의 경우 조회시 비밀번호 확인이 이루어 집니다.

하지만 비회원이 쓴 원글의 비밀번호를 입력해도 조회 되지 않으며 소스를 분석해본바 해당 글의 비밀번호만 확인 하고 있었습니다.(답글은 관리자 로그인해 쓴 글이므로 비번이 존재하지 않음)

 

원글의 비번으로 조회 가능하게 소스를 수정 했고 아직 별다른 오류는 발견되지 않은거 같은데 확인 부탁 드립니다.

 

KBoardBuilder.class.php

 


180 public function builderDocument(){
181        global $user_ID;
        $userdata = get_userdata($user_ID);
        $url = new KBUrl();

        $content = new KBContent($this->board_id);
        $content->initWithUID($this->uid);

        $skin_path = KBOARD_URL_PATH . "/skin/$this->skin";
        $board = $this->board;

        if(!$this->board->isReader($content->member_uid, $content->secret) && $content->notice != 'true'){
            if($this->board->permission_write=='all' && ($this->board->permission_read=='all' || $this->board->permission_read=='author')){

                // ############ [start] : 비밀글의 답글 조회 -> 원글 비밀번호로 확인 #############
                $parent = new KBContent();
                $parent->initWithUID($content->parent_uid);
                if($parent->secret=='true' && !$content->notice && ($this->board->isEditor($parent->member_uid) || $this->board->isConfirm($parent->password, $parent->uid))) $content->password = $parent->password;
                // ############ [end] : 비밀글의 답글 조회 -> 원글 비밀번호로 확인 ############


                if(!$this->board->isConfirm($content->password, $content->uid)){
                    include KBOARD_DIR_PATH . "/skin/$this->skin/confirm.php";
                }
                else{
                    $allow_document = true;
                }
            }
            else if(!$user_ID){
                die('<script>alert("'.__('Please Log in to continue.', 'kboard').'");location.href="'.wp_login_url().'";</script>');
            }
            else{
                die('<script>alert("'.__('You do not have permission.', 'kboard').'");history.go(-1);</script>');
            }
        }

 

 

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요