mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix various warnings in PHP 8.0
This commit is contained in:
parent
664a68fc2a
commit
786dace639
8 changed files with 47 additions and 41 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
{@ $_selected_menu = null}
|
{@ $_selected_menu = null}
|
||||||
{@ $_magazine_header = false}
|
{@ $_magazine_header = false}
|
||||||
{@ $_onepage_header = false}
|
{@ $_onepage_header = false}
|
||||||
{@ $sub_header_title = $module_info->browser_title}
|
{@ $sub_header_title = $module_info->browser_title ?? ''}
|
||||||
|
|
||||||
<!--// 초기화 -->
|
<!--// 초기화 -->
|
||||||
{@ $_enable_slide = false}
|
{@ $_enable_slide = false}
|
||||||
|
|
|
||||||
|
|
@ -839,8 +839,6 @@ class boardView extends board
|
||||||
$oDocument = DocumentModel::getDocument(0, $this->grant->manager);
|
$oDocument = DocumentModel::getDocument(0, $this->grant->manager);
|
||||||
$oDocument->setDocument($document_srl);
|
$oDocument->setDocument($document_srl);
|
||||||
|
|
||||||
$member_info = MemberModel::getMemberInfo($oDocument->get('member_srl'));
|
|
||||||
|
|
||||||
$savedDoc = ($oDocument->get('module_srl') == $oDocument->get('member_srl'));
|
$savedDoc = ($oDocument->get('module_srl') == $oDocument->get('member_srl'));
|
||||||
$oDocument->add('module_srl', $this->module_srl);
|
$oDocument->add('module_srl', $this->module_srl);
|
||||||
|
|
||||||
|
|
@ -862,10 +860,12 @@ class boardView extends board
|
||||||
throw new Rhymix\Framework\Exception('msg_protect_update_content');
|
throw new Rhymix\Framework\Exception('msg_protect_update_content');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if($member_info->is_admin == 'Y' && $this->user->is_admin != 'Y')
|
$member_info = MemberModel::getMemberInfo($oDocument->get('member_srl'));
|
||||||
{
|
if($member_info->is_admin == 'Y' && $this->user->is_admin != 'Y')
|
||||||
throw new Rhymix\Framework\Exception('msg_admin_document_no_modify');
|
{
|
||||||
|
throw new Rhymix\Framework\Exception('msg_admin_document_no_modify');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the document is not granted, then back to the password input form
|
// if the document is not granted, then back to the password input form
|
||||||
|
|
@ -1138,7 +1138,18 @@ class boardView extends board
|
||||||
// get comment information
|
// get comment information
|
||||||
$oComment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
$oComment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
||||||
|
|
||||||
$member_info = MemberModel::getMemberInfo($oComment->member_srl);
|
// if the comment is not exited, alert an error message
|
||||||
|
if(!$oComment->isExists())
|
||||||
|
{
|
||||||
|
return $this->dispBoardMessage('msg_not_founded');
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the comment is not granted, then back to the password input form
|
||||||
|
if(!$oComment->isGranted())
|
||||||
|
{
|
||||||
|
return $this->setTemplateFile('input_password_form');
|
||||||
|
}
|
||||||
|
|
||||||
if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false)
|
if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false)
|
||||||
{
|
{
|
||||||
if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day')))
|
if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day')))
|
||||||
|
|
@ -1157,23 +1168,12 @@ class boardView extends board
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$member_info = MemberModel::getMemberInfo($oComment->member_srl);
|
||||||
if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y')
|
if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y')
|
||||||
{
|
{
|
||||||
throw new Rhymix\Framework\Exception('msg_admin_comment_no_modify');
|
throw new Rhymix\Framework\Exception('msg_admin_comment_no_modify');
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the comment is not exited, alert an error message
|
|
||||||
if(!$oComment->isExists())
|
|
||||||
{
|
|
||||||
return $this->dispBoardMessage('msg_not_founded');
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the comment is not granted, then back to the password input form
|
|
||||||
if(!$oComment->isGranted())
|
|
||||||
{
|
|
||||||
return $this->setTemplateFile('input_password_form');
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup the comment variables on context
|
// setup the comment variables on context
|
||||||
Context::set('oSourceComment', CommentModel::getComment());
|
Context::set('oSourceComment', CommentModel::getComment());
|
||||||
Context::set('oComment', $oComment);
|
Context::set('oComment', $oComment);
|
||||||
|
|
|
||||||
|
|
@ -776,12 +776,12 @@ class commentModel extends comment
|
||||||
$args->page = $obj->page ? $obj->page : 1;
|
$args->page = $obj->page ? $obj->page : 1;
|
||||||
$args->list_count = $obj->list_count ? $obj->list_count : 20;
|
$args->list_count = $obj->list_count ? $obj->list_count : 20;
|
||||||
$args->page_count = $obj->page_count ? $obj->page_count : 10;
|
$args->page_count = $obj->page_count ? $obj->page_count : 10;
|
||||||
$args->s_member_srl = $obj->member_srl;
|
$args->s_member_srl = $obj->member_srl ?? null;
|
||||||
$args->s_module_srl = $obj->module_srl;
|
$args->s_module_srl = $obj->module_srl ?? null;
|
||||||
$args->exclude_module_srl = $obj->exclude_module_srl;
|
$args->exclude_module_srl = $obj->exclude_module_srl ?? null;
|
||||||
$args->statusList = $obj->statusList;
|
$args->statusList = $obj->statusList ?? null;
|
||||||
$args->document_statusList = $obj->document_statusList;
|
$args->document_statusList = $obj->document_statusList ?? null;
|
||||||
if ($obj->is_secret)
|
if (isset($obj->is_secret) && $obj->is_secret)
|
||||||
{
|
{
|
||||||
$args->s_is_secret = $obj->is_secret;
|
$args->s_is_secret = $obj->is_secret;
|
||||||
}
|
}
|
||||||
|
|
@ -795,8 +795,8 @@ class commentModel extends comment
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search options
|
// Search options
|
||||||
$search_target = $obj->search_target ? $obj->search_target : trim(Context::get('search_target'));
|
$search_target = (isset($obj->search_target) && $obj->search_target) ? $obj->search_target : trim(Context::get('search_target'));
|
||||||
$search_keyword = $obj->search_keyword ? $obj->search_keyword : trim(Context::get('search_keyword'));
|
$search_keyword = (isset($obj->search_keyword) && $obj->search_keyword) ? $obj->search_keyword : trim(Context::get('search_keyword'));
|
||||||
if($search_target && $search_keyword)
|
if($search_target && $search_keyword)
|
||||||
{
|
{
|
||||||
switch($search_target)
|
switch($search_target)
|
||||||
|
|
|
||||||
|
|
@ -2569,7 +2569,10 @@ class documentController extends document
|
||||||
{
|
{
|
||||||
$child_buff = "";
|
$child_buff = "";
|
||||||
// Get data of the child nodes
|
// Get data of the child nodes
|
||||||
if($category_srl && $tree[$category_srl]) $child_buff = $this->getXmlTree($tree[$category_srl], $tree, $site_srl, $xml_header_buff);
|
if($category_srl && isset($tree[$category_srl]) && $tree[$category_srl])
|
||||||
|
{
|
||||||
|
$child_buff = $this->getXmlTree($tree[$category_srl], $tree, $site_srl, $xml_header_buff);
|
||||||
|
}
|
||||||
// List variables
|
// List variables
|
||||||
$expand = ($node->expand) ? $node->expand : 'N';
|
$expand = ($node->expand) ? $node->expand : 'N';
|
||||||
$group_srls = ($node->group_srls) ? $node->group_srls : '';
|
$group_srls = ($node->group_srls) ? $node->group_srls : '';
|
||||||
|
|
@ -2620,8 +2623,8 @@ class documentController extends document
|
||||||
$node->document_count
|
$node->document_count
|
||||||
);
|
);
|
||||||
|
|
||||||
if($child_buff) $buff .= sprintf('<node %s>%s</node>', $attribute, $child_buff);
|
if($child_buff) $buff = sprintf('<node %s>%s</node>', $attribute, $child_buff);
|
||||||
else $buff .= sprintf('<node %s />', $attribute);
|
else $buff = sprintf('<node %s />', $attribute);
|
||||||
}
|
}
|
||||||
return $buff;
|
return $buff;
|
||||||
}
|
}
|
||||||
|
|
@ -2646,9 +2649,12 @@ class documentController extends document
|
||||||
foreach($source_node as $category_srl => $node)
|
foreach($source_node as $category_srl => $node)
|
||||||
{
|
{
|
||||||
// Get data from child nodes first if exist.
|
// Get data from child nodes first if exist.
|
||||||
if($category_srl && $tree[$category_srl]){
|
if($category_srl && isset($tree[$category_srl]) && $tree[$category_srl])
|
||||||
|
{
|
||||||
$child_output = $this->getPhpCacheCode($tree[$category_srl], $tree, $site_srl, $php_header_buff);
|
$child_output = $this->getPhpCacheCode($tree[$category_srl], $tree, $site_srl, $php_header_buff);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$child_output = array("buff"=>"", "category_srl_list"=>array());
|
$child_output = array("buff"=>"", "category_srl_list"=>array());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<form action="{Context::getRequestUri()}" method="get" no-error-return-url="true" style="float:left">
|
<form action="{Context::getRequestUri()}" method="get" no-error-return-url="true" style="float:left">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="{$act}" />
|
<input type="hidden" name="act" value="{$act}" />
|
||||||
<input type="text" name="search_keyword" value="{escape($search_keyword, false)}">
|
<input type="text" name="search_keyword" value="{escape($search_keyword ?? '', false)}">
|
||||||
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
||||||
</form>
|
</form>
|
||||||
<ul style="float:right;margin:0;padding:0">
|
<ul style="float:right;margin:0;padding:0">
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
<load target="js/member.js" />
|
<load target="js/member.js" />
|
||||||
|
|
||||||
<section class="xm">
|
<section class="xm">
|
||||||
<ul class="nav nav-tabs" cond="$is_logged && $logged_info->menu_list && (!$member_srl || $member_srl == $logged_info->member_srl)">
|
<ul class="nav nav-tabs" cond="$is_logged && $logged_info->menu_list && (!isset($member_srl) || !$member_srl || $member_srl == $logged_info->member_srl)">
|
||||||
<li loop="$logged_info->menu_list=>$key,$val" class="active"|cond="$key==$act">
|
<li loop="$logged_info->menu_list=>$key,$val" class="active"|cond="$key==$act">
|
||||||
<a href="{getUrl('', 'act',$key, 'mid', $mid, 'vid', $vid)}">{lang($val)}</a>
|
<a href="{getUrl('', 'act', $key, 'mid', $mid)}">{lang($val)}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="{$act}" />
|
<input type="hidden" name="act" value="{$act}" />
|
||||||
<select name="search_target" title="{$lang->search_target}">
|
<select name="search_target" title="{$lang->search_target}">
|
||||||
<option value="title" selected="selected"|cond="$search_target == 'title'">{$lang->title}</option>
|
<option value="title" selected="selected"|cond="isset($search_target) && $search_target == 'title'">{$lang->title}</option>
|
||||||
<option value="title_content" selected="selected"|cond="$search_target == 'title_content'">{$lang->title_content}</option>
|
<option value="title_content" selected="selected"|cond="isset($search_target) && $search_target == 'title_content'">{$lang->title_content}</option>
|
||||||
<option value="content" selected="selected"|cond="$search_target == 'content'">{$lang->content}</option>
|
<option value="content" selected="selected"|cond="isset($search_target) && $search_target == 'content'">{$lang->content}</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" name="search_keyword" value="{escape($search_keyword, false)}">
|
<input type="text" name="search_keyword" value="{escape($search_keyword ?? '', false)}">
|
||||||
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
<button type="submit" class="btn">{$lang->cmd_search}</button>
|
||||||
</form>
|
</form>
|
||||||
<ul style="float:right;margin:0;padding:0">
|
<ul style="float:right;margin:0;padding:0">
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@ class widgetController extends widget
|
||||||
$cache_content->variables = new stdClass();
|
$cache_content->variables = new stdClass();
|
||||||
foreach($widget_var_matches as $matches)
|
foreach($widget_var_matches as $matches)
|
||||||
{
|
{
|
||||||
if($matches[2])
|
if(isset($matches[2]) && $matches[2])
|
||||||
{
|
{
|
||||||
$key = str_replace('?$__Context->', '', $matches[2]);
|
$key = str_replace('?$__Context->', '', $matches[2]);
|
||||||
$cache_content->variables->{$key} = Context::get($key);
|
$cache_content->variables->{$key} = Context::get($key);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue