mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-01 17:42:11 +09:00
Fix warnings when user is logged out #2680
This commit is contained in:
parent
798b0cd1d6
commit
6386ddfe27
2 changed files with 6 additions and 5 deletions
|
|
@ -387,6 +387,7 @@ class EditorModel extends Editor
|
|||
}
|
||||
else
|
||||
{
|
||||
$logged_info = new Rhymix\Framework\Helpers\SessionHelper();
|
||||
$group_list = array();
|
||||
}
|
||||
|
||||
|
|
@ -507,7 +508,7 @@ class EditorModel extends Editor
|
|||
$logged_info = Context::get('logged_info');
|
||||
$auto_save_args->member_srl = $logged_info->member_srl;
|
||||
}
|
||||
elseif($_COOKIE['autosave_certify_key_' . $auto_save_args->module_srl])
|
||||
elseif(!empty($_COOKIE['autosave_certify_key_' . $auto_save_args->module_srl]))
|
||||
{
|
||||
$auto_save_args->certify_key = $_COOKIE['autosave_certify_key_' . $auto_save_args->module_srl];
|
||||
}
|
||||
|
|
@ -647,8 +648,8 @@ class EditorModel extends Editor
|
|||
unset($component_list->{$key});
|
||||
continue;
|
||||
}
|
||||
if($logged_info->is_admin == "Y") continue;
|
||||
if($val->target_group)
|
||||
if($logged_info && $logged_info->is_admin == "Y") continue;
|
||||
if(isset($val->target_group) && $val->target_group)
|
||||
{
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
|
|
@ -664,7 +665,7 @@ class EditorModel extends Editor
|
|||
if(!$is_granted) $val->enabled = "N";
|
||||
}
|
||||
}
|
||||
if($val->enabled != "N" && $val->mid_list)
|
||||
if($val->enabled != "N" && !empty($val->mid_list))
|
||||
{
|
||||
$mid = Context::get('mid');
|
||||
if(!in_array($mid, $val->mid_list)) $val->enabled = "N";
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<div cond="$allow_fileupload" id="xefu-container-{$editor_sequence}" class="xefu-container xe-clearfix"
|
||||
data-editor-sequence="{$editor_sequence}"
|
||||
data-editor-status="{json_encode(FileModel::getInstance()->getFileList($editor_sequence), JSON_UNESCAPED_UNICODE)}"
|
||||
data-max-file-size="{$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize}"
|
||||
data-max-file-size="{$this->user->isAdmin() ? 0 : $file_config->allowed_filesize}"
|
||||
data-max-chunk-size="{$file_config->allowed_chunk_size ?: 0}"
|
||||
data-autoinsert-types="{json_encode($editor_autoinsert_types)}"
|
||||
data-autoinsert-position="{$editor_autoinsert_position ?: 'paragraph'}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue