From b8ffd99362eb3e2c6a255f0b09b723091dde0912 Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 19 Oct 2023 11:01:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=EB=B0=80=EA=B8=80=EC=9D=B4=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=AA=A9=EB=A1=9D=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=82=B4=EC=9A=A9,=20=EC=8D=B8=EB=84=A4=EC=9D=BC?= =?UTF-8?q?=EC=9D=B4=20=EB=85=B8=EC=B6=9C=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95#287?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/list.php | 14 ++++++++++++++ lib/thumbnail.lib.php | 13 ++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/bbs/list.php b/bbs/list.php index 208a51d45..83cec1963 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -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]['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; $i++; $notice_count++; @@ -197,6 +204,13 @@ if($page_rows > 0) { $list[$i]['subject'] = search_font($stx, $list[$i]['subject']); } $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[$i]['num'] = $list_num - $k; diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 7b71bc9de..3b473895c 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -10,15 +10,22 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_ $filename = $alt = $data_path = ''; $edt = false; - $row = get_thumbnail_find_cache($bo_table, $wr_id, 'file'); $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']; $filepath = G5_DATA_PATH.'/file/'.$bo_table; $alt = get_text($row['bf_content']); } else { - $write = get_thumbnail_find_cache($bo_table, $wr_id, 'content'); $edt = true; if( $matches = get_editor_image($write['wr_content'], false) ){