Ya, that part would be a good idea. It would also make migrating to any new normalization system easier since you only need to change that one function, and don't need to worry about anyone calling titleToKey and keyToTitle when you have different code for prefixes.
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of: -The Nadir-Point Group (http://nadir-point.com) --It's Wiki-Tools subgroup (http://wiki-tools.com) --The ElectronicMe project (http://electronic-me.org) --Games-G.P.S. (http://ggps.org) -And Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) --Animepedia (http://anime.wikia.com) --Narutopedia (http://naruto.wikia.com)
Roan Kattouw wrote:
Daniel Friesen schreef:
Why inside of the function? That goes back to the whole issue of titles not being normalized right. Someone asking for "...&title=foobar &..." is going to get the dbkey "Foobar_" which won't be valid for the page.
Yeah, I thought of that later too. Still, it's probably a good idea to have a separate function (like titlePartToKey() and keyToTitlePart() or something similar) that does all the substr() magic rather than duplicating it all over the place.
Roan Kattouw (Catrope)