Slightly dirty hack to avoid a fatal PHP error when changing sig. I'll need to rethin...
authorRob Church <robchurch@users.mediawiki.org>
Thu, 12 Jan 2006 20:50:33 +0000 (20:50 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 12 Jan 2006 20:50:33 +0000 (20:50 +0000)
includes/Parser.php

index b6af7fa..0b3d92d 100644 (file)
@@ -3236,7 +3236,7 @@ class Parser
                        # Sig. might contain markup; validate this
                        if( $this->validateSig( $nickname ) !== false ) {
                                # Validated; clean up (if needed) and return it
-                               return( $this->cleanSig( $nickname ) );
+                               return( $this->cleanSig( $nickname, true ) );
                        } else {
                                # Failed to validate; fall back to the default
                                $nickname = $username;
@@ -3269,7 +3269,7 @@ class Parser
         * @param string $text
         * @return string Text
         */
-       function cleanSig( $text ) {
+       function cleanSig( $text, $parsing = false ) {
                $mw = MagicWord::get( MAG_SUBST );
                $substre = $mw->getBaseRegex();
                $subst = $mw->getSynonym( 0 );
@@ -3289,7 +3289,9 @@ class Parser
                );
                
                $text = preg_replace( '/~{3,5}/', '', $text );
-               $text = $this->replaceVariables( $text );
+               if( $parsing) {
+                       $text = $this->replaceVariables( $text );
+               }
 
        
                return $text;