From 8b3130c078727fbecb0c77a57dffef655c29cc61 Mon Sep 17 00:00:00 2001 From: zero-24 Date: Sat, 8 Sep 2018 17:35:06 +0200 Subject: [PATCH] [3.9-alpha] [mod_articles_category] Make sure the tag does not conflict with the title of the article (#21937) * make sure the tag does not conflict with the title of the article * Fix ordering (#39) --- modules/mod_articles_category/helper.php | 9 +++++++-- modules/mod_articles_category/tmpl/default.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/mod_articles_category/helper.php b/modules/mod_articles_category/helper.php index a584a78efa529..5e2f96b154840 100644 --- a/modules/mod_articles_category/helper.php +++ b/modules/mod_articles_category/helper.php @@ -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) { @@ -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; } } diff --git a/modules/mod_articles_category/tmpl/default.php b/modules/mod_articles_category/tmpl/default.php index 6b467ec53c614..d8eaec39a3de9 100644 --- a/modules/mod_articles_category/tmpl/default.php +++ b/modules/mod_articles_category/tmpl/default.php @@ -14,7 +14,7 @@ $group) : ?>
  • -
    +