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` (
15
15
` state` INT (11 ) NOT NULL ,
16
16
` note` TEXT NOT NULL ,
17
17
PRIMARY 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
29
29
*/
30
30
public function display ($ tpl = null )
31
31
{
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
+ }
33
57
}
34
58
}
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<extension type =" component" version =" 3.0" method =" upgrade" >
3
3
<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 >
6
6
<license >http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license >
7
7
<author >Techjoomla</author >
8
8
<authorEmail >extensions@techjoomla.com</authorEmail >
9
9
<authorUrl >https://techjoomla.com</authorUrl >
10
- <version >1.1.1 </version >
10
+ <version >1.1.2 </version >
11
11
<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 >
12
12
13
13
<install > <!-- Runs on install -->
23
23
</update >
24
24
<scriptfile >script.hierarchy.php</scriptfile >
25
25
<files folder =" site" >
26
- <filename >index.html</filename >
27
26
<filename >hierarchy.php</filename >
28
27
<filename >controller.php</filename >
29
28
<filename >router.php</filename >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<extension version =" 3.4" type =" plugin" group =" actionlog" method =" upgrade" >
3
3
<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 >
6
6
<author >Techjoomla</author >
7
7
<authorEmail >extensions@techjoomla.com</authorEmail >
8
8
<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 >
10
10
<license >http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license >
11
11
<description >PLG_ACTIONLOG_HIERARCHY_XML_DESCRIPTION</description >
12
12
<files >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<extension version =" 3.4" type =" plugin" group =" privacy" method =" upgrade" >
3
3
<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 >
6
6
<author >Techjoomla</author >
7
7
<authorEmail >extensions@techjoomla.com</authorEmail >
8
8
<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 >
10
10
<license >http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license >
11
11
<description >PLG_PRIVACY_HIERARCHY_XML_DESCRIPTION</description >
12
12
<files >
You can’t perform that action at this time.
0 commit comments