diff --git a/bbs/delete.php b/bbs/delete.php index 5c6bf8aa9..eea6cb217 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -65,7 +65,7 @@ if ($row['cnt'] >= $board['bo_count_delete'] && !$is_admin) // 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다. //$sql = " select wr_id, mb_id, wr_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id "; -$sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id "; +$sql = " select wr_id, mb_id, wr_is_comment, wr_content from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id "; $result = sql_query($sql); while ($row = sql_fetch_array($result)) { @@ -100,6 +100,9 @@ while ($row = sql_fetch_array($result)) } } + // 에디터 썸네일 삭제 + echo delete_editor_thumbnail($row['wr_content']); + // 파일테이블 행 삭제 sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "); diff --git a/head.php b/head.php index 3a2cb37b0..2ce70c5da 100644 --- a/head.php +++ b/head.php @@ -112,8 +112,10 @@ include_once(G4_LIB_PATH.'/popular.lib.php'); $cr_path = g4_path(); if($contrast_use == 'on') { $cr_uri = $cr_path['curr_url'].'?contrast=off'; + $cr = "ON"; } else { $cr_uri = $cr_path['curr_url'].'?contrast=on'; + $cr = "OFF"; } if($_SERVER['QUERY_STRING']) { $query_string = preg_replace("/contrast=(on|off)&?/", "", $_SERVER['QUERY_STRING']); @@ -123,7 +125,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php'); unset($cr_path); ?>
  • - 색상대비 + 색상대비
  • diff --git a/js/wrest.js b/js/wrest.js index 8a2d05677..60910cfe9 100644 --- a/js/wrest.js +++ b/js/wrest.js @@ -331,7 +331,7 @@ function wrestSubmit() return false; } - if (this.oldsubmit && this.oldsubmit() == false) + if (this.oldsubmit && this.oldsubmit == false) return false; return true; diff --git a/lib/common.lib.php b/lib/common.lib.php index be5cb2a69..5704abb15 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1720,4 +1720,34 @@ function delete_cache_latest($bo_table) unlink($filename); } } + +// 에디터 이미지 얻기 +function get_editor_image($contents) +{ + // $contents 중 img 태그 추출 + $pattern = "/]*src=[\'\"]?([^>\'\"]+".str_replace(".", "\.", $_SERVER['HTTP_HOST'])."[^>\'\"]+)[\'\"]?[^>]*>/"; + preg_match_all($pattern, $contents, $matchs); + + return $matchs; +} + +// 에디터 썸네일 삭제 +function delete_editor_thumbnail($contents) +{ + // $contents 중 img 태그 추출 + $matchs = get_editor_image($contents); + + for($i=0; $i \ No newline at end of file diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 2be693017..6abbc21d8 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -30,8 +30,7 @@ function get_view_thumbnail($contents) } // $contents 중 img 태그 추출 - $pattern = "/]*src=[\'\"]?([^>\'\"]+".str_replace(".", "\.", $_SERVER['HTTP_HOST'])."[^>\'\"]+)[\'\"]?[^>]*>/"; - preg_match_all($pattern, $contents, $matchs); + $matchs = get_editor_image($contents); for($i=0; $i