mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix #2153 warnings in point module config in PHP 8 @eondcom
This commit is contained in:
parent
bb495f0259
commit
6d8063b57e
1 changed files with 13 additions and 13 deletions
|
|
@ -52,7 +52,7 @@
|
|||
<div class="x_controls" style="padding-top:3px">
|
||||
<input type="checkbox" name="disable_read_document" id="disable_read_document" value="Y" checked="checked"|cond="$config->disable_read_document=='Y'" />
|
||||
{$lang->about_disable_read_document}
|
||||
<input type="checkbox" name="disable_read_document_except_robots" id="disable_read_document_except_robots" value="Y" checked="checked"|cond="$config->disable_read_document_except_robots == 'Y'" />
|
||||
<input type="checkbox" name="disable_read_document_except_robots" id="disable_read_document_except_robots" value="Y" checked="checked"|cond="($config->disable_read_document_except_robots ?? 'N') == 'Y'" />
|
||||
{$lang->disable_read_document_except_robots}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<section class="section">
|
||||
<h1>{$lang->give_point}</h1>
|
||||
{@ $config_array = get_object_vars($config)}
|
||||
{@ $config_array['insert_comment_limit'] = $config_array['insert_comment_limit'] ?: $config_array['no_point_date']}
|
||||
{@ $config_array['insert_comment_limit'] = $config_array['insert_comment_limit'] ?? $config_array['no_point_date']}
|
||||
{@ $action_types = array(
|
||||
'insert_document' => ['time_limit' => 0, 'except_notice' => 0, 'revert_on_delete' => 1],
|
||||
'insert_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 1],
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
'voted_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
||||
'blamed_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
||||
)}
|
||||
|
||||
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
@ -109,17 +109,17 @@
|
|||
<th class="nowr">{lang('point_' . $action_type)}</td>
|
||||
<td class="nowr">
|
||||
{strtr($lang->point_given_prefix, ['$'.'point' => $config->point_name])}
|
||||
<input type="number" value="{$config_array[$action_type] ?: '0'}" name="{$action_type}" id="{$action_type}" />
|
||||
<input type="number" value="{$config_array[$action_type] ?? '0'}" name="{$action_type}" id="{$action_type}" />
|
||||
{strtr($lang->point_given_suffix, ['$'.'point' => $config->point_name])}
|
||||
<block cond="$action_config['except_notice']">
|
||||
<label class="x_inline" for="{$action_type}_except_notice" style="margin-left:10px">
|
||||
<input type="checkbox" value="Y" name="{$action_type}_except_notice" id="{$action_type}_except_notice" checked="checked"|cond="$config_array[$action_type . '_except_notice']" />
|
||||
<input type="checkbox" value="Y" name="{$action_type}_except_notice" id="{$action_type}_except_notice" checked="checked"|cond="!empty($config_array[$action_type . '_except_notice'])" />
|
||||
{$lang->cmd_point_except_notice}
|
||||
</label>
|
||||
</block>
|
||||
<block cond="$action_config['revert_on_delete']">
|
||||
<label class="x_inline" for="{$action_type}_revert_on_delete" style="margin-left:10px">
|
||||
<input type="checkbox" value="Y" name="{$action_type}_revert_on_delete" id="{$action_type}_revert_on_delete" checked="checked"|cond="$config_array[$action_type . '_revert_on_delete'] !== false" />
|
||||
<input type="checkbox" value="Y" name="{$action_type}_revert_on_delete" id="{$action_type}_revert_on_delete" checked="checked"|cond="($config_array[$action_type . '_revert_on_delete'] ?? false) !== false" />
|
||||
{$lang->cmd_point_revert_on_delete}
|
||||
</label>
|
||||
</block>
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
<td class="nowr">
|
||||
<block cond="$action_config['time_limit']">
|
||||
{$lang->point_time_limit_prefix}
|
||||
<input type="number" value="{$config_array[$action_type . '_limit'] ?: ''}" name="{$action_type}_limit" id="{$action_type}_limit" />
|
||||
<input type="number" value="{$config_array[$action_type . '_limit'] ?? ''}" name="{$action_type}_limit" id="{$action_type}_limit" />
|
||||
{$lang->point_time_limit_suffix}
|
||||
</block>
|
||||
</td>
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
<!--@endforeach-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="x_clearfix">
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
<label class="x_control-label" for="point_group_{$key}">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<!--@if($val->is_default != 'Y')-->
|
||||
<input type="number" min="0" max="1000" value="{$config->point_group[$key]}" name="point_group_{$key}" id="point_group_{$key}" style="width:50px" />
|
||||
<input type="number" min="0" max="1000" value="{$config->point_group[$key] ?? ''}" name="point_group_{$key}" id="point_group_{$key}" style="width:50px" />
|
||||
{$lang->level}
|
||||
<!--@end-->
|
||||
<span cond="$val->is_default == 'Y'" style="display:inline-block;padding-top:3px">{$lang->default_group}</span>
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
<p class="x_pull-left">{$lang->expression}</p>
|
||||
<span class="x_pull-right x_input-append">
|
||||
<input type="text" value="{$config->expression}" placeholder="Math.pow(i,2) * 90" size="30" class="level_expression" />
|
||||
<button type="button" class="x_btn calc_point">{$lang->level_point_calc}</button>
|
||||
<button type="button" class="x_btn calc_point">{$lang->level_point_calc}</button>
|
||||
<button type="button" class="x_btn calc_point _reset">{$lang->cmd_exp_reset}</button>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -198,8 +198,8 @@
|
|||
<tr>
|
||||
<td>1</td>
|
||||
<td><img src="{getUrl()}modules/point/icons/{$config->level_icon}/1.{$config->level_icon_type ?? 'gif'}" alt="1" /></td>
|
||||
<td><label for="level_step_1" style="margin:0"><input type="number" id="level_step_1" class="level_step" value="{$config->level_step[1]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
{@$point_group_item = $point_group[1]}
|
||||
<td><label for="level_step_1" style="margin:0"><input type="number" id="level_step_1" class="level_step" value="{$config->level_step[1] ?? ''}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
||||
{@$point_group_item = $point_group[1] ?? null}
|
||||
{@$title=array()}
|
||||
<!--@if($point_group_item)-->
|
||||
<!--@if($config->group_reset != 'N')-->
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
<td>{implode(', ', $title)}</td>
|
||||
</tr>
|
||||
<!--@for($i=2;$i<=$config->max_level;$i++)-->
|
||||
{@$point_group_item = $point_group[$i]}
|
||||
{@$point_group_item = $point_group[$i] ?? null}
|
||||
<!--@if($point_group_item)-->
|
||||
<!--@if($config->group_reset != 'N')-->
|
||||
{@$title[0] = $group_list[$point_group_item.'']->title}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue