Implement https://github.com/joomla/joomla-cms/pull/3279
Merge pull request #7 from wilsonge/patch-1

Implement CMS PR 3279