Skip to content

Commit

Permalink
Simplify param check #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunziker authored Mar 6, 2017
1 parent 746b1a7 commit f478eca
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions administrator/components/com_users/views/groups/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,7 @@
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));


// Create shortcut to parameters.
$params = $this->state->get('params');

$app = JFactory::getApplication();
$input = $app->input;

// This checks if the config options have ever been saved. If they haven't they will fall back to the original settings.
$params = json_decode($params);
$debugoptions = isset($params->debugGroups);

if (!$debugoptions)
{
$$params->debugGroups = '1';
}

$debugGroups = $this->state->get('params')->get('debugGroups', 1);

JText::script('COM_USERS_GROUPS_CONFIRM_DELETE');

Expand Down Expand Up @@ -129,7 +114,7 @@
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
<?php if ($params->debugGroups == 1) : ?>
<?php if ($debugGroups) : ?>
<div class="small"><a href="<?php echo JRoute::_('index.php?option=com_users&view=debuggroup&group_id=' . (int) $item->id); ?>">
<?php echo JText::_('COM_USERS_DEBUG_GROUP'); ?></a></div>
<?php endif; ?>
Expand Down

0 comments on commit f478eca

Please sign in to comment.