joomla/joomla-platform — pull request #1406 by rvsjoen (2012-07-24 18:45:04+00:00)
Title: Fix problem with JLoader prefixes

When registering a custom prefix that has more than a single uppercase character, JLoader searches the wrong path. For example, registering

```php
JLoader::registerPrefix('Jcms', JPATH_PLATFORM . '/cms');
```

will cause it to look for, say, JcmsViewHtml in libraries/cms/cms/view/html.php because the "cms" part of the prefix is mistakenly interpreted as a path segment.

This patch will make sure the whole first segment of a CamelCasedWord is used as the loader prefix.