r6786 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6785‎ | r6786 | r6787 >
Date:08:40, 23 December 2004
Author:vibber
Status:old
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/includes/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -2834,9 +2834,14 @@
28352835 putenv( 'TZ='.$oldtzs );
28362836 }
28372837
 2838+ if( $user->getOption( 'fancysig' ) ) {
 2839+ $sigText = $k;
 2840+ } else {
 2841+ $sigText = '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]";
 2842+ }
28382843 $text = preg_replace( '/~~~~~/', $d, $text );
2839 - $text = preg_replace( '/~~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]] $d", $text );
2840 - $text = preg_replace( '/~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]", $text );
 2844+ $text = preg_replace( '/~~~~/', "$sigText $d", $text );
 2845+ $text = preg_replace( '/~~~/', $sigText, $text );
28412846
28422847 # Context links: [[|name]] and [[name (context)|]]
28432848 #
Index: trunk/phase3/includes/SpecialPreferences.php
@@ -476,8 +476,10 @@
477477 }
478478 }
479479
 480+ $fancysig = $this->getToggle( 'fancysig' );
480481 $wgOut->addHTML("
481482 <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div>
 483+ <div>$fancysig<br /></div>
482484 <div><label>$yl: <select name=\"wpUserLanguage\">\n");
483485
484486 /**
Index: trunk/phase3/languages/Language.php
@@ -79,7 +79,8 @@
8080 'enotifrevealaddr' => 0,
8181 'shownumberswatching' => 1,
8282 'rcusemodstyle' => 1,
83 - 'showupdated' => 1
 83+ 'showupdated' => 1,
 84+ 'fancysig' => 0,
8485 );
8586
8687 /* private */ $wgQuickbarSettingsEn = array(
@@ -155,6 +156,7 @@
156157 'shownumberswatching',
157158 'rcusemodstyle',
158159 'showupdated',
 160+ 'fancysig'
159161 );
160162
161163 /* private */ $wgBookstoreListEn = array(
@@ -276,6 +278,7 @@
277279 'tog-shownumberswatching' => 'Show the number of watching users (in recent changes view, watchlist and article page footers)',
278280 'tog-rcusemodstyle' => 'Show recent changes in UseMod style: only the most recent change of any page is listed.',
279281 'tog-showupdated' => 'Show update marker ',
 282+'tog-fancysig' => 'Raw signatures (without automatic link)',
280283
281284 # dates
282285 'sunday' => 'Sunday',

Status & tagging log