From: Tobias Date: Fri, 7 Aug 2009 14:44:32 +0000 (+0000) Subject: using wgOut->parseInline for signature preview in preferences. following r54454 X-Git-Tag: 1.31.0-rc.0~40437 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=6df30513dd7510b031f790bbff5119c0f36e145a;p=lhc%2Fweb%2Fwiklou.git using wgOut->parseInline for signature preview in preferences. following r54454 --- diff --git a/includes/Preferences.php b/includes/Preferences.php index 308a9c2eaf..9553a401ae 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -291,20 +291,17 @@ class Preferences { ); } - global $wgMaxSigChars, $wgParser; + global $wgMaxSigChars, $wgOut, $wgParser; // show a preview of the old signature first - $oldsigtext = $wgParser->preSaveTransform( "~~~", new Title , $user, new ParserOptions ); - $oldsig = $wgParser->parse( $oldsigtext, new Title , new ParserOptions ); - $m = array(); // remove

created by the parser (looks better without

) - if( preg_match( '/^

(.*)\n?<\/p>\n?$/sU', $oldsig->mText, $m ) ) $oldsig->mText = $m[1]; - + $oldsigWikiText = $wgParser->preSaveTransform( "~~~", new Title , $user, new ParserOptions ); + $oldsigHTML = $wgOut->parseInline( $oldsigWikiText ); $defaultPreferences['oldsig'] = array( 'type' => 'info', 'raw' => true, 'label-message' => 'tog-oldsig', - 'default' => $oldsig->mText, + 'default' => $oldsigHTML, 'section' => 'personal/signature', ); $defaultPreferences['nickname'] =