function pstPass2( $text, &$user ) {
global $wgContLang, $wgLocaltimezone;
- # Variable replacement
- # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags
- $text = $this->replaceVariables( $text );
-
- # Signatures
- #
- $sigText = $this->getUserSig( $user );
-
/* Note: This is the timestamp saved as hardcoded wikitext to
* the database, we use $wgContLang here in order to give
* everyone the same signiture and use the default one rather
putenv( 'TZ='.$oldtz );
}
+ # Signatures
+ $sigText = $this->getUserSig( $user );
$text = preg_replace( '/~~~~~/', $d, $text );
$text = preg_replace( '/~~~~/', "$sigText $d", $text );
$text = preg_replace( '/~~~/', $sigText, $text );
+ # Variable replacement
+ # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags
+ $text = $this->replaceVariables( $text );
+
# Context links: [[|name]] and [[name (context)|]]
#
global $wgLegalTitleChars;
$needRedirect = false;
}
- # Clean up the signature a little
- $this->mNick = Parser::cleanSig( $this->mNick );
+ # Validate the signature and clean it up as needed
+ if( $this->mToggles['fancysig'] ) {
+ if( Parser::validateSig( $this->mNick ) ) {
+ $this->mNick = Parser::cleanSig( $this->mNick );
+ } else {
+ $this->mainPrefsForm( 'error', wfMsg( 'badsig' ) );
+ }
+ }
$wgUser->setOption( 'language', $this->mUserLanguage );
$wgUser->setOption( 'variant', $this->mUserVariant );
# See http://meta.wikipedia.org/wiki/MediaWiki_namespace
#
# NOTE TO TRANSLATORS: Do not copy this whole file when making translations!
-# A lot of common constants and a base class with inheritable methods are
+# A lot of common constants and a base class with inheritable mebathods are
# defined here, which should not be redefined. See the other LanguageXx.php
# files for examples.
#
'yourvariant' => 'Variant',
'yournick' => 'Nickname:',
'badsig' => 'Invalid raw signature; check HTML tags.',
-'badsig2' => 'Your signature contains one or more reserved expressions; please remove them.',
'email' => 'E-mail',
'emailforlost' => '<div style="width:30em">* Optional. An e-mail lets others contact you on this site without revealing your address, and lets us send you a new password if you forget it.<br /><br />Your real name will be used to give you attribution for your work.</div>',
'prefs-help-email-enotif' => 'This address is also used to send you e-mail notifications if you enabled the options.',