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

@ -138,7 +138,7 @@ class HTMLDisplayHandler
{
// handle separately if the layout is faceoff
if($layout_info && $layout_info->type == 'faceoff')
if($layout_info && isset($layout_info->type) && $layout_info->type == 'faceoff')
{
$oLayoutModel->doActivateFaceOff($layout_info);
Context::set('layout_info', $layout_info);

View file

@ -903,7 +903,7 @@ class BoardView extends Board
}
}
if ($this->module_info->protect_admin_content_update !== 'N')
if (($this->module_info->protect_admin_content_update ?? 'N') !== 'N')
{
$member_info = MemberModel::getMemberInfo($oDocument->get('member_srl'));
if(isset($member_info->is_admin) && $member_info->is_admin == 'Y' && $this->user->is_admin != 'Y')

View file

@ -91,8 +91,10 @@
</span>
<input cond="$is_logged" type="checkbox" name="notify_message" value="Y" id="notify_message" class="iCheck" />
<label cond="$is_logged" for="notify_message">{$lang->notify}</label>
<input cond="$module_info->secret=='Y'" type="checkbox" name="is_secret" value="Y" id="is_secret" class="iCheck" />
<label cond="$module_info->secret=='Y'" for="is_secret">{$lang->secret}</label>
<!--@if(isset($module_info->secret) && $module_info->secret === 'Y')-->
<input type="checkbox" name="is_secret" value="Y" id="is_secret" class="iCheck" />
<label for="is_secret">{$lang->secret}</label>
<!--@endif-->
</div>
<div class="write_captcha" cond="isset($captcha) && $captcha && $captcha->isTargetAction('comment')">
{$captcha}

View file

@ -29,8 +29,10 @@
</span>
<input cond="$is_logged" type="checkbox" name="notify_message" value="Y" checked="checked"|cond="$oComment->get('notify_message')=='Y'" id="notify_message" class="iCheck" />
<label cond="$is_logged" for="notify_message">{$lang->notify}</label>
<input cond="$module_info->secret=='Y'" type="checkbox" name="is_secret" value="Y" id="is_secret" checked="checked"|cond="$oComment->get('is_secret')=='Y'" class="iCheck" />
<label cond="$module_info->secret=='Y'" for="is_secret">{$lang->secret}</label>
<!--@if(isset($module_info->secret) && $module_info->secret === 'Y')-->
<input type="checkbox" name="is_secret" value="Y" id="is_secret" checked="checked"|cond="$oComment->get('is_secret')=='Y'" class="iCheck" />
<label for="is_secret">{$lang->secret}</label>
<!--@endif-->
</div>
<div class="write_captcha" cond="isset($captcha) && $captcha && $captcha->isTargetAction('comment')">
{$captcha}

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>