mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 03:09:55 +09:00
게시글(문서)의 아이콘 체크시 동영상 에디터컴포넌트 부분을 체크하게 하고 이모티콘이나 모듈의 레이아웃을 위한 이미지등은 이미지로 체크되지 않도록 코드 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3311 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
61f2dae105
commit
5b8654de30
1 changed files with 20 additions and 14 deletions
|
|
@ -437,20 +437,7 @@
|
|||
|
||||
$check_files = false;
|
||||
|
||||
// 사진 이미지 체크
|
||||
if(preg_match('!<img([^>]*?)>!is', $this->get('content'))) {
|
||||
$buffs[] = "image";
|
||||
$check_files = true;
|
||||
}
|
||||
|
||||
// 동영상 체크
|
||||
if(preg_match('!<embed([^>]*?)>!is', $this->get('content'))) {
|
||||
$buffs[] = "movie";
|
||||
$check_files = true;
|
||||
}
|
||||
|
||||
// 첨부파일 체크
|
||||
if(!$check_files && $this->hasUploadedFiles()) $buffs[] = "file";
|
||||
$content = $this->get('content');
|
||||
|
||||
// 비밀글 체크
|
||||
if($this->isSecret()) $buffs[] = "secret";
|
||||
|
|
@ -462,6 +449,25 @@
|
|||
if($this->get('regdate')>$time_check) $buffs[] = "new";
|
||||
else if($this->get('last_update')>$time_check) $buffs[] = "update";
|
||||
|
||||
// 사진 이미지 체크
|
||||
preg_match_all('!<img([^>]*?)>!is', $content, $matches);
|
||||
$cnt = count($matches[0]);
|
||||
for($i=0;$i<$cnt;$i++) {
|
||||
if(preg_match('/src=("|\')*(common|modules|widgets|layouts)/i', $matches[0][$i])) continue;
|
||||
$buffs[] = "image";
|
||||
$check_files = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// 동영상 체크
|
||||
if(preg_match('!<embed([^>]*?)>!is', $content) || preg_match('/editor_component=("|\')*multimedia_link/i', $content) ) {
|
||||
$buffs[] = "movie";
|
||||
$check_files = true;
|
||||
}
|
||||
|
||||
// 첨부파일 체크
|
||||
if(!$check_files && $this->hasUploadedFiles()) $buffs[] = "file";
|
||||
|
||||
|
||||
return $buffs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue