simetrical(a)svn.wikimedia.org schreef:
> Revision: 32179
> Author: simetrical
> Date: 2008-03-19 15:53:48 +0000 (Wed, 19 Mar 2008)
>
> Log Message:
> -----------
> Fix an error for categories named literally "Project:" or some similarly weird thing. I thought that's not a legal title, but I'm told otherwise. Is there a better way to do this than manually prefixing "Category:"? The second parameter to newFromText is ignored if there are any prefixes, according to the docs.
You could try Title::newFromText(":$foo", NS_CATEGORY); , which uses the
category namespace as the default mainspace, which is then forced by the
leading colon. I haven't tested this and I'm not 100% sure this works,
but you could try (it'd still be hackish, but it'd be cleaner than the
alternative).
Roan Kattouw (Catrope)