Merge pull request #820 from izuzero/develop.6 closed

* izuzero-develop.6:
  #820 게시글 제목이 공백으로 등록되는 문제 처리
This commit is contained in:
akasima 2014-07-02 13:49:26 +09:00
commit daa5dab159
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ class boardController extends board
$obj->commentStatus = $obj->comment_status;
settype($obj->title, "string");
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
//setup dpcument title tp 'Untitled'
if($obj->title == '') $obj->title = 'Untitled';

View file

@ -268,7 +268,7 @@ class documentController extends document
}
// If the tile is empty, extract string from the contents.
settype($obj->title, "string");
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
// If no tile extracted from the contents, leave it untitled.
if($obj->title == '') $obj->title = 'Untitled';
// Remove XE's own tags from the contents.