비밀글이 게시판 목록에서 내용, 썸네일이 노출되는 문제 수정#287

This commit is contained in:
thisgun
2023-10-19 11:01:59 +09:00
parent 64e1fbe786
commit b8ffd99362
2 changed files with 24 additions and 3 deletions

View File

@ -104,6 +104,13 @@ if (!$is_search_bbs) {
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
$list[$i]['is_notice'] = true; $list[$i]['is_notice'] = true;
$list[$i]['list_content'] = $list[$i]['wr_content'];
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
if (strstr($list[$i]['wr_option'], "secret")) {
$list[$i]['wr_content'] = '';
}
$list[$i]['num'] = 0; $list[$i]['num'] = 0;
$i++; $i++;
$notice_count++; $notice_count++;
@ -197,6 +204,13 @@ if($page_rows > 0) {
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']); $list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
} }
$list[$i]['is_notice'] = false; $list[$i]['is_notice'] = false;
$list[$i]['list_content'] = $list[$i]['wr_content'];
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
if (strstr($list[$i]['wr_option'], "secret")) {
$list[$i]['wr_content'] = '';
}
$list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count; $list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;
$list[$i]['num'] = $list_num - $k; $list[$i]['num'] = $list_num - $k;

View File

@ -10,15 +10,22 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
$filename = $alt = $data_path = ''; $filename = $alt = $data_path = '';
$edt = false; $edt = false;
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
$empty_array = array('src'=>'', 'ori'=>'', 'alt'=>''); $empty_array = array('src'=>'', 'ori'=>'', 'alt'=>'');
if(isset($row['bf_file']) && $row['bf_file']) { $write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
// 비밀글이면 썸네일을 노출하지 않습니다.
if (isset($write['wr_option']) && strstr($write['wr_option'], "secret")) {
return run_replace('is_secret_list_thumbnail', $empty_array, $bo_table, $write);
}
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
if (isset($row['bf_file']) && $row['bf_file']) {
$filename = $row['bf_file']; $filename = $row['bf_file'];
$filepath = G5_DATA_PATH.'/file/'.$bo_table; $filepath = G5_DATA_PATH.'/file/'.$bo_table;
$alt = get_text($row['bf_content']); $alt = get_text($row['bf_content']);
} else { } else {
$write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
$edt = true; $edt = true;
if( $matches = get_editor_image($write['wr_content'], false) ){ if( $matches = get_editor_image($write['wr_content'], false) ){