Skip to content

Commit 8b3130c

Browse files
zero-24mbabker
authored andcommitted
[3.9-alpha] [mod_articles_category] Make sure the tag does not conflict with the title of the article (joomla#21937)
* make sure the tag does not conflict with the title of the article * Fix ordering (#39)
1 parent 7dbe641 commit 8b3130c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

modules/mod_articles_category/helper.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public static function groupByDate($list, $type = 'year', $article_grouping_dire
516516
public static function groupByTags($list, $direction = 'ksort')
517517
{
518518
$grouped = array();
519-
$untagged = JText::_('MOD_ARTICLES_CATEGORY_UNTAGGED');
519+
$untagged = array();
520520

521521
if (!$list)
522522
{
@@ -534,12 +534,17 @@ public static function groupByTags($list, $direction = 'ksort')
534534
}
535535
else
536536
{
537-
$grouped[$untagged][] = $item;
537+
$untagged[] = $item;
538538
}
539539
}
540540

541541
$direction($grouped);
542542

543+
if ($untagged)
544+
{
545+
$grouped['MOD_ARTICLES_CATEGORY_UNTAGGED'] = $untagged;
546+
}
547+
543548
return $grouped;
544549
}
545550
}

modules/mod_articles_category/tmpl/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<?php if ($grouped) : ?>
1515
<?php foreach ($list as $group_name => $group) : ?>
1616
<li>
17-
<div class="mod-articles-category-group"><?php echo $group_name; ?></div>
17+
<div class="mod-articles-category-group"><?php echo JText::_($group_name); ?></div>
1818
<ul>
1919
<?php foreach ($group as $item) : ?>
2020
<li>

0 commit comments

Comments
 (0)