From 330405d40a9c8b2fbb21b7955b296d77dd941e16 Mon Sep 17 00:00:00 2001 From: ankush-maherwal Date: Wed, 4 Jan 2023 15:47:32 +0530 Subject: [PATCH] Release 3.0.3 (#148) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bug #187003 fix: Unable to send notification due to fatel error * Bug #190354 Fixed: BE> Notification Templates> Limit filters not working * Bug #190387 fix: page limit is not working on notifications list view * Bug #190354 Resolved: Remove unwanted code and update the limit code * Bug #190428 Fixed: BE> Notification Templates> After apply filter redirect to another notification page (refer video) j4 * Bug #190927 Fixed: BE >Notification Templates> Search field not working as accepted j3 * Bug#191132 Fixed: BE> Notification Templates> choose client of search tools not working j3 * Version bump up * Updated change log * Updated change log Co-authored-by: “Sachin --- changelog.md | 24 +++++++++ .../admin/models/fields/clients.php | 51 ++++++++++++------- .../admin/models/notifications.php | 6 +-- .../views/notifications/tmpl/default_bs2.php | 11 +++- .../views/notifications/tmpl/default_bs5.php | 11 +++- .../admin/views/notifications/view.html.php | 1 + src/com_tjnotifications/tjnotifications.xml | 6 +-- .../tjnotification/tjnotification.xml | 6 +-- .../api/tjnotifications/tjnotifications.xml | 6 +-- .../privacy/tjnotification/tjnotification.xml | 6 +-- .../tjnotificationsmobilenumber.xml | 6 +-- 11 files changed, 97 insertions(+), 37 deletions(-) diff --git a/changelog.md b/changelog.md index d4227252..725aa64b 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,30 @@ - Feature Addition (+) - Improvement (^) +### TJNotifications v3.0.3 + +##### - Bug fixes: +- #187003 Unable to send notification due to fatal error +- #190387 page limit is not working on the notifications list view +- #190428 BE > Notification Templates > Limit filter is not working +- #191132 BE > Notification Templates > Search Tools > Client filter is not working +- #190428 BE > Notification Templates > If we apply any filter then the extension parameter gets removed from the URL + +### TJNotifications v3.0.2 + +##### - Bug fixes: +- #184788 BE > Subscriptions > Unable to save the Subscription form for joomla 3.10 + +### TJNotifications v3.0.1 + +##### ^ Improvements: +- #173952 Chore: Table changes - adding default values for tables of TJnotification (Joomla 4 compatibility) + +### TJNotifications v3.0.0 + +##### + Features Added: +- #175851 Joomla 4 compatible + ### TJNotifications v2.0.2 ##### ^ Improvements: diff --git a/src/com_tjnotifications/admin/models/fields/clients.php b/src/com_tjnotifications/admin/models/fields/clients.php index 41bc2fec..b0e76677 100644 --- a/src/com_tjnotifications/admin/models/fields/clients.php +++ b/src/com_tjnotifications/admin/models/fields/clients.php @@ -38,31 +38,48 @@ protected function getOptions() $options[] = HTMLHelper::_('select.option', '', Text::_('COM_TJNOTIFICATIONS_FIELD_CLIENT_OPTION')); - // Create a new query object. - $query = $db->getQuery(true); + $extension = Factory::getApplication()->input->get('extension', '', 'word'); + if(!$extension) + { + // Create a new query object. + $query = $db->getQuery(true); - $query->select('DISTINCT (`client`)'); - $query->from('#__tj_notification_templates'); - $db->setQuery($query); + $query->select('DISTINCT (`client`)'); + $query->from('#__tj_notification_templates'); + $db->setQuery($query); - $listobjects = $db->loadObjectList(); + $listobjects = $db->loadObjectList(); - if (!empty($listobjects)) - { - foreach ($listobjects as $obj) + if (!empty($listobjects)) { - $client = explode('_', $obj->client); - - if (!empty($client[1])) + foreach ($listobjects as $obj) { - $options[] = HTMLHelper::_('select.option', $obj->client, ucfirst($client[1])); - } - else - { - $options[] = HTMLHelper::_('select.option', $obj->client, ucfirst($client[0])); + $client = explode('_', $obj->client); + + if (!empty($client[1])) + { + $options[] = HTMLHelper::_('select.option', $obj->client, ucfirst($client[1])); + } + else + { + $options[] = HTMLHelper::_('select.option', $obj->client, ucfirst($client[0])); + } } } } + else + { + $client = explode('_', $extension); + + if (!empty($client[1])) + { + $options[] = HTMLHelper::_('select.option', $extension, ucfirst($client[1])); + } + else + { + $options[] = HTMLHelper::_('select.option', $extension, ucfirst($client[0])); + } + } return $options; } diff --git a/src/com_tjnotifications/admin/models/notifications.php b/src/com_tjnotifications/admin/models/notifications.php index 57854a6a..f5237c1c 100644 --- a/src/com_tjnotifications/admin/models/notifications.php +++ b/src/com_tjnotifications/admin/models/notifications.php @@ -85,7 +85,7 @@ protected function populateState($ordering = 'id', $direction = 'asc') parent::populateState($ordering, $direction); // Get pagination request variables - $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->get('list_limit'), 'int'); + $limit = $app->getUserStateFromRequest($this->context . '.list.limit', 'limit', $app->get('list_limit'), 'int'); $limitstart = $app->input->get('limitstart', 0, 'int'); // In case limit has been changed, adjust it @@ -126,7 +126,7 @@ protected function getListQuery() if (!empty($search)) { $like = $db->quote('%' . $search . '%'); - $query->where($db->quoteName('client') . ' LIKE ' . $like . ' OR ' . $db->quoteName('key') . ' LIKE ' . $like); + $query->where($db->quoteName('client') . ' LIKE ' . $like . ' OR ' . $db->quoteName('key') . ' LIKE ' . $like . ' OR ' . $db->quoteName('title') . ' LIKE ' . $like); } if ($extension) @@ -273,7 +273,7 @@ public function getItems() * * @since 1.6 */ - public function getTemplate($client, $key, $language, $backend = 'email') + public function getTemplate($client, $key, $language = '*', $backend = 'email') { $object = clone $this; diff --git a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs2.php b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs2.php index b49ae826..3e61d44c 100644 --- a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs2.php +++ b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs2.php @@ -43,9 +43,18 @@ }"; $doc->addStyleDeclaration($style); + +if ($this->displayExtension) +{ + $link = 'index.php?option=com_tjnotifications&view=notifications&extension=' . $this->displayExtension; +} +else +{ + $link = 'index.php?option=com_tjnotifications&view=notifications'; +} ?> -
+ sidebar)) { diff --git a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php index 8b686968..f18ab145 100644 --- a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php +++ b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php @@ -44,9 +44,18 @@ }"; $doc->addStyleDeclaration($style); + +if ($this->displayExtension) +{ + $link = 'index.php?option=com_tjnotifications&view=notifications&extension=' . $this->displayExtension; +} +else +{ + $link = 'index.php?option=com_tjnotifications&view=notifications'; +} ?> - +
$this)); ?> diff --git a/src/com_tjnotifications/admin/views/notifications/view.html.php b/src/com_tjnotifications/admin/views/notifications/view.html.php index e668c2df..6cb8e1af 100644 --- a/src/com_tjnotifications/admin/views/notifications/view.html.php +++ b/src/com_tjnotifications/admin/views/notifications/view.html.php @@ -91,6 +91,7 @@ public function display($tpl = null) BaseDatabaseModel::addIncludePath(JPATH_SITE . '/components/com_tjnotifications/models'); $model = AdminModel::getInstance('Preferences', 'TJNotificationsModel'); $this->count = $model->count(); + $this->displayExtension = $extension; if ($extension) { diff --git a/src/com_tjnotifications/tjnotifications.xml b/src/com_tjnotifications/tjnotifications.xml index 7a952f51..3f2afd71 100644 --- a/src/com_tjnotifications/tjnotifications.xml +++ b/src/com_tjnotifications/tjnotifications.xml @@ -4,10 +4,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. + Copyright (C) 2016 - 2023 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 4th Aug 2022 - 3.0.2 + 4th Jan 2023 + 3.0.3 sql/install.mysql.utf8.sql diff --git a/src/plugins/actionlog/tjnotification/tjnotification.xml b/src/plugins/actionlog/tjnotification/tjnotification.xml index ab051cd4..6580d584 100644 --- a/src/plugins/actionlog/tjnotification/tjnotification.xml +++ b/src/plugins/actionlog/tjnotification/tjnotification.xml @@ -2,12 +2,12 @@ plg_actionlog_tjnotification Techjoomla - 4th Aug 2022 - Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. + 4th Jan 2023 + Copyright (C) 2016 - 2023 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL extensions@techjoomla.com https://techjoomla.com - 3.0.2 + 3.0.3 PLG_ACTIONLOG_TJNOTIFICATION_XML_DESCRIPTION tjnotification.php diff --git a/src/plugins/api/tjnotifications/tjnotifications.xml b/src/plugins/api/tjnotifications/tjnotifications.xml index 9bcfd936..362ea6b9 100644 --- a/src/plugins/api/tjnotifications/tjnotifications.xml +++ b/src/plugins/api/tjnotifications/tjnotifications.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 4th Aug 2022 - Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. + 4th Jan 2023 + Copyright (C) 2016 - 2023 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 3.0.2 + 3.0.3 tjnotifications.php diff --git a/src/plugins/privacy/tjnotification/tjnotification.xml b/src/plugins/privacy/tjnotification/tjnotification.xml index 20efc12d..cf011928 100644 --- a/src/plugins/privacy/tjnotification/tjnotification.xml +++ b/src/plugins/privacy/tjnotification/tjnotification.xml @@ -1,12 +1,12 @@ plg_privacy_tjnotification - 3.0.2 - 4th Aug 2022 + 3.0.3 + 4th Jan 2023 Techjoomla extensions@techjoomla.com https://techjoomla.com - Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. + Copyright (C) 2016 - 2023 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL PLG_PRIVACY_TJNOTIFICATION_XML_DESCRIPTION diff --git a/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml b/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml index 67ecc704..12620894 100644 --- a/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml +++ b/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 4th Aug 2022 - Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. + 4th Jan 2023 + Copyright (C) 2016 - 2023 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 3.0.2 + 3.0.3 tjnotificationsmobilenumber.php