Index: trunk/phase3/includes/User.php |
— | — | @@ -1117,7 +1117,6 @@ |
1118 | 1118 | // it will always be 0 when this function is called by parsercache. |
1119 | 1119 | |
1120 | 1120 | $confstr = $this->getOption( 'math' ); |
1121 | | - $confstr .= '!' . $this->getOption( 'highlightbroken' ); |
1122 | 1121 | $confstr .= '!' . $this->getOption( 'stubthreshold' ); |
1123 | 1122 | $confstr .= '!' . $this->getOption( 'editsection' ); |
1124 | 1123 | $confstr .= '!' . $this->getOption( 'editsectiononrightclick' ); |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -23,13 +23,6 @@ |
24 | 24 | function Linker() { |
25 | 25 | global $wgContLang; |
26 | 26 | $this->linktrail = $wgContLang->linkTrail(); |
27 | | - |
28 | | - # Cache option lookups done very frequently |
29 | | - $options = array( 'highlightbroken', 'hover' ); |
30 | | - foreach( $options as $opt ) { |
31 | | - global $wgUser; |
32 | | - $this->mOptions[$opt] = $wgUser->getOption( $opt ); |
33 | | - } |
34 | 27 | } |
35 | 28 | |
36 | 29 | /** |
— | — | @@ -51,9 +44,7 @@ |
52 | 45 | |
53 | 46 | $r = ($class != '') ? " class='$class'" : " class='external'"; |
54 | 47 | |
55 | | - if( !$same && $this->mOptions['hover'] ) { |
56 | | - $r .= " title=\"{$link}\""; |
57 | | - } |
| 48 | + $r .= " title=\"{$link}\""; |
58 | 49 | return $r; |
59 | 50 | } |
60 | 51 | |
— | — | @@ -71,9 +62,7 @@ |
72 | 63 | $r = ''; |
73 | 64 | } |
74 | 65 | |
75 | | - if( $this->mOptions['hover'] ) { |
76 | | - $r .= " title=\"{$link}\""; |
77 | | - } |
| 66 | + $r .= " title=\"{$link}\""; |
78 | 67 | return $r; |
79 | 68 | } |
80 | 69 | |
— | — | @@ -89,9 +78,7 @@ |
90 | 79 | $r = ''; |
91 | 80 | } |
92 | 81 | |
93 | | - if( $this->mOptions['hover'] ) { |
94 | | - $r .= ' title="' . $nt->getEscapedText() . '"'; |
95 | | - } |
| 82 | + $r .= ' title="' . $nt->getEscapedText() . '"'; |
96 | 83 | return $r; |
97 | 84 | } |
98 | 85 | |
— | — | @@ -333,11 +320,7 @@ |
334 | 321 | $trail = $m[2]; |
335 | 322 | } |
336 | 323 | } |
337 | | - if ( $this->mOptions['highlightbroken'] ) { |
338 | | - $s = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}"; |
339 | | - } else { |
340 | | - $s = "{$prefix}{$text}{$inside}<a href=\"{$u}\"{$style}>?</a>{$trail}"; |
341 | | - } |
| 324 | + $s = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}"; |
342 | 325 | |
343 | 326 | wfProfileOut( $fname ); |
344 | 327 | return $s; |
— | — | @@ -363,11 +346,7 @@ |
364 | 347 | $trail = $m[2]; |
365 | 348 | } |
366 | 349 | } |
367 | | - if ( $this->mOptions['highlightbroken'] ) { |
368 | | - $s = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}"; |
369 | | - } else { |
370 | | - $s = "{$prefix}{$text}{$inside}<a href=\"{$u}\"{$style}>!</a>{$trail}"; |
371 | | - } |
| 350 | + $s = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}"; |
372 | 351 | return $s; |
373 | 352 | } |
374 | 353 | |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * changes in an incompatible way, so the parser cache |
15 | 15 | * can automatically discard old data. |
16 | 16 | */ |
17 | | -define( 'MW_PARSER_VERSION', '1.4.0' ); |
| 17 | +define( 'MW_PARSER_VERSION', '1.5.0' ); |
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Variable substitution O(N^2) attack |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -879,26 +879,14 @@ |
880 | 880 | * returns css with user-specific options |
881 | 881 | * @access public |
882 | 882 | */ |
| 883 | + |
883 | 884 | function getUserStylesheet() { |
884 | 885 | $fname = 'SkinTemplate::getUserStylesheet'; |
885 | 886 | wfProfileIn( $fname ); |
886 | 887 | |
887 | 888 | global $wgUser; |
888 | 889 | $s = "/* generated user stylesheet */\n"; |
889 | | - |
890 | | - if( $wgUser->isLoggedIn() ) { |
891 | | - if ( $wgUser->getOption( "underline" ) ) { |
892 | | - $s .= "a { text-decoration: underline; }\n"; |
893 | | - } else { |
894 | | - $s .= "a { text-decoration: none; }\n"; |
895 | | - } |
896 | | - } |
897 | | - if ( !$wgUser->getOption( "highlightbroken" ) ) { |
898 | | - $s .= "a.new, #quickbar a.new { color: #CC2200; }\n"; |
899 | | - } |
900 | | - if ( $wgUser->getOption( "justify" ) ) { |
901 | | - $s .= "#bodyContent { text-align: justify; }\n"; |
902 | | - } |
| 890 | + $s .= $this->reallyDoGetUserStyles(); |
903 | 891 | wfProfileOut( $fname ); |
904 | 892 | return $s; |
905 | 893 | } |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -267,17 +267,36 @@ |
268 | 268 | $csspage = $wgContLang->getNsText( NS_MEDIAWIKI ) . ':' . $this->getSkinName() . '.css'; |
269 | 269 | $s = '@import "'.$this->makeUrl($csspage, 'action=raw&ctype=text/css')."\";\n"; |
270 | 270 | |
271 | | - if ( 1 == $wgUser->getOption( 'underline' ) ) { |
272 | | - # Don't override browser settings |
| 271 | + return $s . $this->reallyDoGetUserStyles(); |
| 272 | + } |
| 273 | + |
| 274 | + function reallyDoGetUserStyles() { |
| 275 | + global $wgUser; |
| 276 | + $s = ''; |
| 277 | + $underline = $wgUser->getOption( "underline" ) ? 'underline' : 'none'; |
| 278 | + $s .= "a { text-decoration: $underline; }\n"; |
| 279 | + if( $wgUser->getOption( 'highlightbroken' ) ) { |
| 280 | + $s .= "a.new, #quickbar a.new { color: #CC2200; }\n"; |
273 | 281 | } else { |
274 | | - # CHECK MERGE @@@ |
275 | | - # Force no underline |
276 | | - $s .= "a { text-decoration: none; }\n"; |
| 282 | + $s .= <<<END |
| 283 | +a.new, #quickbar a.new, |
| 284 | +a.stub, #quickbar a.stub { |
| 285 | + color: inherit; |
| 286 | + text-decoration: inherit; |
| 287 | +} |
| 288 | +a.new:after, #quickbar a.new:after { |
| 289 | + content: "?"; |
| 290 | + color: #CC2200; |
| 291 | + text-decoration: $underline; |
| 292 | +} |
| 293 | +a.stub:after, #quickbar a.stub:after { |
| 294 | + content: "!"; |
| 295 | + color: #772233; |
| 296 | + text-decoration: $underline; |
| 297 | +} |
| 298 | +END; |
277 | 299 | } |
278 | | - if ( 1 == $this->mOptions['highlightbroken'] ) { |
279 | | - $s .= "a.new, #quickbar a.new { color: #CC2200; }\n"; |
280 | | - } |
281 | | - if ( 1 == $wgUser->getOption( 'justify' ) ) { |
| 300 | + if( $wgUser->getOption( 'justify' ) ) { |
282 | 301 | $s .= "#article { text-align: justify; }\n"; |
283 | 302 | } |
284 | 303 | return $s; |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -53,7 +53,6 @@ |
54 | 54 | /* private */ $wgDefaultUserOptionsEn = array( |
55 | 55 | 'quickbar' => 1, |
56 | 56 | 'underline' => 1, |
57 | | - 'hover' => 1, |
58 | 57 | 'cols' => 80, |
59 | 58 | 'rows' => 25, |
60 | 59 | 'searchlimit' => 20, |
— | — | @@ -131,7 +130,6 @@ |
132 | 131 | ); |
133 | 132 | |
134 | 133 | /* private */ $wgUserTogglesEn = array( |
135 | | - 'hover', |
136 | 134 | 'underline', |
137 | 135 | 'highlightbroken', |
138 | 136 | 'justify', |
— | — | @@ -259,7 +257,6 @@ |
260 | 258 | 'special_version_prefix' => ' ', |
261 | 259 | 'special_version_postfix' => ' ', |
262 | 260 | # User preference toggles |
263 | | -'tog-hover' => 'Show hoverbox over wiki links', |
264 | 261 | 'tog-underline' => 'Underline links', |
265 | 262 | 'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>).', |
266 | 263 | 'tog-justify' => 'Justify paragraphs', |