diff --git a/component/administrator/views/subscriptions/view.html.php b/component/administrator/views/subscriptions/view.html.php
index 01826c3f..7aa1825a 100644
--- a/component/administrator/views/subscriptions/view.html.php
+++ b/component/administrator/views/subscriptions/view.html.php
@@ -11,6 +11,7 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
@@ -42,7 +43,7 @@ protected function addToolbar()
$toolbar = Toolbar::getInstance('toolbar');
$canDo = ContentHelper::getActions('com_jcomments', 'component');
- ToolbarHelper::title(JText::_('A_SUBMENU_SUBSCRIPTIONS'));
+ ToolbarHelper::title(Text::_('A_SUBMENU_SUBSCRIPTIONS'));
if ($canDo->get('core.create'))
{
diff --git a/component/jcomments.xml b/component/jcomments.xml
index fcc61210..b2813a7f 100644
--- a/component/jcomments.xml
+++ b/component/jcomments.xml
@@ -5,7 +5,7 @@
JComments team
https://github.com/exstreme/Jcomments-4
https://www.gnu.org/copyleft/gpl.html GNU/GPL
-
4.0.31
+
4.0.32
JComments lets your users comment on content items.
Joomla\Component\Jcomments
diff --git a/component/site/classes/factory.php b/component/site/classes/factory.php
index 999bf459..5fdef948 100644
--- a/component/site/classes/factory.php
+++ b/component/site/classes/factory.php
@@ -127,7 +127,7 @@ public static function getTemplate($objectID = 0, $objectGroup = 'com_content',
$tmpl->addGlobalVar('comment-object_id', $objectID);
$tmpl->addGlobalVar('comment-object_group', $objectGroup);
- if ($needThisUrl == true)
+ if ($needThisUrl)
{
$tmpl->addGlobalVar('thisurl', JCommentsObject::getLink($objectID, $objectGroup, $language->getTag()));
}
diff --git a/component/site/helpers/event.php b/component/site/helpers/event.php
index 78e02930..77bde15f 100644
--- a/component/site/helpers/event.php
+++ b/component/site/helpers/event.php
@@ -56,8 +56,6 @@ public static function trigger($event, $args = null)
{
$result = Factory::getApplication()->triggerEvent($event);
}
-
-
}
return $result;
diff --git a/component/site/helpers/object.php b/component/site/helpers/object.php
index 0ee88217..58aa1244 100644
--- a/component/site/helpers/object.php
+++ b/component/site/helpers/object.php
@@ -18,6 +18,7 @@
require_once JPATH_ROOT . '/components/com_jcomments/models/object.php';
require_once JPATH_ROOT . '/components/com_jcomments/classes/objectinfo.php';
+require_once JPATH_ROOT . '/components/com_jcomments/classes/plugin.php';
require_once JPATH_ROOT . '/components/com_jcomments/classes/security.php';
/**
diff --git a/component/site/jcomments.ajax.php b/component/site/jcomments.ajax.php
index 0ab27e87..c95016f1 100644
--- a/component/site/jcomments.ajax.php
+++ b/component/site/jcomments.ajax.php
@@ -19,6 +19,7 @@
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
+use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\CMS\User\User;
use Joomla\Database\DatabaseDriver;
@@ -326,11 +327,11 @@ public static function addComment($values = array())
case 'recaptcha_invisible':
if ($captchaEngine == 'recaptcha')
{
- JPluginHelper::importPlugin('captcha', 'recaptcha');
+ PluginHelper::importPlugin('captcha', 'recaptcha');
}
else
{
- JPluginHelper::importPlugin('captcha', 'recaptcha_invisible');
+ PluginHelper::importPlugin('captcha', 'recaptcha_invisible');
}
try
@@ -350,11 +351,11 @@ public static function addComment($values = array())
case 'hcaptcha_invisible':
if ($captchaEngine == 'hcaptcha')
{
- JPluginHelper::importPlugin('captcha', 'hcaptcha');
+ PluginHelper::importPlugin('captcha', 'hcaptcha');
}
else
{
- JPluginHelper::importPlugin('captcha', 'hcaptcha_invisible');
+ PluginHelper::importPlugin('captcha', 'hcaptcha_invisible');
}
try
@@ -478,7 +479,7 @@ public static function addComment($values = array())
$comment->parent = isset($values['parent']) ? (int) $values['parent'] : 0;
$comment->lang = $lang->getTag();
$comment->ip = $userIP;
- $comment->userid = $user->get('id') ? $user->get('id') : 0;
+ $comment->userid = $user->get('id') ?: 0;
$comment->date = Factory::getDate()->toSql();
// Cast to integer value to store in DB.
@@ -528,8 +529,10 @@ public static function addComment($values = array())
{
require_once JPATH_ROOT . '/components/com_jcomments/models/subscriptions.php';
- $subscriptionModel = new JcommentsModelSubscriptions;
- $subscriptionModel->subscribe($comment->object_id, $comment->object_group, $comment->userid, $comment->email, $comment->name, $comment->lang);
+ $subscriptionModel = new JcommentsModelSubscriptions;
+ $subscriptionModel->subscribe(
+ $comment->object_id, $comment->object_group, $comment->userid, $comment->email, $comment->name, $comment->lang
+ );
}
$merged = false;
@@ -560,7 +563,7 @@ public static function addComment($values = array())
// Validate new comment text length and if it longer than specified -
// disable union current comment with previous
if (($needcheck == 0) || (($needcheck == 1) && ($maxlength != 0)
- && (StringHelper::strlen($newText) <= $maxlength)))
+ && (StringHelper::strlen($newText) <= $maxlength)))
{
$comment->id = $prevComment->id;
$comment->comment = $newText;
@@ -1015,7 +1018,6 @@ public static function saveComment($values = array())
$comment->comment = $bbcode->filter($comment->comment);
$comment->published = (int) $user->authorise('comment.autopublish', 'com_jcomments');
-
if (((int) $config->get('comment_title') != 0) && isset($values['title']))
{
$comment->title = stripslashes((string) $values['title']);
diff --git a/component/site/tpl/default/tpl_email.php b/component/site/tpl/default/tpl_email.php
index 3067edba..3bc4ba58 100644
--- a/component/site/tpl/default/tpl_email.php
+++ b/component/site/tpl/default/tpl_email.php
@@ -9,10 +9,11 @@
* @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
*/
-use Joomla\CMS\HTML\HTMLHelper;
-
defined('_JEXEC') or die;
+use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Language\Text;
+
/**
* E-mail notification for users
*/
@@ -21,13 +22,13 @@ class jtt_tpl_email extends JoomlaTuneTemplate
function render()
{
$comment = $this->getVar('comment');
-
+
$object_title = $this->getVar('comment-object_title');
- $object_link = $this->getVar('comment-object_link');
- $hash = $this->getVar('subscriber-hash');
+ $object_link = $this->getVar('comment-object_link');
+ $hash = $this->getVar('subscriber-hash');
$link = '
' . $object_title . '';
- $unsubscribeMessage = JText::sprintf('NOTIFICATION_COMMENT_UNSUBSCRIBE_MESSAGE', $link);
+ $unsubscribeMessage = Text::sprintf('NOTIFICATION_COMMENT_UNSUBSCRIBE_MESSAGE', $link);
$unsubscribeLink = $this->getVar('notification-unsubscribe-link');
// add inline styles
@@ -61,7 +62,7 @@ function render()
?> —
date, 'DATE_FORMAT_LC1'); ?>
comment; ?>
-
:
+
: