mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 13:02:15 +09:00
Exclude editor components that are not actually directories
xpressengine/xe-core#2241
This commit is contained in:
parent
79120ae5b6
commit
7f5c45cc35
1 changed files with 7 additions and 4 deletions
|
|
@ -428,8 +428,11 @@ class editorController extends editor
|
||||||
else $output = executeQuery('editor.getComponentList', $args);
|
else $output = executeQuery('editor.getComponentList', $args);
|
||||||
$db_list = $output->data;
|
$db_list = $output->data;
|
||||||
|
|
||||||
// Get a list of files
|
// Get a list of editor component folders
|
||||||
$downloaded_list = FileHandler::readDir(_XE_PATH_.'modules/editor/components');
|
$downloaded_list = FileHandler::readDir(RX_BASEDIR . 'modules/editor/components');
|
||||||
|
$downloaded_list = array_filter($downloaded_list, function($component_name) {
|
||||||
|
return is_dir(RX_BASEDIR . 'modules/editor/components/' . $component_name);
|
||||||
|
});
|
||||||
|
|
||||||
// Get information about log-in status and its group
|
// Get information about log-in status and its group
|
||||||
$is_logged = Context::get('is_logged');
|
$is_logged = Context::get('is_logged');
|
||||||
|
|
@ -505,8 +508,8 @@ class editorController extends editor
|
||||||
|
|
||||||
$component_list->{$component_name} = $xml_info;
|
$component_list->{$component_name} = $xml_info;
|
||||||
// Get buttons, icons, images
|
// Get buttons, icons, images
|
||||||
$icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/icon.gif';
|
$icon_file = RX_BASEDIR . 'modules/editor/components/'.$component_name.'/icon.gif';
|
||||||
$component_icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/component_icon.gif';
|
$component_icon_file = RX_BASEDIR . 'modules/editor/components/'.$component_name.'/component_icon.gif';
|
||||||
if(file_exists($icon_file)) $component_list->{$component_name}->icon = true;
|
if(file_exists($icon_file)) $component_list->{$component_name}->icon = true;
|
||||||
if(file_exists($component_icon_file)) $component_list->{$component_name}->component_icon = true;
|
if(file_exists($component_icon_file)) $component_list->{$component_name}->component_icon = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue