Restore the admin application check for toolbar. #703

Merged
merged 1 commit into from Jan 3, 2012

Conversation

Projects
None yet
5 participants
Contributor

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.

Member

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'))
Contributor

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.
694c346

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

Contributor

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:
#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

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