Skip to content

Commit

Permalink
Merge pull request #49 from techjoomla/release-1.1.2
Browse files Browse the repository at this point in the history
Merge `Release 1.1.2` into `master`
  • Loading branch information
manojLondhe authored Oct 22, 2019
2 parents f0388c3 + e7e438e commit a373fad
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 12 deletions.
2 changes: 1 addition & 1 deletion administrator/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
8 changes: 8 additions & 0 deletions administrator/sql/updates/mysql/1.1.2.sql
Original file line number Diff line number Diff line change
@@ -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;


26 changes: 25 additions & 1 deletion administrator/views/hierarchys/view.csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
}
7 changes: 3 additions & 4 deletions hierarchy.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.0" method="upgrade">
<name>com_hierarchy</name>
<creationDate>16th Nov 2018</creationDate>
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
<creationDate>22nd Oct 2019</creationDate>
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<version>1.1.1</version>
<version>1.1.2</version>
<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>

<install> <!-- Runs on install -->
Expand All @@ -23,7 +23,6 @@
</update>
<scriptfile>script.hierarchy.php</scriptfile>
<files folder="site">
<filename>index.html</filename>
<filename>hierarchy.php</filename>
<filename>controller.php</filename>
<filename>router.php</filename>
Expand Down
6 changes: 3 additions & 3 deletions plugins/actionlog/hierarchy/hierarchy.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="actionlog" method="upgrade">
<name>plg_actionlog_hierarchy</name>
<version>1.1.1</version>
<creationDate>16th Nov 2018</creationDate>
<version>1.1.2</version>
<creationDate>22nd Oct 2019</creationDate>
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>PLG_ACTIONLOG_HIERARCHY_XML_DESCRIPTION</description>
<files>
Expand Down
6 changes: 3 additions & 3 deletions plugins/privacy/hierarchy/hierarchy.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="privacy" method="upgrade">
<name>plg_privacy_hierarchy</name>
<version>1.1.1</version>
<creationDate>16th Nov 2018</creationDate>
<version>1.1.2</version>
<creationDate>22nd Oct 2019</creationDate>
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright>
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>PLG_PRIVACY_HIERARCHY_XML_DESCRIPTION</description>
<files>
Expand Down

0 comments on commit a373fad

Please sign in to comment.