silverstripe/silverstripe-translatable — pull request #101 by tractorcow (2013-03-21 03:08:36+00:00)
Title: BUG Cleaner handling of querystring arguments when selecting locale

When selecting and redirecting to various locales (either by PHP or through javascript) url injection of the querystring argument "locale" acted poorly. Repeated changes of locale using the dropdown would disfigure the querystring into forms like "?&&&&&locale=en_NZ" or "?locale=en_NZ&" (with no conjoined querystring arguments).

This fix adds some more robust logic and cleaner handling of urls.