File tree Expand file tree Collapse file tree 6 files changed +43
-12
lines changed
Expand file tree Collapse file tree 6 files changed +43
-12
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ CREATE TABLE IF NOT EXISTS `#__hierarchy_users` (
1515` state` INT (11 ) NOT NULL ,
1616` note` TEXT NOT NULL ,
1717PRIMARY KEY (` id` )
18- ) DEFAULT COLLATE= utf8_general_ci ;
18+ ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE= utf8mb4_unicode_ci ;
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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 -->
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 >
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments