Skip to content

Commit

Permalink
Shouldn't this be written this way?
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmayer committed Oct 6, 2016
1 parent 5e814cb commit b29d7f9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
$userAuthoriseCoreEditState = $user->authorise('core.edit.state', 'com_finder');
$userId = $user->get('id');
foreach ($this->items as $i => $item) :
$canCheckin = $userAuthoriseCoreManage || $item->checked_out == $userId || $item->checked_out == 0;
$canChange = $userAuthoriseCoreEditState && $canCheckin;
$canCheckIn = $userAuthoriseCoreManage || $item->checked_out == $userId || $item->checked_out == 0;
$canChange = $userAuthoriseCoreEditState && $canCheckIn;
$escapedTitle = $this->escape($item->title);
?>
<tr class="row<?php echo $i % 2; ?>">
Expand All @@ -107,7 +107,7 @@
</td>
<td>
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'filters.', $canCheckin); ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'filters.', $canCheckIn); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_finder&task=filter.edit&filter_id=' . (int) $item->filter_id); ?>">
Expand Down

0 comments on commit b29d7f9

Please sign in to comment.