diff --git a/administrator/sql/install.mysql.utf8.sql b/administrator/sql/install.mysql.utf8.sql index 6546f0b..5cb47c9 100755 --- a/administrator/sql/install.mysql.utf8.sql +++ b/administrator/sql/install.mysql.utf8.sql @@ -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..3f23ae8 --- /dev/null +++ b/administrator/sql/updates/mysql/1.1.2.sql @@ -0,0 +1,8 @@ +-- 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; + + 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(); + } + } } } diff --git a/hierarchy.xml b/hierarchy.xml index fa53cf0..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 @@ -23,7 +23,6 @@ script.hierarchy.php - index.html hierarchy.php controller.php router.php 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