Restore the admin application check for toolbar. #703

merged 1 commit into from Jan 3, 2012


None yet
5 participants

elinw commented Jan 3, 2012

This undoes a previous change (#566) which had backward compatibility issues.

Unit testing complete. There were 0 failures and 0 errors from 1971 tests and 11145 assertions.
Checkstyle analysis reported 199 warnings and 0 errors.


realityking commented Jan 3, 2012

I know it was this way before but we can prevent running some code when we write it this way:

if ($app->isAdmin() && $path = JApplicationHelper::getPath('toolbar'))

pasamio commented Jan 3, 2012

Let's just put it back the way it was and do a more thorough job of fixing the class later.

@pasamio pasamio added a commit that referenced this pull request Jan 3, 2012

@pasamio pasamio Merge pull request #703 from elinw/toolbar
Restore the admin application check for toolbar.

@pasamio pasamio merged commit 694c346 into joomla:staging Jan 3, 2012


beat commented on a962ad7 Jan 6, 2012

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:

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment