document controller에서 insertDocument/ updateDocument시에 제목이 없으면 내용에서 추출하여 제목을 작성. document controller를 이용하는 모듈에서 제목에 대한 처리를 하였다고 가정함

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4601 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-10-06 01:02:32 +00:00
parent 3fda597021
commit 12453aee12

View file

@ -136,6 +136,9 @@
$obj->homepage = $logged_info->homepage;
}
// 제목이 없으면 내용에서 추출
if(!$obj->title) $obj->title = cut_str(strip_tags($obj->content),20,'...');
// 내용에서 제로보드XE만의 태그를 삭제
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
@ -234,6 +237,9 @@
$obj->homepage = $source_obj->get('homepage');
}
// 제목이 없으면 내용에서 추출
if(!$obj->title) $obj->title = cut_str(strip_tags($obj->content),20,'...');
// 내용에서 제로보드XE만의 태그를 삭제
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);