Skip to content

Commit 4e1a201

Browse files
authored
Merge pull request #53 from techjoomla/release-1.1.3
Merge `Release 1.1.3` into `master`
2 parents a373fad + d7e883e commit 4e1a201

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

administrator/models/hierarchys.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,22 +169,23 @@ public function getItems()
169169
{
170170
foreach ($items as $item)
171171
{
172-
$item->ReportsToUserName = array();
173-
$item->ReportsTo = array();
172+
$reportsToUserName = array();
174173

175174
if ($item->subuserId)
176175
{
177176
$results = $this->hierarchyModel->getReportsTo($item->user_id);
178-
$item->ReportsTo = $results;
179177

180178
foreach ($results as $res)
181179
{
182180
if (!empty($res->name))
183181
{
184-
$item->ReportsToUserName[] = $res->name;
182+
$reportsToUserName[] = $res->name;
185183
}
186184
}
187185
}
186+
187+
$item->ReportsToUserNameStr = implode(", ", $reportsToUserName);
188+
$item->ReportsToUserStr = implode(", ", array_column($results, 'reports_to'));
188189
}
189190
}
190191

administrator/views/hierarchys/tmpl/default.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@
107107
<?php
108108

109109
foreach ($this->items as $i => $item) :
110-
$ordering = ($listOrder == 'a.+ordering');
110+
$ordering = ($listOrder == 'a.+ordering');
111+
$userName = $item->ReportsToUserNameStr;
111112

112-
$userName = implode(', ', $item->ReportsToUserName);
113113
?>
114114
<tr class="row<?php echo $i % 2; ?> reports_to">
115115
<td class='center'><?php echo JHtml::_('grid.id', $i, $item->subuserId); ?></td>

hierarchy.xml

Lines changed: 3 additions & 3 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>22nd Oct 2019</creationDate>
5-
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
4+
<creationDate>22nd Jul 2021</creationDate>
5+
<copyright>Copyright (C) 2016 - 2021 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.2</version>
10+
<version>1.1.3</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 -->

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.2</version>
5-
<creationDate>22nd Oct 2019</creationDate>
4+
<version>1.1.3</version>
5+
<creationDate>22nd Jul 2021</creationDate>
66
<author>Techjoomla</author>
77
<authorEmail>extensions@techjoomla.com</authorEmail>
88
<authorUrl>https://techjoomla.com</authorUrl>
9-
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
9+
<copyright>Copyright (C) 2016 - 2021 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.2</version>
5-
<creationDate>22nd Oct 2019</creationDate>
4+
<version>1.1.3</version>
5+
<creationDate>22nd Jul 2021</creationDate>
66
<author>Techjoomla</author>
77
<authorEmail>extensions@techjoomla.com</authorEmail>
88
<authorUrl>https://techjoomla.com</authorUrl>
9-
<copyright>Copyright (C) 2016 - 2019 Techjoomla. All rights reserved.</copyright>
9+
<copyright>Copyright (C) 2016 - 2021 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>

script.hierarchy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function installSqlFiles($parent)
118118
{
119119
$query = trim($query);
120120

121-
if ($query != '' && $query{0} != '#')
121+
if ($query != '' && $query[0]!= '#')
122122
{
123123
$db->setQuery($query);
124124

0 commit comments

Comments
 (0)