Skip to content

Commit

Permalink
Merge pull request #9689 from alikon/patch-61
Browse files Browse the repository at this point in the history
Module edit backend get slow with a lot of menu items #9516
  • Loading branch information
rdeutz committed Apr 12, 2016
2 parents d5a0c4b + 77abb6d commit f37c332
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions administrator/components/com_menus/helpers/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static function getMenuLinks($menuType = null, $parentId = 0, $mode = 0,
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('a.id AS value,
->select('DISTINCT(a.id) AS value,
a.title AS text,
a.alias,
a.level,
Expand Down Expand Up @@ -205,40 +205,6 @@ public static function getMenuLinks($menuType = null, $parentId = 0, $mode = 0,
}

$query->where('a.published != -2');

if (JLanguageMultilang::isEnabled())
{
$query->group(
'a.id ,
a.title ,
a.alias,
a.level,
a.menutype,
a.type,
a.published,
a.template_style_id,
a.checked_out,
a.language,
a.lft,
l.title ,
l.image');
}
else
{
$query->group(
'a.id ,
a.title ,
a.alias,
a.level,
a.menutype,
a.type,
a.published,
a.template_style_id,
a.checked_out,
a.language,
a.lft');
}

$query->order('a.lft ASC');

// Get the options.
Expand Down

0 comments on commit f37c332

Please sign in to comment.