Skip to content

Commit

Permalink
ENH Don't make queries if no custom config is set (#11591)
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala authored Feb 4, 2025
1 parent 690838b commit dac6b9e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Security/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,16 @@ public function getHtmlEditorConfigForCMS()
$currentName = '';
$currentPriority = 0;

// If we don't have a custom config, no need to look in all groups
$editorConfigMap = HTMLEditorConfig::get_available_configs_map();
$editorConfigCount = count($editorConfigMap);
if ($editorConfigCount === 0) {
return 'cms';
}
if ($editorConfigCount === 1) {
return key($editorConfigMap);
}

foreach ($this->Groups() as $group) {
$configName = $group->HtmlEditorConfig;
if ($configName) {
Expand Down

0 comments on commit dac6b9e

Please sign in to comment.