OutputPageBeforeHTML happens on every page load, regardless of whether there was anything to parse. Generally speaking, asking $wgParser for the title is (IMO) a bad idea from that particular hook.
I'd recommend, instead, using $wgTitle - which (afaik) is pretty much guaranteed to have a value reflecting the current page. Good luck!
-- Jim R. Wilson (jimbojw)
On Thu, Mar 13, 2008 at 12:19 PM, Daniel Barrett danb@vistaprint.com wrote:
Whoops, forgot to say this is MW 1.11.0.
DanB
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This seems to have worked. Thanks Jim!!
DanB
-----Original Message----- Jim R. Wilson suggested:
I'd recommend, instead, using $wgTitle - which (afaik) is pretty much guaranteed to have a value reflecting the current page.
mediawiki-l@lists.wikimedia.org