Tags and CAPS vs caps (v2.0.13)

Please report bugs here!

Moderator: Thorsten

Post Reply
djbeefburger
Posts: 3
Joined: Mon Apr 13, 2009 9:53 pm

Tags and CAPS vs caps (v2.0.13)

Post by djbeefburger »

I don't know if this quite qualifies as a bug, but I found that when tags are added and capitalization isn't consistent, the tags end up being duplicated in faqtags and then also in the tag cloud...

My proposed fix is changing Tags.php line 217 from

Code: Select all

if (!in_array($tagging_name, $current_tags)) {
to

Code: Select all

if(!in_array(strtolower($tagging_name), array_map('strtolower', $current_tags))){
and line 252 from

Code: Select all

array_search($tagging_name, $current_tags));
to

Code: Select all

array_search(strtolower($tagging_name), array_map('strtolower', $current_tags)));
This will keep people from changing the capitalization of their existing tags unless they go into the DB... what do you think?

Cheers!

-Eric

(sorry I wasn't sure if this should go in the Proposals or the Bugs section... )
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tags and CAPS vs caps (v2.0.13)

Post by Thorsten »

Hi,

this is a very good proposal. :-)

I added your code to phpMyFAQ 2.0.14 and 2.5.0-beta.

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply