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

--- Comment #14 from Brad Jorsch <bjor...@wikimedia.org> ---
(In reply to comment #13)
> That would be nice and easy if WikiPage was a nicely scoped interface. I
> don't
> see a way though to return a WikiPage object for a page that doesn't have a
> title yet. As it is now, you need a title to construct a WikiPage. We could
> use
> the fake Q0 title there, and the special page's title in the context
> itself...
> that might work, but it's even more black magick hackery :/

MediaWiki::initializeArticle(), when given a title that cannot exist, calls
Article::newFromTitle()->getPage(), which does new WikiPage(). That apparently
works fine with special pages, even though WikiPage::factory() throws errors
when given a title that cannot exist.

Gerrit change 106530 just added this same logic to the API's action=parse, for
being able to call WikiPage's makeParserOptions() when given a special page
title.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to