mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
Use strict equality to check if title is empty
This commit is contained in:
parent
7cb9b8c786
commit
56af0cb5c3
1 changed files with 4 additions and 4 deletions
|
|
@ -748,11 +748,11 @@ class DocumentController extends Document
|
||||||
|
|
||||||
// If the tile is empty, extract string from the contents.
|
// If the tile is empty, extract string from the contents.
|
||||||
$obj->title = escape($obj->title, false);
|
$obj->title = escape($obj->title, false);
|
||||||
if($obj->title == '')
|
if ($obj->title === '')
|
||||||
{
|
{
|
||||||
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
||||||
}
|
}
|
||||||
if($obj->title == '')
|
if ($obj->title === '')
|
||||||
{
|
{
|
||||||
$obj->title = 'Untitled';
|
$obj->title = 'Untitled';
|
||||||
}
|
}
|
||||||
|
|
@ -1047,11 +1047,11 @@ class DocumentController extends Document
|
||||||
|
|
||||||
// If the tile is empty, extract string from the contents.
|
// If the tile is empty, extract string from the contents.
|
||||||
$obj->title = escape($obj->title, false);
|
$obj->title = escape($obj->title, false);
|
||||||
if($obj->title == '')
|
if ($obj->title === '')
|
||||||
{
|
{
|
||||||
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
||||||
}
|
}
|
||||||
if($obj->title == '')
|
if ($obj->title === '')
|
||||||
{
|
{
|
||||||
$obj->title = 'Untitled';
|
$obj->title = 'Untitled';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue