|
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index bea127247..79a882870 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -114,6 +114,7 @@ $sql_common = " gr_id = '{$gr_id}',
bo_use_file_content = '{$_POST['bo_use_file_content']}',
bo_use_secret = '{$_POST['bo_use_secret']}',
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
+ bo_select_editor = '{$_POST['bo_select_editor']}',
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
bo_use_good = '{$_POST['bo_use_good']}',
bo_use_nogood = '{$_POST['bo_use_nogood']}',
@@ -301,6 +302,7 @@ if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sidevi
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
+if (is_checked('chk_grp_select_editor')) $grp_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
@@ -390,6 +392,7 @@ if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sidevi
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
+if (is_checked('chk_all_select_editor')) $all_fields .= " , bo_select_editor = '{$bo_select_editor}' ";
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
diff --git a/adm/sms_admin/num_book.php b/adm/sms_admin/num_book.php
index f4338c307..d6a658567 100644
--- a/adm/sms_admin/num_book.php
+++ b/adm/sms_admin/num_book.php
@@ -13,12 +13,12 @@ $g5['title'] = "휴대폰번호 관리";
if ($page < 1) $page = 1;
-$bg_no = isset($bg_no) ? (int) $bg_no : 0;
+$bg_no = isset($bg_no) ? preg_replace('/[^0-9]/i', '', $bg_no) : '';
$st = isset($st) ? preg_replace('/[^a-z0-9]/i', '', $st) : '';
$sql_korean = $sql_group = $sql_search = $sql_no_hp = '';
-if (is_numeric($bg_no))
+if (is_numeric($bg_no) && $bg_no)
$sql_group = " and bg_no='$bg_no' ";
else
$sql_group = "";
diff --git a/bbs/memo_form_update.php b/bbs/memo_form_update.php
index c0244eee0..f95526e76 100644
--- a/bbs/memo_form_update.php
+++ b/bbs/memo_form_update.php
@@ -20,7 +20,7 @@ run_event('memo_form_update_before', $recv_list);
for ($i=0; $i
-
+
]]>
set('Filter.Custom', array(new HTMLPurifier_Filter_Iframevideo()));
$purifier = new HTMLPurifier($config);
- return $purifier->purify($html);
+ return run_replace('html_purifier_result', $purifier->purify($html), $purifier, $html);
}
@@ -773,7 +773,8 @@ function get_member($mb_id, $fields='*', $is_cache=false)
{
global $g5;
- $mb_id = preg_replace("/[^0-9a-z_]+/i", "", $mb_id);
+ if (preg_match("/[^0-9a-z_]+/i", $mb_id))
+ return array();
static $cache = array();
@@ -2317,6 +2318,8 @@ function delete_editor_thumbnail($contents)
{
if(!$contents)
return;
+
+ run_event('delete_editor_thumbnail_before', $contents);
// $contents 중 img 태그 추출
$matchs = get_editor_image($contents);
@@ -2337,6 +2340,8 @@ function delete_editor_thumbnail($contents)
unlink($filename);
}
}
+
+ run_event('delete_editor_thumbnail_after', $contents, $matchs);
}
// 1:1문의 첨부파일 썸네일 삭제
diff --git a/lib/icode.sms.lib.php b/lib/icode.sms.lib.php
index 6201f0081..a2a79a449 100644
--- a/lib/icode.sms.lib.php
+++ b/lib/icode.sms.lib.php
@@ -237,6 +237,7 @@ class SMS {
fclose($fp);
}
$this->Data=array();
+ return true;
}
}
?>
\ No newline at end of file
diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php
index 47e296801..d534edef1 100644
--- a/lib/thumbnail.lib.php
+++ b/lib/thumbnail.lib.php
@@ -110,6 +110,8 @@ function get_view_thumbnail($contents, $thumb_width=0)
for($i=0; $i\'\"]+[^>\'\"]+)/i", $img, $m);
$src = $m[1];
preg_match("/style=[\"\']?([^\"\'>]+)/i", $img, $m);
@@ -161,16 +163,22 @@ function get_view_thumbnail($contents, $thumb_width=0)
}
}
- // 원본 width가 thumb_width보다 작다면
- if($size[0] <= $thumb_width)
- continue;
-
// Animated GIF 체크
$is_animated = false;
if($size[2] == 1) {
$is_animated = is_animated_gif($srcfile);
+
+ if($replace_content = run_replace('thumbnail_is_animated_gif_content', '', $contents, $srcfile, $is_animated, $img_tag, $data_path, $size)){
+
+ $contents = $replace_content;
+ continue;
+ }
}
+ // 원본 width가 thumb_width보다 작다면
+ if($size[0] <= $thumb_width)
+ continue;
+
// 썸네일 높이
$thumb_height = round(($thumb_width * $size[1]) / $size[0]);
$filename = basename($srcfile);
@@ -192,7 +200,6 @@ function get_view_thumbnail($contents, $thumb_width=0)
}
// $img_tag에 editor 경로가 있으면 원본보기 링크 추가
- $img_tag = $matches[0][$i];
if(strpos($img_tag, G5_DATA_DIR.'/'.G5_EDITOR_DIR) && preg_match("/\.({$config['cf_image_extension']})$/i", $filename)) {
$imgurl = str_replace(G5_URL, "", $src);
$thumb_tag = ''.$thumb_tag.'';
@@ -687,8 +694,19 @@ and the roundoff errors in the Gaussian blur process, are welcome.
}
function is_animated_gif($filename) {
- if(!($fh = @fopen($filename, 'rb')))
+
+ static $cache = array();
+ $key = md5($filename);
+
+ if( isset($cache[$key]) ){
+ return $cache[$key];
+ }
+
+ if(!($fh = @fopen($filename, 'rb'))){
+ $cache[$key] = false;
return false;
+ }
+
$count = 0;
// 출처 : http://www.php.net/manual/en/function.imagecreatefromgif.php#104473
// an animated gif contains multiple "frames", with each frame having a
@@ -705,6 +723,11 @@ function is_animated_gif($filename) {
}
fclose($fh);
- return $count > 1;
+
+ $cache[$key] = ($count > 1) ? true : false;
+
+ run_event('is_animated_gif_after', $filename, $cache[$key]);
+
+ return $cache[$key];
}
?>
\ No newline at end of file
|