이미지나 동영상 아이콘이 출력될 경우 첨부파일 아이콘은 노출하지 않도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2651 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-09-28 07:15:18 +00:00
parent c3ad9b0db8
commit a441f43674

View file

@ -360,14 +360,22 @@
// 비밀글 체크
if($this->isSecret()) $buffs[] = "secret";
$check_files = false;
// 사진 이미지 체크
if(preg_match('!<img([^>]*?)>!is', $this->get('content'))) $buffs[] = "image";
if(preg_match('!<img([^>]*?)>!is', $this->get('content'))) {
$buffs[] = "image";
$check_files = true;
}
// 동영상 체크
if(preg_match('!<embed([^>]*?)>!is', $this->get('content'))) $buffs[] = "movie";
if(preg_match('!<embed([^>]*?)>!is', $this->get('content'))) {
$buffs[] = "movie";
$check_files = true;
}
// 첨부파일 체크
if($this->hasUploadedFiles()) $buffs[] = "file";
if(!$check_files && $this->hasUploadedFiles()) $buffs[] = "file";
return $buffs;
}