r50030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50029‎ | r50030 | r50031 >
Date:23:49, 28 April 2009
Author:werdna
Status:ok
Tags:
Comment:
Uncommitted stuff still in my working copy:
* Logic for disabling email fields for unauthenticated addresses.
* Remove float styling for fieldsets in preferences form, ugly and annoying.
Modified paths:
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/main.css
@@ -966,6 +966,13 @@
967967 height: 1%;
968968 }
969969
 970+.mw-htmlform-submit {
 971+ font-weight: bold;
 972+ padding-left: .3em;
 973+ padding-right: .3em;
 974+ margin-right: 2em;
 975+}
 976+
970977 /* js pref toc */
971978 #preftoc {
972979 margin: 0;
@@ -1027,11 +1034,7 @@
10281035 padding: 0;
10291036 margin: 0;
10301037 }
1031 -.prefsection fieldset {
1032 - border: 1px solid #aaa;
1033 - float: left;
1034 - margin-right: 2em;
1035 -}
 1038+
10361039 .prefsection legend {
10371040 font-weight: bold;
10381041 }
@@ -1046,12 +1049,6 @@
10471050 padding: .2em 2em;
10481051 color: #666;
10491052 }
1050 -.mw-htmlform-submit {
1051 - font-weight: bold;
1052 - padding-left: .3em;
1053 - padding-right: .3em;
1054 - margin-right: 2em;
1055 -}
10561053
10571054 .preferences-login {
10581055 clear: both;
Index: trunk/phase3/includes/Preferences.php
@@ -286,6 +286,8 @@
287287
288288 global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication;
289289
 290+ $disableEmailPrefs = false;
 291+
290292 if ( $wgEmailAuthentication ) {
291293 if ( $user->getEmail() ) {
292294 if( $user->getEmailAuthenticationTimestamp() ) {
@@ -306,6 +308,7 @@
307309 wfMsg( 'emailconfirmlink' ) ) . '<br />';
308310 }
309311 } else {
 312+ $disableEmailPrefs = true;
310313 $emailauthenticated = wfMsg( 'noemailprefs' );
311314 }
312315
@@ -328,12 +331,14 @@
329332 'invert' => true,
330333 'section' => 'personal/email',
331334 'label-message' => 'allowemail',
 335+ 'disabled' => $disableEmailPrefs,
332336 );
333337 $defaultPreferences['ccmeonemails'] =
334338 array(
335339 'type' => 'toggle',
336340 'section' => 'personal/email',
337341 'label-message' => 'tog-ccmeonemails',
 342+ 'disabled' => $disableEmailPrefs,
338343 );
339344 }
340345
@@ -342,24 +347,28 @@
343348 'type' => 'toggle',
344349 'section' => 'personal/email',
345350 'label-message' => 'tog-enotifwatchlistpages',
 351+ 'disabled' => $disableEmailPrefs,
346352 );
347353 $defaultPreferences['enotifusertalkpages'] =
348354 array(
349355 'type' => 'toggle',
350356 'section' => 'personal/email',
351357 'label-message' => 'tog-enotifusertalkpages',
 358+ 'disabled' => $disableEmailPrefs,
352359 );
353360 $defaultPreferences['enotifminoredits'] =
354361 array(
355362 'type' => 'toggle',
356363 'section' => 'personal/email',
357364 'label-message' => 'tog-enotifminoredits',
 365+ 'disabled' => $disableEmailPrefs,
358366 );
359367 $defaultPreferences['enotifrevealaddr'] =
360368 array(
361369 'type' => 'toggle',
362370 'section' => 'personal/email',
363 - 'label-message' => 'tog-enotifrevealaddr'
 371+ 'label-message' => 'tog-enotifrevealaddr',
 372+ 'disabled' => $disableEmailPrefs,
364373 );
365374 }
366375 }

Status & tagging log