Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restore the admin application check for toolbar.

  • Loading branch information...
commit a962ad7ed99cc46c5407377e07efa01f06e58bfa 1 parent 59c18dc
@elinw elinw authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  libraries/joomla/application/component/helper.php
View
2  libraries/joomla/application/component/helper.php
@@ -357,7 +357,7 @@ public static function renderComponent($option, $params = array())
$contents = self::executeComponent($path);
// Build the component toolbar
- if ($path = JApplicationHelper::getPath('toolbar'))
+ if ($path = JApplicationHelper::getPath('toolbar') && $app->isAdmin())
{
// Get the task again, in case it has changed
$task = JRequest::getString('task');

1 comment on commit a962ad7

@beat

Hi Elin,
Thanks for the analysis of the bug and the pull request.
Unfortunately, it was breaking the toolbars include and generating a warning.

Here is my pull request for the fix of the fix here:
#710

This also illustrates once more why assignments should not be made inside if statements, like was already the case already before and which prompted for this added bug.

My pull request moves the assignment outside the if, which makes the line cleaner (and passing PHP lint).

My fix is tested.

Commented here too:
http://groups.google.com/group/joomla-dev-general/browse_thread/thread/8e7ac39b458f8037/0c49392e9ace754f

Please sign in to comment.
Something went wrong with that request. Please try again.