Jani Patokallio wrote:
> 
> I've got a simple Extension that expands an {{#include}} parser function
> into random text.  It works well for most things, but if I try to stick in
> a new heading, includes/Preprocessor_DOM.php::expand() fails on this...
> 
>   $titleText = $this->title->getPrefixedDBkey();
> 
> because "$this" (a PPFrame_DOM) does not have a title object.  As a
> temporary band-aid, I inserted this into Preprocessor_DOM.php:

There's always $wgTitle.  I'm not sure (without actually looking into 
it) if that's the cleanest solution, but enough things in MediaWiki rely 
on that global that you can pretty much assume that it'll always be set 
to something reasonably meaningful.

-- 
Ilmari Karonen

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

Reply via email to