mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix undefined variables in several module config templates
This commit is contained in:
parent
d54eb4f3d5
commit
8176bdb845
12 changed files with 38 additions and 31 deletions
|
|
@ -833,7 +833,7 @@ class ModuleObject extends BaseObject
|
|||
}
|
||||
|
||||
// execute api methods of the module if view action is and result is XMLRPC or JSON
|
||||
if($this->module_info->module_type == 'view' || $this->module_info->module_type == 'mobile')
|
||||
if(isset($this->module_info->module_type) && in_array($this->module_info->module_type, ['view', 'mobile']))
|
||||
{
|
||||
if(Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->hide_category}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="hide_category"><input type="checkbox" name="hide_category" id="hide_category" value="Y" checked="checked"|cond="$module_info->hide_category == 'Y'" /> {$lang->about_hide_category}</label>
|
||||
<label class="x_inline" for="hide_category"><input type="checkbox" name="hide_category" id="hide_category" value="Y" checked="checked"|cond="($module_info->hide_category ?? '') == 'Y'" /> {$lang->about_hide_category}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_no_category}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="allow_no_category"><input type="checkbox" name="allow_no_category" id="allow_no_category" value="Y" checked="checked"|cond="$module_info->allow_no_category == 'Y'" /> {$lang->about_allow_no_category}</label>
|
||||
<label class="x_inline" for="allow_no_category"><input type="checkbox" name="allow_no_category" id="allow_no_category" value="Y" checked="checked"|cond="($module_info->allow_no_category ?? '') == 'Y'" /> {$lang->about_allow_no_category}</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<load target="js/board_admin.js" />
|
||||
<div class="x_page-header">
|
||||
<h1>
|
||||
{$lang->board_management}
|
||||
{$lang->board_management}
|
||||
<span class="path" cond="$module_info->mid">
|
||||
> <a href="{getSiteUrl($module_info->domain,'','mid',$module_info->mid)}" target="_blank"|cond="$module=='admin'">{$module_info->mid}<block cond="$module_info->is_default=='Y'">({$lang->is_default})</block></a>
|
||||
> <a href="{getSiteUrl($module_info->domain ?? '', '', 'mid', $module_info->mid)}" target="_blank"|cond="$module=='admin'">{$module_info->mid}<block cond="$module_info->is_default=='Y'">({$lang->is_default})</block></a>
|
||||
</span>
|
||||
<a href="#aboutModule" data-toggle class="x_icon-question-sign">{$lang->help}</a>
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<input type="hidden" name="module" value="comment" />
|
||||
<input type="hidden" name="act" value="procCommentInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
<input type="hidden" name="target_module_srl" value="{!empty($module_info->module_srl) ? $module_info->module_srl : $module_srls}" />
|
||||
<div class="x_control-group">
|
||||
<label for="comment_count" class="x_control-label">{$lang->comment_count}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -23,8 +23,8 @@
|
|||
<label for="comment_count" class="x_control-label">{$lang->comment_default_page}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_page" id="default_page">
|
||||
<option value="first" selected="selected"|cond="$comment_config->default_page === 'first'">{$lang->comment_default_page_first}</option>
|
||||
<option value="last" selected="selected"|cond="$comment_config->default_page !== 'first'">{$lang->comment_default_page_last}</option>
|
||||
<option value="first" selected="selected"|cond="isset($comment_config->default_page) && $comment_config->default_page === 'first'">{$lang->comment_default_page_first}</option>
|
||||
<option value="last" selected="selected"|cond="!isset($comment_config->default_page) || $comment_config->default_page !== 'first'">{$lang->comment_default_page_last}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -32,11 +32,11 @@
|
|||
<label for="use_comment_validation" class="x_control-label">{$lang->cmd_comment_validation}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_comment_validation_Y" class="x_inline">
|
||||
<input type="radio" id="use_comment_validation_Y" name="use_comment_validation" value="Y" checked="checked"|cond="$comment_config->use_comment_validation === 'Y'">
|
||||
<input type="radio" id="use_comment_validation_Y" name="use_comment_validation" value="Y" checked="checked"|cond="isset($comment_config->use_comment_validation) && $comment_config->use_comment_validation === 'Y'">
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="use_comment_validation_N" class="x_inline">
|
||||
<input type="radio" id="use_comment_validation_N" name="use_comment_validation" value="N" checked="checked"|cond="$comment_config->use_comment_validation !== 'Y'">
|
||||
<input type="radio" id="use_comment_validation_N" name="use_comment_validation" value="N" checked="checked"|cond="!isset($comment_config->use_comment_validation) || $comment_config->use_comment_validation !== 'Y'">
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-inline">{$lang->about_comment_validation}</p>
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ class DocumentView extends Document
|
|||
{
|
||||
$document_config = ModuleModel::getModulePartConfig('document', $current_module_srl);
|
||||
}
|
||||
if(!$document_config)
|
||||
if(!isset($document_config))
|
||||
{
|
||||
$document_config = new stdClass();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<input type="hidden" name="module" value="document" />
|
||||
<input type="hidden" name="act" value="procDocumentInsertModuleConfig" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
<input type="hidden" name="target_module_srl" value="{!empty($module_info->module_srl) ? $module_info->module_srl : $module_srls}" />
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="use_history" class="x_control-label">{$lang->history}</label>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<!--%import("filter/insert_extra_var.xml")-->
|
||||
<!--%import("filter/delete_extra_var.xml")-->
|
||||
|
||||
<block cond="$selected_var_idx && $extra_keys[$selected_var_idx]">
|
||||
<block cond="isset($selected_var_idx) && isset($extra_keys[$selected_var_idx])">
|
||||
{@ $selected_var = $extra_keys[$selected_var_idx] }
|
||||
</block>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/extra_keys/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<!--@if($type == 'insertExtraForm' || $selected_var_idx)-->
|
||||
<!--@if((isset($type) && $type == 'insertExtraForm') || isset($selected_var_idx))-->
|
||||
<section class="section">
|
||||
<h1>{$lang->extra_vars}</h1>
|
||||
<form ruleset="insertExtraVar" action="./" method="post" class="x_form-horizontal">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<form action="./" method="post" class="section">
|
||||
<input type="hidden" name="act" value="procEditorInsertModuleConfig" />
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
<input type="hidden" name="target_module_srl" value="{!empty($module_info->module_srl) ? $module_info->module_srl : $module_srls}" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/editor/addition_setup/1" />
|
||||
<h1>{$lang->editor}</h1>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
<input type="radio" name="content_font" id="font_{$name}" value="{$detail}" checked="checked"|cond="$editor_config->content_font == $detail && $editor_config->font_defined != 'Y'" /> {$fontname_simplified}
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" class="fontSelector" name="font_defined" id="font_defined" value="Y" checked="checked"|cond="$editor_config->font_defined== 'Y'" /> {$lang->by_you} :
|
||||
<input type="radio" class="fontSelector" name="font_defined" id="font_defined" value="Y" checked="checked"|cond="$editor_config->font_defined== 'Y'" /> {$lang->by_you} :
|
||||
<input type="text" name="content_font_defined" value="{$editor_config->content_font}"|cond="$editor_config->font_defined == 'Y'" />
|
||||
</label>
|
||||
</td>
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
<th scope="row" style="text-align:right"><label for="content_font_size">{$lang->content_font_size}</label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" id="font_size" name="content_font_size" value="{$editor_config->content_font_size ?: 13}" />
|
||||
<p class="x_help-inline">{$lang->about_unit_default_px}</p>
|
||||
<p class="x_help-inline">{$lang->about_unit_default_px}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
|
|
@ -240,4 +240,4 @@ jQuery(function($){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1804,12 +1804,19 @@ class ModuleModel extends Module
|
|||
{
|
||||
foreach($data as $key => $val)
|
||||
{
|
||||
$data[$key]->domain = $modules[$val->module_srl]->domain;
|
||||
if (isset($modules[$val->module_srl]))
|
||||
{
|
||||
$data[$key]->domain = $modules[$val->module_srl]->domain;
|
||||
}
|
||||
elseif (!isset($data[$key]->domain))
|
||||
{
|
||||
$data[$key]->domain = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data->domain = $modules[$data->module_srl]->domain;
|
||||
$data->domain = $modules[$data->module_srl]->domain ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class PageAdminView extends Page
|
|||
// If you do not value module_srl just showing the index page
|
||||
if(!$module_srl) return $this->dispPageAdminContent();
|
||||
// If the layout is destined to add layout information haejum (layout_title, layout)
|
||||
if($module_info->layout_srl)
|
||||
if($module_info->layout_srl > 0)
|
||||
{
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($module_info->layout_srl);
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<h1>
|
||||
{$lang->page_management}
|
||||
<span class="path" cond="$module_info->mid">
|
||||
> <a href="{getSiteUrl($module_info->domain,'','mid',$module_info->mid)}" target="_blank"|cond="$module=='admin'">{$module_info->mid}</a><block cond="$module_info->is_default=='Y'">({$lang->is_default})</block>
|
||||
> <a href="{getSiteUrl($module_info->domain ?? '', '', 'mid', $module_info->mid)}" target="_blank"|cond="$module=='admin'">{$module_info->mid}</a><block cond="$module_info->is_default=='Y'">({$lang->is_default})</block>
|
||||
</span>
|
||||
<a href="#aboutPage" class="x_icon-question-sign" data-toggle cond="!$module_info->mid"></a>
|
||||
<a href="#aboutPage" class="x_icon-question-sign" data-toggle cond="empty($module_info->mid)"></a>
|
||||
</h1>
|
||||
</div>
|
||||
<p id="aboutPage" class="x_alert x_alert-info" cond="!$module_info->mid" hidden>{nl2br($lang->about_page)}</p>
|
||||
<ul class="x_nav x_nav-tabs" cond="$act != 'dispPageAdminDelete' && $module_info">
|
||||
<p id="aboutPage" class="x_alert x_alert-info" cond="empty($module_info->mid)" hidden>{nl2br($lang->about_page)}</p>
|
||||
<ul class="x_nav x_nav-tabs" cond="$act != 'dispPageAdminDelete' && !empty($module_info)">
|
||||
<li cond="$module=='admin'" class="x_active"|cond="$act=='dispPageAdminContent'"><a href="{getUrl('act','dispPageAdminContent','module_srl','')}">{$lang->cmd_list}</a></li>
|
||||
<li cond="$module!='admin'"><a href="{getUrl('act','','module_srl','')}">{$lang->cmd_back}</a></li>
|
||||
<block cond="$module_srl">
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@
|
|||
<input type="hidden" name="vid" value="{$vid}" />
|
||||
<input type="hidden" name="act" value="dispPageAdminContent" />
|
||||
<select cond="count($module_category)" name="module_category_srl" title="{$lang->module_category}" style="margin-right:4px">
|
||||
<option value="" selected="selected"|cond="!$module_category_srl">{$lang->all}</option>
|
||||
<option value="0" selected="selected"|cond="$module_category_srl==='0'">{$lang->not_exists}</option>
|
||||
<option value="{$key}" loop="$module_category => $key,$val" selected="selected"|cond="$module_category_srl==$key">{$val->title}</option>
|
||||
<option value="" selected="selected"|cond="empty($module_category_srl)">{$lang->all}</option>
|
||||
<option value="0" selected="selected"|cond="isset($module_category_srl) && $module_category_srl ==='0'">{$lang->not_exists}</option>
|
||||
<option value="{$key}" loop="$module_category => $key,$val" selected="selected"|cond="isset($module_category_srl) && $module_category_srl == $key">{$val->title}</option>
|
||||
</select>
|
||||
<select name="search_target" id="search_target" style="margin-right:4px">
|
||||
<option value="s_mid" selected="selected"|cond="$search_target=='s_mid'">{$lang->mid}</option>
|
||||
<option value="s_browser_title" selected="selected"|cond="$search_target=='s_browser_title'">{$lang->browser_title}</option>
|
||||
<option value="s_mid" selected="selected"|cond="isset($search_target) && $search_target == 's_mid'">{$lang->mid}</option>
|
||||
<option value="s_browser_title" selected="selected"|cond="isset($search_target) && $search_target == 's_browser_title'">{$lang->browser_title}</option>
|
||||
<option cond="$module_category">{$lang->module_category}</option>
|
||||
</select>
|
||||
<input type="search" name="search_keyword" title="Search" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" style="width:150px" />
|
||||
<input type="search" name="search_keyword" title="Search" value="{escape($search_keyword ?? '', false)}" style="width:150px" />
|
||||
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="x_btn">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue