Merge branch 'g5'

This commit is contained in:
chicpro
2013-12-17 13:21:39 +09:00
16 changed files with 347 additions and 152 deletions

View File

@ -2000,14 +2000,16 @@ function delete_board_thumbnail($bo_table, $file)
}
// 에디터 이미지 얻기
function get_editor_image($contents)
function get_editor_image($contents, $view=true)
{
if(!$contents)
return false;
// $contents 중 img 태그 추출
//$pattern = "/<img[^>]*src=[\'\"]?([^>\'\"]+[^>\'\"]+)[\'\"]?[^>]*>/";
$pattern = "/<img([^>]*)>/iS";
if ($view)
$pattern = "/<img([^>]*)>/iS";
else
$pattern = "/<img[^>]*src=[\'\"]?([^>\'\"]+[^>\'\"]+)[\'\"]?[^>]*>/";
preg_match_all($pattern, $contents, $matchs);
return $matchs;