Skip to content

Commit

Permalink
Merge pull request #112 from joomdonation/dev/privacy
Browse files Browse the repository at this point in the history
Fix show IP column
  • Loading branch information
brianteeman authored Jun 18, 2018
2 parents 86f2a80 + dd3de94 commit 0677fba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<th>
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
</th>
<?php if ($this->ip) : ?>
<?php if ($this->showIpColumn) : ?>
<th>
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
</th>
Expand Down Expand Up @@ -96,7 +96,7 @@
<td>
<?php echo $item->name; ?>
</td>
<?php if ($this->ip) : ?>
<?php if ($this->showIpColumn) : ?>
<td>
<?php echo JText::_($this->escape($item->ip_address)); ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\Registry\Registry;
use Joomla\CMS\Plugin\PluginHelper;

Expand Down Expand Up @@ -66,17 +67,14 @@ class ActionlogsViewActionlogs extends JViewLegacy
*/
public function display($tpl = null)
{
if (PluginHelper::isEnabled('system', 'actionlogs'))
{
$params = new Registry(PluginHelper::getPlugin('system', 'actionlogs')->params);
$this->ip = (bool) $params->get('ip_logging', 0);
}
$params = ComponentHelper::getParams('com_actionlogs');

$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->pagination = $this->get('Pagination');
$this->showIpColumn = (bool) $params->get('ip_logging', 0);

if (count($errors = $this->get('Errors')))
{
Expand Down

0 comments on commit 0677fba

Please sign in to comment.