https://bugzilla.wikimedia.org/show_bug.cgi?id=38598

--- Comment #3 from Krinkle <[email protected]> 2012-07-24 20:30:30 UTC ---
(In reply to comment #1)
> Why do you need to *repeat* the title? It's already there.
> 
> Why do you need the namespace? It's already in the title. Why can't you use
> wgNamespaceIds to convert the namespace name to a number?
> 
> Also, there is an API to request everything you need. Why can't you use the
> API?

See also mw.Title, which does all of that for you.

e.g. 
> var t = new mw.Title( 'Image: foo_bar quux.jpg ');
> t.getMain()
>< "Foo_bar_quux.jpeg"
> t.getNamespaceId()
>< 6
> t.getNamespacePrefix()
>< "File:"
> // etc..

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to