Merge remote-tracking branch 'origin/master' into inicert
This commit is contained in:
@ -850,12 +850,14 @@ function get_admin($admin='super', $fields='*')
|
||||
$is = true;
|
||||
}
|
||||
|
||||
if (($is && !$mb['mb_id']) || $admin == 'group') {
|
||||
// if (($is && !$mb['mb_id']) || $admin == 'group') {
|
||||
if (($is && !isset($mb['mb_id'])) || $admin == 'group') {
|
||||
$mb = sql_fetch("select {$fields} from {$g5['member_table']} where mb_id in ('{$group['gr_admin']}') limit 1 ");
|
||||
$is = true;
|
||||
}
|
||||
|
||||
if (($is && !$mb['mb_id']) || $admin == 'super') {
|
||||
// if (($is && !$mb['mb_id']) || $admin == 'super') {
|
||||
if (($is && !isset($mb['mb_id'])) || $admin == 'super') {
|
||||
$mb = sql_fetch("select {$fields} from {$g5['member_table']} where mb_id in ('{$config['cf_admin']}') limit 1 ");
|
||||
}
|
||||
|
||||
@ -2217,7 +2219,10 @@ function get_checked($field, $value)
|
||||
|
||||
function is_mobile()
|
||||
{
|
||||
return preg_match('/'.G5_MOBILE_AGENT.'/i', $_SERVER['HTTP_USER_AGENT']);
|
||||
if (isset($_SERVER['HTTP_USER_AGENT']))
|
||||
return preg_match('/'.G5_MOBILE_AGENT.'/i', $_SERVER['HTTP_USER_AGENT']);
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@ -2344,8 +2349,9 @@ function delete_editor_thumbnail($contents)
|
||||
for($i=0; $i<count($matchs[1]); $i++) {
|
||||
// 이미지 path 구함
|
||||
$imgurl = @parse_url($matchs[1][$i]);
|
||||
$srcfile = dirname(G5_PATH).$imgurl['path'];
|
||||
if(! preg_match('/(\.jpe?g|\.gif|\.png)$/i', $srcfile)) continue;
|
||||
// $srcfile = dirname(G5_PATH).$imgurl['path'];
|
||||
$srcfile = (G5_PATH).$imgurl['path'];
|
||||
if(!preg_match('/(\.jpe?g|\.gif|\.png|\.webp)$/i', $srcfile)) continue;
|
||||
$filename = preg_replace("/\.[^\.]+$/i", "", basename($srcfile));
|
||||
$filepath = dirname($srcfile);
|
||||
$files = glob($filepath.'/thumb-'.$filename.'*');
|
||||
|
||||
Reference in New Issue
Block a user