r6784 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6783‎ | r6784 | r6785 >
Date:08:18, 23 December 2004
Author:vibber
Status:old
Tags:
Comment:
* Add raw signatures option for those who simply must have cute sigs
With luck they will stop producing invalid wikitext in the future and complaining when parsing bugs are fixed.
Modified paths:
  • /branches/REL1_4/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_4/phase3/includes/Parser.php (modified) (history)
  • /branches/REL1_4/phase3/includes/SpecialPreferences.php (modified) (history)
  • /branches/REL1_4/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/Parser.php
@@ -2809,9 +2809,14 @@
28102810 putenv( 'TZ='.$oldtzs );
28112811 }
28122812
 2813+ if( $user->getOption( 'fancysig' ) ) {
 2814+ $sigText = $k;
 2815+ } else {
 2816+ $sigText = '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]";
 2817+ }
28132818 $text = preg_replace( '/~~~~~/', $d, $text );
2814 - $text = preg_replace( '/~~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]] $d", $text );
2815 - $text = preg_replace( '/~~~/', '[[' . $wgContLang->getNsText( NS_USER ) . ":$n|$k]]", $text );
 2819+ $text = preg_replace( '/~~~~/', "$sigText $d", $text );
 2820+ $text = preg_replace( '/~~~/', $sigText, $text );
28162821
28172822 # Context links: [[|name]] and [[name (context)|]]
28182823 #
Index: branches/REL1_4/phase3/includes/SpecialPreferences.php
@@ -414,8 +414,10 @@
415415 }
416416 }
417417
 418+ $fancysig = $this->getToggle( 'fancysig' );
418419 $wgOut->addHTML("
419420 <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div>
 421+ <div>$fancysig<br /></div>
420422 <div><label>$yl: <select name=\"wpUserLanguage\">\n");
421423
422424 /**
Index: branches/REL1_4/phase3/RELEASE-NOTES
@@ -156,7 +156,9 @@
157157 * Fix fatal errors in LanguageLi.php
158158 * Undo overly bright, difficult to read colors in Cologne Blue
159159 * (bug 1162) fix five-tilde date inserter
 160+* Add raw signatures option for those who simply must have cute sigs
160161
 162+
161163 === Caveats ===
162164
163165 Some output, particularly involving user-supplied inline HTML, may not
Index: branches/REL1_4/phase3/languages/Language.php
@@ -58,7 +58,8 @@
5959 'highlightbroken' => 1, 'stubthreshold' => 0,
6060 'previewontop' => 1, 'editsection'=>1,'editsectiononrightclick'=>0, 'showtoc'=>1,
6161 'showtoolbar' =>1,
62 - 'date' => 0, 'imagesize' => 2
 62+ 'date' => 0, 'imagesize' => 2,
 63+ 'fancysig' => 0,
6364 );
6465
6566 /* private */ $wgQuickbarSettingsEn = array(
@@ -127,6 +128,7 @@
128129 'previewontop',
129130 'previewonfirst',
130131 'nocache',
 132+ 'fancysig'
131133 );
132134
133135 /* private */ $wgBookstoreListEn = array(
@@ -241,6 +243,7 @@
242244 'tog-previewontop' => 'Show preview before edit box and not after it',
243245 'tog-previewonfirst' => 'Show preview on first edit',
244246 'tog-nocache' => 'Disable page caching',
 247+'tog-fancysig' => 'Raw signatures (without automatic link)',
245248
246249 # dates
247250 'sunday' => 'Sunday',

Status & tagging log