Skip to content

Commit a373fad

Browse files
authored
Merge pull request #49 from techjoomla/release-1.1.2
Merge `Release 1.1.2` into `master`
2 parents f0388c3 + e7e438e commit a373fad

File tree

6 files changed

+43
-12
lines changed

6 files changed

+43
-12
lines changed

administrator/sql/install.mysql.utf8.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `#__hierarchy_users` (
1515
`state` INT(11) NOT NULL,
1616
`note` TEXT NOT NULL,
1717
PRIMARY KEY (`id`)
18-
) DEFAULT COLLATE=utf8_general_ci;
18+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Change engine
2+
ALTER TABLE `#__hierarchy_users` ENGINE = InnoDB;
3+
4+
-- Change charset, collation
5+
ALTER TABLE `#__hierarchy_users` CHANGE `note` `note` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
6+
ALTER TABLE `#__hierarchy_users` CHANGE `context` `context` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
7+
8+

administrator/views/hierarchys/view.csv.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ class HierarchyViewHierarchys extends TjExportCsv
2929
*/
3030
public function display($tpl = null)
3131
{
32-
parent::display();
32+
$input = JFactory::getApplication()->input;
33+
$user = JFactory::getUser();
34+
$userAuthorisedExport = $user->authorise('core.create', 'com_hierarchy');
35+
36+
if ($userAuthorisedExport != 1 || !$user)
37+
{
38+
// Redirect to the list screen.
39+
$redirect = JRoute::_('index.php?option=com_hierarchy&view=hierarchys', false);
40+
JFactory::getApplication()->redirect($redirect, JText::_('JERROR_ALERTNOAUTHOR'));
41+
42+
return false;
43+
}
44+
else
45+
{
46+
if ($input->get('task') == 'download')
47+
{
48+
$fileName = $input->get('file_name');
49+
$this->download($fileName);
50+
JFactory::getApplication()->close();
51+
}
52+
else
53+
{
54+
parent::display();
55+
}
56+
}
3357
}
3458
}

hierarchy.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<extension type="component" version="3.0" method="upgrade">
33
<name>com_hierarchy</name>
4-
<creationDate>16th Nov 2018</creationDate>
5-
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
4+
<creationDate>22nd Oct 2019</creationDate>
5+
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
66
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
77
<author>Techjoomla</author>
88
<authorEmail>extensions@techjoomla.com</authorEmail>
99
<authorUrl>https://techjoomla.com</authorUrl>
10-
<version>1.1.1</version>
10+
<version>1.1.2</version>
1111
<description>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</description>
1212

1313
<install> <!-- Runs on install -->
@@ -23,7 +23,6 @@
2323
</update>
2424
<scriptfile>script.hierarchy.php</scriptfile>
2525
<files folder="site">
26-
<filename>index.html</filename>
2726
<filename>hierarchy.php</filename>
2827
<filename>controller.php</filename>
2928
<filename>router.php</filename>

plugins/actionlog/hierarchy/hierarchy.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<extension version="3.4" type="plugin" group="actionlog" method="upgrade">
33
<name>plg_actionlog_hierarchy</name>
4-
<version>1.1.1</version>
5-
<creationDate>16th Nov 2018</creationDate>
4+
<version>1.1.2</version>
5+
<creationDate>22nd Oct 2019</creationDate>
66
<author>Techjoomla</author>
77
<authorEmail>extensions@techjoomla.com</authorEmail>
88
<authorUrl>https://techjoomla.com</authorUrl>
9-
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
9+
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
1010
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
1111
<description>PLG_ACTIONLOG_HIERARCHY_XML_DESCRIPTION</description>
1212
<files>

plugins/privacy/hierarchy/hierarchy.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<extension version="3.4" type="plugin" group="privacy" method="upgrade">
33
<name>plg_privacy_hierarchy</name>
4-
<version>1.1.1</version>
5-
<creationDate>16th Nov 2018</creationDate>
4+
<version>1.1.2</version>
5+
<creationDate>22nd Oct 2019</creationDate>
66
<author>Techjoomla</author>
77
<authorEmail>extensions@techjoomla.com</authorEmail>
88
<authorUrl>https://techjoomla.com</authorUrl>
9-
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
9+
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
1010
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
1111
<description>PLG_PRIVACY_HIERARCHY_XML_DESCRIPTION</description>
1212
<files>

0 commit comments

Comments
 (0)