diff --git a/plugins/authentication/cookie/cookie.php b/plugins/authentication/cookie/cookie.php
index 47d9f652624cb..ae62957120b62 100644
--- a/plugins/authentication/cookie/cookie.php
+++ b/plugins/authentication/cookie/cookie.php
@@ -72,7 +72,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
$cookieArray = explode('.', $cookieValue);
// Check for valid cookie value
- if (count($cookieArray) != 2)
+ if (count($cookieArray) !== 2)
{
// Destroy the cookie in the browser.
$this->app->input->cookie->set($cookieName, '', 1, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain', ''));
@@ -279,7 +279,7 @@ public function onUserAfterLogin($options)
$errorCount++;
// We'll let this query fail up to 5 times before giving up, there's probably a bigger issue at this point
- if ($errorCount == 5)
+ if ($errorCount === 5)
{
return false;
}
diff --git a/plugins/authentication/gmail/gmail.php b/plugins/authentication/gmail/gmail.php
index bebc1ca2b4f89..8e8cf2671eeaa 100644
--- a/plugins/authentication/gmail/gmail.php
+++ b/plugins/authentication/gmail/gmail.php
@@ -191,7 +191,7 @@ public function onUserAuthenticate($credentials, $options, &$response)
foreach ($localUsers as $localUser)
{
// Local user exists with same username but different email address
- if ($email != $localUser->email)
+ if ($email !== $localUser->email)
{
$response->status = JAuthentication::STATUS_FAILURE;
$response->error_message = JText::sprintf('JGLOBAL_AUTH_FAILED', JText::_('PLG_GMAIL_ERROR_LOCAL_USERNAME_CONFLICT'));
diff --git a/plugins/captcha/recaptcha/recaptchalib.php b/plugins/captcha/recaptcha/recaptchalib.php
index 5096c34ab4058..aee249c9eb7c6 100644
--- a/plugins/captcha/recaptcha/recaptchalib.php
+++ b/plugins/captcha/recaptcha/recaptchalib.php
@@ -53,7 +53,7 @@ class JReCaptcha
*/
public function __construct($secret)
{
- if ($secret == null || $secret == '')
+ if ($secret == null || $secret === '')
{
die("To use reCAPTCHA you must get an API key from " . self::$_signupUrl . "");
diff --git a/plugins/content/contact/contact.php b/plugins/content/contact/contact.php
index 83ec94a8b17d7..cabad322a2cbc 100644
--- a/plugins/content/contact/contact.php
+++ b/plugins/content/contact/contact.php
@@ -96,7 +96,7 @@ protected function getContactId($created_by)
$query->where('contact.published = 1');
$query->where('contact.user_id = ' . (int) $created_by);
- if (JLanguageMultilang::isEnabled() == 1)
+ if (JLanguageMultilang::isEnabled() === true)
{
$query->where('(contact.language in '
. '(' . $this->db->quote(JFactory::getLanguage()->getTag()) . ',' . $this->db->quote('*') . ') '
diff --git a/plugins/content/pagebreak/pagebreak.php b/plugins/content/pagebreak/pagebreak.php
index 3dd127836ce16..f3b0336f110bb 100644
--- a/plugins/content/pagebreak/pagebreak.php
+++ b/plugins/content/pagebreak/pagebreak.php
@@ -316,8 +316,8 @@ protected function _createToc(&$row, &$matches, &$page)
$title = JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $i);
}
- $liClass = ($limitstart == $i - 1) ? ' class="active"' : '';
- $class = ($limitstart == $i - 1) ? 'toclink active' : 'toclink';
+ $liClass = ($limitstart === $i - 1) ? ' class="active"' : '';
+ $class = ($limitstart === $i - 1) ? 'toclink active' : 'toclink';
$row->toc .= '
' . $title . '';
$i++;
}
@@ -325,8 +325,8 @@ protected function _createToc(&$row, &$matches, &$page)
if ($this->params->get('showall'))
{
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language) . '&showall=1&limitstart=');
- $liClass = ($limitstart == $i - 1) ? ' class="active"' : '';
- $class = ($limitstart == $i - 1) ? 'toclink active' : 'toclink';
+ $liClass = ($limitstart === $i - 1) ? ' class="active"' : '';
+ $class = ($limitstart === $i - 1) ? 'toclink active' : 'toclink';
$row->toc .= ''
. JText::_('PLG_CONTENT_PAGEBREAK_ALL_PAGES') . '';
}
@@ -370,7 +370,7 @@ protected function _createNavigation(&$row, $page, $n)
if ($page > 0)
{
- $page_prev = $page - 1 == 0 ? '' : $page - 1;
+ $page_prev = $page - 1 === 0 ? '' : $page - 1;
$link_prev = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid, $row->language) . '&showall=&limitstart=' . $page_prev);
diff --git a/plugins/editors-xtd/image/image.php b/plugins/editors-xtd/image/image.php
index 1e5a73bd62061..65c6dc73aab66 100644
--- a/plugins/editors-xtd/image/image.php
+++ b/plugins/editors-xtd/image/image.php
@@ -53,9 +53,9 @@ public function onDisplay($name, $asset, $author)
if ($user->authorise('core.edit', $asset)
|| $user->authorise('core.create', $asset)
|| (count($user->getAuthorisedCategories($asset, 'core.create')) > 0)
- || ($user->authorise('core.edit.own', $asset) && $author == $user->id)
+ || ($user->authorise('core.edit.own', $asset) && $author === $user->id)
|| (count($user->getAuthorisedCategories($extension, 'core.edit')) > 0)
- || (count($user->getAuthorisedCategories($extension, 'core.edit.own')) > 0 && $author == $user->id))
+ || (count($user->getAuthorisedCategories($extension, 'core.edit.own')) > 0 && $author === $user->id))
{
$link = 'index.php?option=com_media&view=images&tmpl=component&e_name=' . $name . '&asset=' . $asset . '&author=' . $author;
diff --git a/plugins/finder/categories/categories.php b/plugins/finder/categories/categories.php
index ea0c24bd05df8..4654c599e407d 100644
--- a/plugins/finder/categories/categories.php
+++ b/plugins/finder/categories/categories.php
@@ -244,13 +244,13 @@ public function onFinderChangeState($context, $pks, $value)
protected function index(FinderIndexerResult $item, $format = 'html')
{
// Check if the extension is enabled.
- if (JComponentHelper::isEnabled($this->extension) == false)
+ if (JComponentHelper::isEnabled($this->extension) === false)
{
return;
}
// Check if the extension that owns the category is also enabled.
- if (JComponentHelper::isEnabled($item->extension) == false)
+ if (JComponentHelper::isEnabled($item->extension) === false)
{
return;
}
diff --git a/plugins/finder/contacts/contacts.php b/plugins/finder/contacts/contacts.php
index 402dca13379a3..db2d64f43377f 100644
--- a/plugins/finder/contacts/contacts.php
+++ b/plugins/finder/contacts/contacts.php
@@ -251,7 +251,7 @@ public function onFinderChangeState($context, $pks, $value)
protected function index(FinderIndexerResult $item, $format = 'html')
{
// Check if the extension is enabled
- if (JComponentHelper::isEnabled($this->extension) == false)
+ if (JComponentHelper::isEnabled($this->extension) === false)
{
return;
}
diff --git a/plugins/finder/newsfeeds/newsfeeds.php b/plugins/finder/newsfeeds/newsfeeds.php
index 9ab2531fb2f13..851e2e690a8b8 100644
--- a/plugins/finder/newsfeeds/newsfeeds.php
+++ b/plugins/finder/newsfeeds/newsfeeds.php
@@ -252,7 +252,7 @@ public function onFinderChangeState($context, $pks, $value)
protected function index(FinderIndexerResult $item, $format = 'html')
{
// Check if the extension is enabled.
- if (JComponentHelper::isEnabled($this->extension) == false)
+ if (JComponentHelper::isEnabled($this->extension) === false)
{
return;
}
diff --git a/plugins/finder/tags/tags.php b/plugins/finder/tags/tags.php
index 7a658a60f6747..20b855e19e418 100644
--- a/plugins/finder/tags/tags.php
+++ b/plugins/finder/tags/tags.php
@@ -206,7 +206,7 @@ public function onFinderChangeState($context, $pks, $value)
protected function index(FinderIndexerResult $item, $format = 'html')
{
// Check if the extension is enabled
- if (JComponentHelper::isEnabled($this->extension) == false)
+ if (JComponentHelper::isEnabled($this->extension) === false)
{
return;
}
diff --git a/plugins/quickicon/extensionupdate/extensionupdate.php b/plugins/quickicon/extensionupdate/extensionupdate.php
index 183df2b2bf092..43a04097195ac 100644
--- a/plugins/quickicon/extensionupdate/extensionupdate.php
+++ b/plugins/quickicon/extensionupdate/extensionupdate.php
@@ -37,7 +37,7 @@ class PlgQuickiconExtensionupdate extends JPlugin
*/
public function onGetIcons($context)
{
- if ($context != $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer'))
+ if ($context !== $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer'))
{
return;
}
diff --git a/plugins/quickicon/joomlaupdate/joomlaupdate.php b/plugins/quickicon/joomlaupdate/joomlaupdate.php
index c7ef07f2a5f25..b103cd1b3447f 100644
--- a/plugins/quickicon/joomlaupdate/joomlaupdate.php
+++ b/plugins/quickicon/joomlaupdate/joomlaupdate.php
@@ -38,7 +38,7 @@ class PlgQuickiconJoomlaupdate extends JPlugin
*/
public function onGetIcons($context)
{
- if ($context != $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer'))
+ if ($context !== $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer'))
{
return;
}
diff --git a/plugins/search/categories/categories.php b/plugins/search/categories/categories.php
index 8862c9f65e25c..a922fe72ece2c 100644
--- a/plugins/search/categories/categories.php
+++ b/plugins/search/categories/categories.php
@@ -95,7 +95,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$text = trim($text);
- if ($text == '')
+ if ($text === '')
{
return array();
}
diff --git a/plugins/search/contacts/contacts.php b/plugins/search/contacts/contacts.php
index 4052401e46d25..4e6351677b461 100644
--- a/plugins/search/contacts/contacts.php
+++ b/plugins/search/contacts/contacts.php
@@ -94,7 +94,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$text = trim($text);
- if ($text == '')
+ if ($text === '')
{
return array();
}
diff --git a/plugins/search/content/content.php b/plugins/search/content/content.php
index c67f36e59727c..af420272bc790 100644
--- a/plugins/search/content/content.php
+++ b/plugins/search/content/content.php
@@ -77,7 +77,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$text = trim($text);
- if ($text == '')
+ if ($text === '')
{
return array();
}
diff --git a/plugins/search/newsfeeds/newsfeeds.php b/plugins/search/newsfeeds/newsfeeds.php
index d4a86eefa6164..3eb5aacc5022e 100644
--- a/plugins/search/newsfeeds/newsfeeds.php
+++ b/plugins/search/newsfeeds/newsfeeds.php
@@ -92,7 +92,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$text = trim($text);
- if ($text == '')
+ if ($text === '')
{
return array();
}
diff --git a/plugins/search/tags/tags.php b/plugins/search/tags/tags.php
index 7c575854202be..2cc3656ba2d83 100644
--- a/plugins/search/tags/tags.php
+++ b/plugins/search/tags/tags.php
@@ -76,7 +76,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$text = trim($text);
- if ($text == '')
+ if ($text === '')
{
return array();
}
@@ -156,7 +156,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
foreach ($rows as $key => $row)
{
$rows[$key]->href = TagsHelperRoute::getTagRoute($row->id);
- $rows[$key]->text = ($row->description != '' ? $row->description : $row->title);
+ $rows[$key]->text = ($row->description !== '' ? $row->description : $row->title);
$rows[$key]->text .= $row->note;
$rows[$key]->section = $section;
$rows[$key]->created = $row->created;
diff --git a/plugins/system/debug/debug.php b/plugins/system/debug/debug.php
index 315ae71344fa8..b07a05d6cdac8 100644
--- a/plugins/system/debug/debug.php
+++ b/plugins/system/debug/debug.php
@@ -1190,7 +1190,7 @@ protected function displayQueries()
$labelClass = 'label-warning';
}
- if ($this->totalQueries == 0)
+ if ($this->totalQueries === 0)
{
$this->totalQueries = $db->getCount();
}
diff --git a/plugins/system/languagefilter/languagefilter.php b/plugins/system/languagefilter/languagefilter.php
index dc6bfc9f463f4..626bc30d9d87f 100644
--- a/plugins/system/languagefilter/languagefilter.php
+++ b/plugins/system/languagefilter/languagefilter.php
@@ -210,8 +210,8 @@ public function buildRule(&$router, &$uri)
if ($this->mode_sef
&& (!$this->params->get('remove_default_prefix', 0)
- || $lang != $this->default_lang
- || $lang != $this->current_lang))
+ || $lang !== $this->default_lang
+ || $lang !== $this->current_lang))
{
$uri->setPath($uri->getPath() . '/' . $sef . '/');
}
@@ -338,7 +338,7 @@ public function parseRule(&$router, &$uri)
array_shift($parts);
// Empty parts array when "index.php" is the only part left.
- if (count($parts) == 1 && $parts[0] === 'index.php')
+ if (count($parts) === 1 && $parts[0] === 'index.php')
{
$parts = array();
}
@@ -548,7 +548,7 @@ public function onUserAfterSave($user, $isnew, $success, $msg)
$lang_code = $this->current_lang;
}
- if ($lang_code == $this->user_lang_code || !isset($this->lang_codes[$lang_code]))
+ if ($lang_code === $this->user_lang_code || !isset($this->lang_codes[$lang_code]))
{
if ($this->app->isClient('site'))
{
@@ -662,7 +662,7 @@ public function onUserLogin($user, $options = array())
// We are on a Home page, we redirect to the user preferred site language Home page.
$item = $menu->getDefault($lang_code);
- if ($item && $item->language != $active->language && $item->language !== '*')
+ if ($item && $item->language !== $active->language && $item->language !== '*')
{
$this->app->setUserState('users.login.form.return', 'index.php?Itemid=' . $item->id);
$foundAssociation = true;
@@ -670,7 +670,7 @@ public function onUserLogin($user, $options = array())
}
}
- if ($foundAssociation && $lang_code != $this->current_lang)
+ if ($foundAssociation && $lang_code !== $this->current_lang)
{
// Change language.
$this->current_lang = $lang_code;
@@ -721,14 +721,14 @@ public function onAfterDispatch()
$current_link = JRoute::_($currentInternalUrl);
// Load menu associations
- if ($active_link == $current_link)
+ if ($active_link === $current_link)
{
$associations = MenusHelper::getAssociations($active->id);
}
// Check if we are on the home page
$is_home = ($active->home
- && ($active_link == $current_link || $active_link == $current_link . 'index.php' || $active_link . '/' == $current_link));
+ && ($active_link === $current_link || $active_link === $current_link . 'index.php' || $active_link . '/' === $current_link));
}
// Load component associations.
@@ -759,7 +759,7 @@ public function onAfterDispatch()
break;
// Current language link
- case ($i == $this->current_lang):
+ case ($i === $this->current_lang):
$language->link = JRoute::_($currentInternalUrl);
break;
diff --git a/plugins/system/updatenotification/postinstall/updatecachetime.php b/plugins/system/updatenotification/postinstall/updatecachetime.php
index 3e8798939cc85..5d6a920e60d14 100644
--- a/plugins/system/updatenotification/postinstall/updatecachetime.php
+++ b/plugins/system/updatenotification/postinstall/updatecachetime.php
@@ -19,7 +19,7 @@ function updatecachetime_postinstall_condition()
$cacheTimeout = (int) JComponentHelper::getComponent('com_installer')->params->get('cachetimeout', 6);
// Check if cachetimeout is eq zero
- if ($cacheTimeout == 0 && JPluginHelper::isEnabled('system', 'updatenotification'))
+ if ($cacheTimeout === 0 && JPluginHelper::isEnabled('system', 'updatenotification'))
{
return true;
}
diff --git a/plugins/twofactorauth/totp/postinstall/actions.php b/plugins/twofactorauth/totp/postinstall/actions.php
index 52ef838ad1466..36d2b0ef2699d 100644
--- a/plugins/twofactorauth/totp/postinstall/actions.php
+++ b/plugins/twofactorauth/totp/postinstall/actions.php
@@ -32,7 +32,7 @@ function twofactorauth_postinstall_condition()
$db->setQuery($query);
$enabled_plugins = $db->loadObjectList();
- return count($enabled_plugins) == 0;
+ return count($enabled_plugins) === 0;
}
/**
diff --git a/plugins/twofactorauth/totp/totp.php b/plugins/twofactorauth/totp/totp.php
index 42138f5b67928..4b49636560e32 100644
--- a/plugins/twofactorauth/totp/totp.php
+++ b/plugins/twofactorauth/totp/totp.php
@@ -91,7 +91,7 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
// Create a new TOTP class with Google Authenticator compatible settings
$totp = new FOFEncryptTotp(30, 6, 10);
- if ($otpConfig->method == $this->methodName)
+ if ($otpConfig->method === $this->methodName)
{
// This method is already activated. Reuse the same secret key.
$secret = $otpConfig->config['code'];
@@ -152,7 +152,7 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
*/
public function onUserTwofactorApplyConfiguration($method)
{
- if ($method != $this->methodName)
+ if ($method !== $this->methodName)
{
return false;
}
@@ -192,7 +192,7 @@ public function onUserTwofactorApplyConfiguration($method)
// Check the security code entered by the user (exact time slot match)
$code = $totp->getCode($data['key']);
- $check = $code == $data['securitycode'];
+ $check = $code === $data['securitycode'];
/*
* If the check fails, test the previous 30 second slot. This allow the
@@ -203,7 +203,7 @@ public function onUserTwofactorApplyConfiguration($method)
{
$time = time() - 30;
$code = $totp->getCode($data['key'], $time);
- $check = $code == $data['securitycode'];
+ $check = $code === $data['securitycode'];
}
/*
@@ -214,7 +214,7 @@ public function onUserTwofactorApplyConfiguration($method)
{
$time = time() + 30;
$code = $totp->getCode($data['key'], $time);
- $check = $code == $data['securitycode'];
+ $check = $code === $data['securitycode'];
}
if (!$check)
@@ -258,7 +258,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
}
// Check if we have the correct method
- if ($otpConfig->method != $this->methodName)
+ if ($otpConfig->method !== $this->methodName)
{
return false;
}
@@ -274,7 +274,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
// Check the code
$code = $totp->getCode($otpConfig->config['code']);
- $check = $code == $credentials['secretkey'];
+ $check = $code === $credentials['secretkey'];
/*
* If the check fails, test the previous 30 second slot. This allow the
@@ -285,7 +285,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
{
$time = time() - 30;
$code = $totp->getCode($otpConfig->config['code'], $time);
- $check = $code == $credentials['secretkey'];
+ $check = $code === $credentials['secretkey'];
}
/*
@@ -296,7 +296,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
{
$time = time() + 30;
$code = $totp->getCode($otpConfig->config['code'], $time);
- $check = $code == $credentials['secretkey'];
+ $check = $code === $credentials['secretkey'];
}
return $check;
diff --git a/plugins/twofactorauth/yubikey/yubikey.php b/plugins/twofactorauth/yubikey/yubikey.php
index 0398233e9086d..cd89c94cfa9e0 100644
--- a/plugins/twofactorauth/yubikey/yubikey.php
+++ b/plugins/twofactorauth/yubikey/yubikey.php
@@ -87,7 +87,7 @@ public function onUserTwofactorIdentify()
*/
public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
{
- if ($otpConfig->method == $this->methodName)
+ if ($otpConfig->method === $this->methodName)
{
// This method is already activated. Reuse the same Yubikey ID.
$yubikey = $otpConfig->config['yubikey'];
@@ -99,7 +99,7 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
}
// Is this a new TOTP setup? If so, we'll have to show the code validation field.
- $new_totp = $otpConfig->method != $this->methodName;
+ $new_totp = $otpConfig->method !== $this->methodName;
// Start output buffering
@ob_start();
@@ -141,7 +141,7 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)
*/
public function onUserTwofactorApplyConfiguration($method)
{
- if ($method != $this->methodName)
+ if ($method !== $this->methodName)
{
return false;
}
@@ -224,7 +224,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
}
// Check if we have the correct method
- if ($otpConfig->method != $this->methodName)
+ if ($otpConfig->method !== $this->methodName)
{
return false;
}
@@ -239,7 +239,7 @@ public function onUserTwofactorAuthenticate($credentials, $options)
$yubikey_valid = $otpConfig->config['yubikey'];
$yubikey = substr($credentials['secretkey'], 0, -32);
- $check = $yubikey == $yubikey_valid;
+ $check = $yubikey === $yubikey_valid;
if ($check)
{
@@ -355,13 +355,13 @@ public function validateYubikeyOtp($otp)
}
// Validate the response - The OTP must match
- if ($data['otp'] != $otp)
+ if ($data['otp'] !== $otp)
{
return false;
}
// Validate the response - The token must match
- if ($data['nonce'] != $nonce)
+ if ($data['nonce'] !== $nonce)
{
return false;
}
diff --git a/plugins/user/contactcreator/contactcreator.php b/plugins/user/contactcreator/contactcreator.php
index a1876330ee559..244ec4b2868de 100644
--- a/plugins/user/contactcreator/contactcreator.php
+++ b/plugins/user/contactcreator/contactcreator.php
@@ -144,7 +144,7 @@ protected function generateAliasAndName($alias, $name, $categoryId)
while ($table->load(array('alias' => $alias, 'catid' => $categoryId)))
{
- if ($name == $table->name)
+ if ($name === $table->name)
{
$name = StringHelper::increment($name);
}
diff --git a/plugins/user/joomla/joomla.php b/plugins/user/joomla/joomla.php
index 0f1c4170974be..0ebc34cefbaf5 100644
--- a/plugins/user/joomla/joomla.php
+++ b/plugins/user/joomla/joomla.php
@@ -131,7 +131,7 @@ public function onUserAfterSave($user, $isnew, $success, $msg)
$userParams = new Registry($user['params']);
$userLocale = $userParams->get('language', $userParams->get('admin_language', $defaultLocale));
- if ($userLocale != $defaultLocale)
+ if ($userLocale !== $defaultLocale)
{
$lang->setLanguage($userLocale);
}
diff --git a/plugins/user/profile/field/tos.php b/plugins/user/profile/field/tos.php
index 37c4ae934c4fe..03d25e79a1534 100644
--- a/plugins/user/profile/field/tos.php
+++ b/plugins/user/profile/field/tos.php
@@ -101,7 +101,7 @@ protected function getLabel()
$current_lang = JFactory::getLanguage()->getTag();
- if (isset($tosassociated) && $current_lang != $article->language && array_key_exists($current_lang, $tosassociated))
+ if (isset($tosassociated) && $current_lang !== $article->language && array_key_exists($current_lang, $tosassociated))
{
$url = ContentHelperRoute::getArticleRoute($tosassociated[$current_lang]->id, $tosassociated[$current_lang]->catid);
$link = JHtml::_('link', JRoute::_($url . '&tmpl=component&lang=' . $tosassociated[$current_lang]->language), $text, $attribs);