Merge source code from joomla-cms master

Thanks Thomas Hunziker.