Skip to content

Commit

Permalink
Update view.html.php (#12800)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva authored and rdeutz committed Nov 15, 2016
1 parent 1b5b6ef commit c584c48
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ protected function addToolbar()
$section = $this->state->get('filter.section');
$canDo = JHelperContent::getActions($component, 'category', $categoryId);
$user = JFactory::getUser();
$extension = JFactory::getApplication()->input->get('extension', '', 'word');

// Get the toolbar object instance
$bar = JToolbar::getInstance('toolbar');
Expand Down Expand Up @@ -210,9 +209,9 @@ protected function addToolbar()
}

// Add a batch button
if ($user->authorise('core.create', $extension)
&& $user->authorise('core.edit', $extension)
&& $user->authorise('core.edit.state', $extension))
if ($canDo->get('core.create')
&& $canDo->get('core.edit')
&& $canDo->get('core.edit.state'))
{
$title = JText::_('JTOOLBAR_BATCH');

Expand Down

0 comments on commit c584c48

Please sign in to comment.