Skip to content

Commit

Permalink
[3.9-alpha] [mod_articles_category] Make sure the tag does not confli…
Browse files Browse the repository at this point in the history
…ct with the title of the article (joomla#21937)

* make sure the tag does not conflict with the title of the article

* Fix ordering (#39)
  • Loading branch information
zero-24 authored and mbabker committed Sep 8, 2018
1 parent 7dbe641 commit 8b3130c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions modules/mod_articles_category/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public static function groupByDate($list, $type = 'year', $article_grouping_dire
public static function groupByTags($list, $direction = 'ksort')
{
$grouped = array();
$untagged = JText::_('MOD_ARTICLES_CATEGORY_UNTAGGED');
$untagged = array();

if (!$list)
{
Expand All @@ -534,12 +534,17 @@ public static function groupByTags($list, $direction = 'ksort')
}
else
{
$grouped[$untagged][] = $item;
$untagged[] = $item;
}
}

$direction($grouped);

if ($untagged)
{
$grouped['MOD_ARTICLES_CATEGORY_UNTAGGED'] = $untagged;
}

return $grouped;
}
}
2 changes: 1 addition & 1 deletion modules/mod_articles_category/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?php if ($grouped) : ?>
<?php foreach ($list as $group_name => $group) : ?>
<li>
<div class="mod-articles-category-group"><?php echo $group_name; ?></div>
<div class="mod-articles-category-group"><?php echo JText::_($group_name); ?></div>
<ul>
<?php foreach ($group as $item) : ?>
<li>
Expand Down

0 comments on commit 8b3130c

Please sign in to comment.