"Roan Kattouw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mark Clements (HappyDog) schreef: >> $Parser->mVariables =& $wgParser->mVariables; >> $Parser->mOutput =& $wgParser->mOutput; >> >> Now, it is clear to me that this is the wrong way of going about this - I >> shouldn't be having to mess with the internals of the parser object in >> order >> to just pre-process the text, as it will clearly break whenever the >> parser >> object is updated! >> >> Can someone tell me the correct forward-compatible way to pre-process >> article text in this manner? >> >> > My guess would be something like $parser = clone $wgParser; . Dunno if > that works (or if clone is even available in PHP 4), but you could try.
It doesn't, and it isn't... :-( That said, the PHP_Compat PEAR module contains a PHP4 version of the clone function (providing you use clone($wgParser)) which I might try. Alternatively, is there any harm in just using $wgParser directly? Do we have to make a copy? - Mark Clements (HappyDog) _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
