Fix #2431 undefined properties

This commit is contained in:
Kijin Sung 2024-11-16 17:04:40 +09:00
parent b3b3fa73a4
commit 41d33837f2
6 changed files with 16 additions and 12 deletions

View file

@ -187,7 +187,7 @@ class content extends WidgetHandler
$obj->sort_index = $args->order_target;
$obj->list_count = $args->list_count * $args->page_count;
$obj->statusList = [1];
if($args->show_secret != 'Y')
if(($args->show_secret ?? 'N') !== 'Y')
{
$obj->is_secret = 'N';
}
@ -201,7 +201,7 @@ class content extends WidgetHandler
foreach($output as $key => $oComment)
{
$oDocument = getModel('document')->getDocument($oComment->get('document_srl'), false, false);
if(!$oDocument->isExists() || $oDocument->isSecret() && $args->show_secret != 'Y')
if(!$oDocument->isExists() || $oDocument->isSecret() && ($args->show_secret ?? 'N') !== 'Y')
{
continue;
}
@ -256,7 +256,7 @@ class content extends WidgetHandler
$obj->order_type = $args->order_type=="desc"?"desc":"asc";
}
if($args->show_secret == 'Y')
if(($args->show_secret ?? 'N') == 'Y')
{
$obj->statusList = array('PUBLIC', 'SECRET');
}

View file

@ -44,7 +44,7 @@
<span class="icon">{$item->printExtraImages()}</span>
<!--@end-->
<!--@if($widget_info->option_view_arr[$j+1]=='regdate')-->
<!--@if(isset($widget_info->option_view_arr[$j+1]) && $widget_info->option_view_arr[$j+1]=='regdate')-->
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
<!--@end-->
</p>
@ -52,7 +52,7 @@
<!--@else if($widget_info->option_view_arr[$j]=='content')-->
<p class="text" style="margin-left:{$widget_info->thumbnail_width+20}px;">
{$item->getContent()}
<!--@if($widget_info->option_view_arr[$j+1]=='regdate')-->
<!--@if(isset($widget_info->option_view_arr[$j+1]) && $widget_info->option_view_arr[$j+1]=='regdate')-->
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
<!--@end-->
</p>
@ -60,7 +60,7 @@
<!--@else if($widget_info->option_view_arr[$j]=='nickname')-->
<p class="authorArea" style="margin-left:{$widget_info->thumbnail_width+20}px;">
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}" target="_blank"|cond="$widget_info->new_window">{$item->getNickName($widget_info->nickname_cut_size)}</a>
<!--@if($widget_info->option_view_arr[$j+1]=='regdate')-->
<!--@if(isset($widget_info->option_view_arr[$j+1]) && $widget_info->option_view_arr[$j+1]=='regdate')-->
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
<!--@end-->
</p>