Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed Nov 25, 2020
1 parent b1c3163 commit f21fd46
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libraries/src/Form/Field/TagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ protected function getOptions()
{
// Load the most $limit used tags
$topQuery = $db->getQuery(true)
->select($db->quoteName('tag_id'))
->from($db->quoteName('#__contentitem_tag_map'))
->group($db->quoteName('tag_id'))
->order('count(*)')
->setLimit($limit);
->select($db->quoteName('tag_id'))
->from($db->quoteName('#__contentitem_tag_map'))
->group($db->quoteName('tag_id'))
->order('count(*)')
->setLimit($limit);

$db->setQuery($topQuery);
$topIds = $db->loadColumn();
Expand Down Expand Up @@ -245,7 +245,8 @@ protected function getOptions()
$query->setLimit($limit);

// Exclude the already loaded tags from the main query
if ($count > 0) {
if ($count > 0)
{
$query->whereNotIn($db->quoteName('a.id'), ArrayHelper::getColumn($options, 'value'));
}
}
Expand Down

0 comments on commit f21fd46

Please sign in to comment.