Skip to content

Commit 147cdde

Browse files
committed
Merge branch '5.2-dev' into 5.3-dev-upmerge-2024-10-06
2 parents 29eb0b1 + 4b41186 commit 147cdde

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

modules/mod_articles/src/Helper/ArticlesHelper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Joomla\CMS\Date\Date;
1717
use Joomla\CMS\Event\Content;
1818
use Joomla\CMS\Factory;
19-
use Joomla\CMS\HTML\Helpers\StringHelper as SpecialStringHelper;
2019
use Joomla\CMS\HTML\HTMLHelper;
2120
use Joomla\CMS\Plugin\PluginHelper;
2221
use Joomla\CMS\Router\Route;
@@ -368,7 +367,7 @@ public function getArticles(Registry $params, SiteApplication $app)
368367
}
369368

370369
if ($introtext_limit != 0) {
371-
$item->displayIntrotext = SpecialStringHelper::truncate($item->introtext, $introtext_limit, true, false);
370+
$item->displayIntrotext = HTMLHelper::_('string.truncateComplex', $item->displayIntrotext, $introtext_limit);
372371
}
373372
}
374373

modules/mod_articles/tmpl/default_items.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
<?php echo $item->event->beforeDisplayContent; ?>
105105

106106
<?php if ($params->get('show_introtext', 1)) : ?>
107-
<?php echo $item->introtext; ?>
107+
<?php echo $item->displayIntrotext; ?>
108108
<?php endif; ?>
109109

110110
<?php echo $item->event->afterDisplayContent; ?>
111111

112-
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('show_readmore')) : ?>
112+
<?php if ($params->get('show_readmore')) : ?>
113113
<?php if ($params->get('show_readmore_title', '') !== '') : ?>
114114
<?php $item->params->set('show_readmore_title', $params->get('show_readmore_title')); ?>
115115
<?php $item->params->set('readmore_limit', $params->get('readmore_limit')); ?>

modules/mod_articles/tmpl/default_titles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ul class="mod-articles mod-list">
1515
<?php foreach ($items as $item) : ?>
1616
<li itemscope itemtype="https://schema.org/Article">
17-
<a href="<?php echo $item->link; ?>" itemprop="url">
17+
<a <?php echo $item->active ? 'class="' . $item->active . '" ' : ''; ?>href="<?php echo $item->link; ?>" itemprop="url">
1818
<span itemprop="name">
1919
<?php echo $item->title; ?>
2020
</span>

0 commit comments

Comments
 (0)