Created
October 2, 2022 19:33
-
-
Save alexandreelise/3b61edcddd13d8944d7093c1bfe4d62a to your computer and use it in GitHub Desktop.
Quick fix on line 29 to prevent error from happening when using this plugin with Joomla! 4.x Webservices Api. Fix made for one of my Super Joomler friends: Custom King.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Articles Field | |
* @version 3.9.0 | |
* | |
* @author Peter van Westen <[email protected]> | |
* @link http://regularlabs.com | |
* @copyright Copyright © 2022 Regular Labs All Rights Reserved | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL | |
*/ | |
defined('_JEXEC') or die(); | |
use Joomla\CMS\Router\Route as JRoute; | |
use Joomla\Component\Content\Site\Helper\RouteHelper as JContentHelperRoute; | |
/* | |
* @var array $displayData | |
* @var object $article | |
* @var object $settings | |
*/ | |
extract($displayData); | |
$title = htmlentities($article->title); | |
if ($settings->link_title) | |
{ | |
$slug = $article->alias ? ($article->id . ':' . $article->alias) : $article->id; | |
$link = JRoute::link('site', JContentHelperRoute::getArticleRoute($slug, $article->catid, $article->language)); | |
$title = '<a href="' . $link . '">' . $title . '</a>'; | |
} | |
echo $title; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment