From d9aac22d4fd3a6bce95f2ff61711e1379f6cc792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRohan=20Shinde?= <“balu.shinde@vowellms.com”> Date: Mon, 8 Jul 2019 15:40:39 +0530 Subject: [PATCH 1/5] Bug #147014 fix: Hierarchy >> when we export>>file does not get download --- administrator/views/hierarchys/view.csv.php | 26 ++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/administrator/views/hierarchys/view.csv.php b/administrator/views/hierarchys/view.csv.php index edfe8b6..8a25b5c 100644 --- a/administrator/views/hierarchys/view.csv.php +++ b/administrator/views/hierarchys/view.csv.php @@ -29,6 +29,30 @@ class HierarchyViewHierarchys extends TjExportCsv */ public function display($tpl = null) { - parent::display(); + $input = JFactory::getApplication()->input; + $user = JFactory::getUser(); + $userAuthorisedExport = $user->authorise('core.create', 'com_hierarchy'); + + if ($userAuthorisedExport != 1 || !$user) + { + // Redirect to the list screen. + $redirect = JRoute::_('index.php?option=com_hierarchy&view=hierarchys', false); + JFactory::getApplication()->redirect($redirect, JText::_('JERROR_ALERTNOAUTHOR')); + + return false; + } + else + { + if ($input->get('task') == 'download') + { + $fileName = $input->get('file_name'); + $this->download($fileName); + JFactory::getApplication()->close(); + } + else + { + parent::display(); + } + } } } From ad1a95784b7258182d55c8ac023166cf69c78fc1 Mon Sep 17 00:00:00 2001 From: twsvaishali Date: Mon, 5 Aug 2019 14:48:52 +0530 Subject: [PATCH 2/5] Update hierarchy.xml --- hierarchy.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/hierarchy.xml b/hierarchy.xml index fa53cf0..4b1e397 100644 --- a/hierarchy.xml +++ b/hierarchy.xml @@ -23,7 +23,6 @@ script.hierarchy.php - index.html hierarchy.php controller.php router.php From d585660b72aee615383bc1098df8d303e7081214 Mon Sep 17 00:00:00 2001 From: Snehal Patil Date: Tue, 22 Oct 2019 17:27:13 +0530 Subject: [PATCH 3/5] Task #46 fix: Updated table charset and collation --- administrator/sql/install.mysql.utf8.sql | 4 ++-- administrator/sql/updates/mysql/1.1.2.sql | 9 +++++++++ hierarchy.xml | 6 +++--- plugins/actionlog/hierarchy/hierarchy.xml | 6 +++--- plugins/privacy/hierarchy/hierarchy.xml | 6 +++--- 5 files changed, 20 insertions(+), 11 deletions(-) create mode 100755 administrator/sql/updates/mysql/1.1.2.sql diff --git a/administrator/sql/install.mysql.utf8.sql b/administrator/sql/install.mysql.utf8.sql index 6546f0b..a370df0 100755 --- a/administrator/sql/install.mysql.utf8.sql +++ b/administrator/sql/install.mysql.utf8.sql @@ -1,4 +1,4 @@ --- -------------------------------------------------------------- + -- -------------------------------------------------------------- -- -- Table structure for table `#__hierarchy_users` -- @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `#__hierarchy_users` ( `state` INT(11) NOT NULL, `note` TEXT NOT NULL, PRIMARY KEY (`id`) -) DEFAULT COLLATE=utf8_general_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/sql/updates/mysql/1.1.2.sql b/administrator/sql/updates/mysql/1.1.2.sql new file mode 100755 index 0000000..d7e97e3 --- /dev/null +++ b/administrator/sql/updates/mysql/1.1.2.sql @@ -0,0 +1,9 @@ +-- Change engine +ALTER TABLE `#__hierarchy_users` ENGINE = InnoDB; + +-- Change charset, collation +ALTER TABLE `#__hierarchy_users` CHANGE `note` `note` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `#__hierarchy_users` CHANGE `context` `context` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `#__hierarchy_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + + diff --git a/hierarchy.xml b/hierarchy.xml index 4b1e397..0d1cfaa 100644 --- a/hierarchy.xml +++ b/hierarchy.xml @@ -1,13 +1,13 @@ com_hierarchy - 16th Nov 2018 - Copyright (C) 2016 - 2018 Techjoomla. All rights reserved. + 22nd Oct 2019 + Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL Techjoomla extensions@techjoomla.com https://techjoomla.com - 1.1.1 + 1.1.2 This tool will let the admin set a ‘Reports to’ field for each user in the system. This will be updated en masse using a CSV diff --git a/plugins/actionlog/hierarchy/hierarchy.xml b/plugins/actionlog/hierarchy/hierarchy.xml index 2adf75a..eee50f6 100644 --- a/plugins/actionlog/hierarchy/hierarchy.xml +++ b/plugins/actionlog/hierarchy/hierarchy.xml @@ -1,12 +1,12 @@ plg_actionlog_hierarchy - 1.1.1 - 16th Nov 2018 + 1.1.2 + 22nd Oct 2019 Techjoomla extensions@techjoomla.com https://techjoomla.com - Copyright (C) 2016 - 2018 Techjoomla. All rights reserved. + Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL PLG_ACTIONLOG_HIERARCHY_XML_DESCRIPTION diff --git a/plugins/privacy/hierarchy/hierarchy.xml b/plugins/privacy/hierarchy/hierarchy.xml index a26cc02..f7a3600 100644 --- a/plugins/privacy/hierarchy/hierarchy.xml +++ b/plugins/privacy/hierarchy/hierarchy.xml @@ -1,12 +1,12 @@ plg_privacy_hierarchy - 1.1.1 - 16th Nov 2018 + 1.1.2 + 22nd Oct 2019 Techjoomla extensions@techjoomla.com https://techjoomla.com - Copyright (C) 2016 - 2018 Techjoomla. All rights reserved. + Copyright (C) 2016 - 2019 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL PLG_PRIVACY_HIERARCHY_XML_DESCRIPTION From c28eae812aa377b10144e1c11ad2a2e9953e77db Mon Sep 17 00:00:00 2001 From: Snehal Patil Date: Tue, 22 Oct 2019 17:31:23 +0530 Subject: [PATCH 4/5] Task #46 fix: Updated table charset and collation --- administrator/sql/updates/mysql/1.1.2.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/administrator/sql/updates/mysql/1.1.2.sql b/administrator/sql/updates/mysql/1.1.2.sql index d7e97e3..3f23ae8 100755 --- a/administrator/sql/updates/mysql/1.1.2.sql +++ b/administrator/sql/updates/mysql/1.1.2.sql @@ -4,6 +4,5 @@ ALTER TABLE `#__hierarchy_users` ENGINE = InnoDB; -- Change charset, collation ALTER TABLE `#__hierarchy_users` CHANGE `note` `note` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; ALTER TABLE `#__hierarchy_users` CHANGE `context` `context` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; -ALTER TABLE `#__hierarchy_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; From f0ee088d7c83bfed6ba09b784d7e9c8caf8cf733 Mon Sep 17 00:00:00 2001 From: Manoj L Date: Tue, 22 Oct 2019 17:41:07 +0530 Subject: [PATCH 5/5] Update install.mysql.utf8.sql --- administrator/sql/install.mysql.utf8.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/sql/install.mysql.utf8.sql b/administrator/sql/install.mysql.utf8.sql index a370df0..5cb47c9 100755 --- a/administrator/sql/install.mysql.utf8.sql +++ b/administrator/sql/install.mysql.utf8.sql @@ -1,4 +1,4 @@ - -- -------------------------------------------------------------- +-- -------------------------------------------------------------- -- -- Table structure for table `#__hierarchy_users` --