Skip to content

Commit

Permalink
[#30718] minor code optimization: libraries/legacy/html/menu.php (Fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr authored and Michael Babker committed Aug 24, 2013
1 parent 65f653b commit 230f545
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $ -> Language fix or change
# [#31831] Beez3: image overflow. Thanks Tobias Zulauf
$# [#31699] Remove last uses of JDispatcher. Thanks George Wilson
^ [#31629] Fix https problem if you are using Google Fonts protostar Template. Thanks Ervis Tusha
^ [#30718] minor code optimization: libraries/legacy/html/menu.php. Thanks Jan Schönherr

23-Aug-2013 Jean-Marie Simonet
# Reverting [#31641] which breaks Notices (File Type error message not displayed)
Expand Down
9 changes: 2 additions & 7 deletions libraries/cms/html/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ public static function menuitems($config = array())
{
if (empty(static::$items))
{
$menus = static::menus();

$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('menutype AS value, title AS text')
->from($db->quoteName('#__menu_types'))
->order('title');
$db->setQuery($query);
$menus = $db->loadObjectList();

$query->clear()
->select('a.id AS value, a.title AS text, a.level, a.menutype')
->from('#__menu AS a')
->where('a.parent_id > 0')
Expand Down

0 comments on commit 230f545

Please sign in to comment.