Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
gnuboard
2013-10-06 12:07:06 +09:00
16 changed files with 296 additions and 286 deletions

View File

@ -1879,7 +1879,12 @@ function convert_charset($from_charset, $to_charset, $str)
function escape_trim($field)
{
if ($field) {
return mysql_real_escape_string(@trim($field));
$str = mysql_real_escape_string(@trim($field));
if(PHP_VERSION < '5.3.0')
$str = stripslashes($str);
return $str;
}
}

View File

@ -80,27 +80,8 @@ function get_view_thumbnail($contents, $thumb_width=0)
{
global $board, $config;
if (!$thumb_width) {
$dvc_width = intval($_COOKIE['device_width']);
if(G5_IS_MOBILE && $dvc_width) {
// 썸네일 width 설정
$thumb_width = 320;
if($dvc_width > $board['bo_image_width']) {
$thumb_width = $board['bo_image_width'];
} else {
if($dvc_width >= 1000) {
$thumb_width = 1000;
} else if($dvc_width >= 760 && $dvc_width < 1000) {
$thumb_width = 760;
} else if($dvc_width >= 480 && $dvc_width < 760) {
$thumb_width = 480;
}
}
} else {
$thumb_width = $board['bo_image_width'];
}
}
if (!$thumb_width)
$thumb_width = $board['bo_image_width'];
// $contents 중 img 태그 추출
$matchs = get_editor_image($contents);