Topic: Template styles selector drop down sorts in-correctly

Hi - a tiny 'bug' in 1.2.11.

When a user logs in, then goes to:

>Profile > Display

and then uses the drop-down selection box to select a new template to apply against the forum, the template entries are not sorted in proper English alphabetical order. At least on my system.

The problem is that the sort order is sensitive to the initial capitalisation of the template name.

Which means that, for example, templates are listed as:

Mercury
Oxygen
Radium
Sulfur
Zoey
phpbb blue
wanked

with the templates with lower-case names listed last.

The correct way to sort them (I think) would be to ignore the case of the initial letter, and just sort alphabetically, viz:

Mercury
Oxygen
phpbb blue
Radium
Sulfur
wanked
Zoey

I think that makes more sense.

IMHO.

Re: Template styles selector drop down sorts in-correctly

True, but the current code doesn't allow that sorting I think =/ It just reads it in the order of your stylesheets.

Re: Template styles selector drop down sorts in-correctly

It's the function PunBB uses to sort wink
The fix is just to replace the calls to natsort (one for languages, one for styles) with a call to natcasesort