Bug in freeTag event plugin

Found a bug? Tell us!!
Post Reply
WebComPas
Regular
Posts: 101
Joined: Thu Nov 22, 2007 10:14 am
Contact:

Bug in freeTag event plugin

Post by WebComPas »

Hello!

Recently I noticed a bug in the freeTag event plugin. It's not an evil bug but I would be glad if it was fixed. By the way, it could be fixed very easyly.
In the tag list within the entry edit form the tags are ordered by their first letter. If there are tags, which have the same first letter but in lower case and upper case, the group showing letter is displayed more than once. So it looks for example like this:
|N: Nagios, |O: Office, |O: openSource, |O: Outlook, |P: PHP,
To fix this bug, it's only necessary to change lines 763 and766 in serendipity_event_freetag.php like that:

Code: Select all

// Original version:
if (substr($tag, 0, 1) != $lastletter)
[...]
$lastletter = substr($tag, 0, 1);


// Fixed version:
if (strtoupper(substr($tag, 0, 1)) != $lastletter)
[...]
$lastletter = strtoupper(substr($tag, 0, 1));
I hope this will be changed soon.


Pascal
Interessantes aus den Themenbereichen Computer, Internet und Programmierung unter http://www.it-blog.net
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Bug in freeTag event plugin

Post by garvinhicking »

Hi!

Thanks a lot, a useful patch. I just committed it!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply