From 4f323f50e14c9d568d40bbce7a1d9eebd177b5ce Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 23 Dec 2004 08:40:51 +0000 Subject: [PATCH] Fancy sig option for the very nice folks who just aren't content with a user page link and will produce ugly invalid code and then complain about it. merge from REL1_4 --- includes/Parser.php | 9 +++++++-- includes/SpecialPreferences.php | 2 ++ languages/Language.php | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 18e89d2bce..c06d5be829 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2834,9 +2834,14 @@ class Parser putenv( 'TZ='.$oldtzs ); } + if( $user->getOption( 'fancysig' ) ) { + $sigText = $k; + } else { + $sigText = '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]"; + } $text = preg_replace( '/~~~~~/', $d, $text ); - $text = preg_replace( '/~~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]] $d", $text ); - $text = preg_replace( '/~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]", $text ); + $text = preg_replace( '/~~~~/', "$sigText $d", $text ); + $text = preg_replace( '/~~~/', $sigText, $text ); # Context links: [[|name]] and [[name (context)|]] # diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index fa42656c76..fde18f2ec3 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -476,8 +476,10 @@ class PreferencesForm { } } + $fancysig = $this->getToggle( 'fancysig' ); $wgOut->addHTML("
+
$fancysig