Quick and dirty guard against a FakeTitle making its way into message transformation.
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 22:36:32 +0000 (22:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Jan 2007 22:36:32 +0000 (22:36 +0000)
This could break job processing when a message using {{PAGENAME}} or similar got interpreted;
for instance using {{int:noarticeltext}}.

The message transformation uses $wgTitle, which is... probably not super.
Better fix might be to distinguish inline transformation in some nice way,
so the parser would use its own title object already set locally... or something.

ugh!

includes/Parser.php

index 400ce4a..32c3fc9 100644 (file)
@@ -3843,7 +3843,7 @@ class Parser
 
                wfProfileIn($fname);
 
-               if ( $wgTitle ) {
+               if ( $wgTitle && !( $wgTitle instanceof FakeTitle ) ) {
                        $this->mTitle = $wgTitle;
                } else {
                        $this->mTitle = Title::newFromText('msg');