From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- maintenance/preprocessorFuzzTest.php | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'maintenance/preprocessorFuzzTest.php') diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 31b372c2..9dee67e2 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -1,5 +1,22 @@ templates = array(); } + /** + * @param $title Title + */ function templateHook( $title ) { $titleText = $title->getPrefixedDBkey(); @@ -173,10 +192,10 @@ class PPFuzzTest { $wgUser->mFrom = 'name'; $wgUser->ppfz_test = $this; - $options = new ParserOptions; + $options = ParserOptions::newFromUser( $wgUser ); $options->setTemplateCallback( array( $this, 'templateHook' ) ); $options->setTimestamp( wfTimestampNow() ); - $this->output = call_user_func( array( $wgParser, $this->entryPoint ), $this->mainText, $this->title->getPrefixedText(), $options ); + $this->output = call_user_func( array( $wgParser, $this->entryPoint ), $this->mainText, $this->title, $options ); return $this->output; } @@ -200,7 +219,7 @@ class PPFuzzTest { } class PPFuzzUser extends User { - var $ppfz_test; + var $ppfz_test, $mDataLoaded; function load() { if ( $this->mDataLoaded ) { @@ -210,13 +229,13 @@ class PPFuzzUser extends User { $this->loadDefaults( $this->mName ); } - function getOption( $option, $defaultOverride = '' ) { - if ( $option === 'fancysig' ) { + function getOption( $oname, $defaultOverride = null, $ignoreHidden = false ) { + if ( $oname === 'fancysig' ) { return $this->ppfz_test->fancySig; - } elseif ( $option === 'nickname' ) { + } elseif ( $oname === 'nickname' ) { return $this->ppfz_test->nickname; } else { - return parent::getOption( $option, $defaultOverride ); + return parent::getOption( $oname, $defaultOverride, $ignoreHidden ); } } } -- cgit v1.2.2