r50869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50868‎ | r50869 | r50870 >
Date:20:25, 21 May 2009
Author:tparscal
Status:resolved (Comments)
Tags:
Comment:
Moved top-level preferences into sub-categories to improve UI consistency.
Modified paths:
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Preferences.php
@@ -399,7 +399,7 @@
400400 array(
401401 'type' => 'radio',
402402 'options' => $settings,
403 - 'section' => 'skin',
 403+ 'section' => 'rendering/skin',
404404 'label-message' => 'qbsettings',
405405 );
406406 }
@@ -449,7 +449,7 @@
450450 'type' => 'radio',
451451 'options' => $dateOptions,
452452 'label-message' => 'dateformat',
453 - 'section' => 'datetime',
 453+ 'section' => 'datetime/dateformat',
454454 );
455455 }
456456
@@ -465,7 +465,7 @@
466466 'raw' => 1,
467467 'label-message' => 'servertime',
468468 'default' => $nowserver,
469 - 'section' => 'datetime',
 469+ 'section' => 'datetime/timeoffset',
470470 );
471471
472472 $defaultPreferences['nowlocal'] =
@@ -474,7 +474,7 @@
475475 'raw' => 1,
476476 'label-message' => 'localtime',
477477 'default' => $nowlocal,
478 - 'section' => 'datetime',
 478+ 'section' => 'datetime/timeoffset',
479479 );
480480
481481 // Grab existing pref.
@@ -493,7 +493,7 @@
494494 'label-message' => 'timezonelegend',
495495 'options' => self::getTimezoneOptions(),
496496 'default' => $tzSetting,
497 - 'section' => 'datetime',
 497+ 'section' => 'datetime/timeoffset',
498498 );
499499 }
500500
@@ -508,7 +508,7 @@
509509 wfMsg( 'underline-default' ) => 2,
510510 ),
511511 'label-message' => 'tog-underline',
512 - 'section' => 'rendering',
 512+ 'section' => 'rendering/advanced',
513513 );
514514
515515 $stubThresholdValues = array( 0, 50, 100, 500, 1000, 2000, 5000, 10000 );
@@ -520,50 +520,50 @@
521521 $defaultPreferences['stubthreshold'] =
522522 array(
523523 'type' => 'selectorother',
524 - 'section' => 'rendering',
 524+ 'section' => 'rendering/advanced',
525525 'options' => $stubThresholdOptions,
526526 'label' => wfMsg('stub-threshold'), // Raw HTML message. Yay?
527527 );
528528 $defaultPreferences['highlightbroken'] =
529529 array(
530530 'type' => 'toggle',
531 - 'section' => 'rendering',
 531+ 'section' => 'rendering/advanced',
532532 'label' => wfMsg('tog-highlightbroken'), // Raw HTML
533533 );
534534 $defaultPreferences['showtoc'] =
535535 array(
536536 'type' => 'toggle',
537 - 'section' => 'rendering',
 537+ 'section' => 'rendering/advanced',
538538 'label-message' => 'tog-showtoc',
539539 );
540540 $defaultPreferences['nocache'] =
541541 array(
542542 'type' => 'toggle',
543543 'label-message' => 'tog-nocache',
544 - 'section' => 'rendering',
 544+ 'section' => 'rendering/advanced',
545545 );
546546 $defaultPreferences['showhiddencats'] =
547547 array(
548548 'type' => 'toggle',
549 - 'section' => 'rendering',
 549+ 'section' => 'rendering/advanced',
550550 'label-message' => 'tog-showhiddencats'
551551 );
552552 $defaultPreferences['showjumplinks'] =
553553 array(
554554 'type' => 'toggle',
555 - 'section' => 'rendering',
 555+ 'section' => 'rendering/advanced',
556556 'label-message' => 'tog-showjumplinks',
557557 );
558558 $defaultPreferences['justify'] =
559559 array(
560560 'type' => 'toggle',
561 - 'section' => 'rendering',
 561+ 'section' => 'rendering/advanced',
562562 'label-message' => 'tog-justify',
563563 );
564564 $defaultPreferences['numberheadings'] =
565565 array(
566566 'type' => 'toggle',
567 - 'section' => 'rendering',
 567+ 'section' => 'rendering/advanced',
568568 'label-message' => 'tog-numberheadings',
569569 );
570570 }
@@ -589,73 +589,73 @@
590590 $defaultPreferences['previewontop'] =
591591 array(
592592 'type' => 'toggle',
593 - 'section' => 'editing',
 593+ 'section' => 'editing/advanced',
594594 'label-message' => 'tog-previewontop',
595595 );
596596 $defaultPreferences['previewonfirst'] =
597597 array(
598598 'type' => 'toggle',
599 - 'section' => 'editing',
 599+ 'section' => 'editing/advanced',
600600 'label-message' => 'tog-previewonfirst',
601601 );
602602 $defaultPreferences['editsection'] =
603603 array(
604604 'type' => 'toggle',
605 - 'section' => 'editing',
 605+ 'section' => 'editing/advanced',
606606 'label-message' => 'tog-editsection',
607607 );
608608 $defaultPreferences['editsectiononrightclick'] =
609609 array(
610610 'type' => 'toggle',
611 - 'section' => 'editing',
 611+ 'section' => 'editing/advanced',
612612 'label-message' => 'tog-editsectiononrightclick',
613613 );
614614 $defaultPreferences['editondblclick'] =
615615 array(
616616 'type' => 'toggle',
617 - 'section' => 'editing',
 617+ 'section' => 'editing/advanced',
618618 'label-message' => 'tog-editondblclick',
619619 );
620620 $defaultPreferences['editwidth'] =
621621 array(
622622 'type' => 'toggle',
623 - 'section' => 'editing',
 623+ 'section' => 'editing/advanced',
624624 'label-message' => 'tog-editwidth',
625625 );
626626 $defaultPreferences['showtoolbar'] =
627627 array(
628628 'type' => 'toggle',
629 - 'section' => 'editing',
 629+ 'section' => 'editing/advanced',
630630 'label-message' => 'tog-showtoolbar',
631631 );
632632 $defaultPreferences['minordefault'] =
633633 array(
634634 'type' => 'toggle',
635 - 'section' => 'editing',
 635+ 'section' => 'editing/advanced',
636636 'label-message' => 'tog-minordefault',
637637 );
638638 $defaultPreferences['externaleditor'] =
639639 array(
640640 'type' => 'toggle',
641 - 'section' => 'editing',
 641+ 'section' => 'editing/advanced',
642642 'label-message' => 'tog-externaleditor',
643643 );
644644 $defaultPreferences['externaldiff'] =
645645 array(
646646 'type' => 'toggle',
647 - 'section' => 'editing',
 647+ 'section' => 'editing/advanced',
648648 'label-message' => 'tog-externaldiff',
649649 );
650650 $defaultPreferences['forceeditsummary'] =
651651 array(
652652 'type' => 'toggle',
653 - 'section' => 'editing',
 653+ 'section' => 'editing/advanced',
654654 'label-message' => 'tog-forceeditsummary',
655655 );
656656 $defaultPreferences['uselivepreview'] =
657657 array(
658658 'type' => 'toggle',
659 - 'section' => 'editing',
 659+ 'section' => 'editing/advanced',
660660 'label-message' => 'tog-uselivepreview',
661661 );
662662 }
@@ -667,7 +667,7 @@
668668 array(
669669 'type' => 'int',
670670 'label-message' => 'recentchangesdays',
671 - 'section' => 'rc',
 671+ 'section' => 'rc/display',
672672 'min' => 1,
673673 'max' => ceil($wgRCMaxAge / (3600*24)),
674674 );
@@ -675,19 +675,20 @@
676676 array(
677677 'type' => 'int',
678678 'label-message' => 'recentchangescount',
679 - 'section' => 'rc',
 679+ 'help-message' => 'prefs-help-recentchangescount',
 680+ 'section' => 'rc/display',
680681 );
681682 $defaultPreferences['usenewrc'] =
682683 array(
683684 'type' => 'toggle',
684685 'label-message' => 'tog-usenewrc',
685 - 'section' => 'rc',
 686+ 'section' => 'rc/advanced',
686687 );
687688 $defaultPreferences['hideminor'] =
688689 array(
689690 'type' => 'toggle',
690691 'label-message' => 'tog-hideminor',
691 - 'section' => 'rc',
 692+ 'section' => 'rc/advanced',
692693 );
693694
694695 global $wgUseRCPatrol;
@@ -695,13 +696,13 @@
696697 $defaultPreferences['hidepatrolled'] =
697698 array(
698699 'type' => 'toggle',
699 - 'section' => 'rc',
 700+ 'section' => 'rc/advanced',
700701 'label-message' => 'tog-hidepatrolled',
701702 );
702703 $defaultPreferences['newpageshidepatrolled'] =
703704 array(
704705 'type' => 'toggle',
705 - 'section' => 'rc',
 706+ 'section' => 'rc/advanced',
706707 'label-message' => 'tog-newpageshidepatrolled',
707708 );
708709 }
@@ -711,7 +712,7 @@
712713 $defaultPreferences['shownumberswatching'] =
713714 array(
714715 'type' => 'toggle',
715 - 'section' => 'rc',
 716+ 'section' => 'rc/advanced',
716717 'label-message' => 'tog-shownumberswatching',
717718 );
718719 }
@@ -720,56 +721,56 @@
721722 static function watchlistPreferences( $user, &$defaultPreferences ) {
722723 global $wgUseRCPatrol;
723724 ## Watchlist #####################################
724 - $defaultPreferences['wllimit'] =
 725+ $defaultPreferences['watchlistdays'] =
725726 array(
726727 'type' => 'int',
727728 'min' => 0,
728 - 'max' => 1000,
729 - 'label-message' => 'prefs-watchlist-edits',
730 - 'section' => 'watchlist'
 729+ 'max' => 7,
 730+ 'section' => 'watchlist/display',
 731+ 'label-message' => 'prefs-watchlist-days',
731732 );
732 - $defaultPreferences['watchlistdays'] =
 733+ $defaultPreferences['wllimit'] =
733734 array(
734735 'type' => 'int',
735736 'min' => 0,
736 - 'max' => 7,
737 - 'section' => 'watchlist',
738 - 'label-message' => 'prefs-watchlist-days',
 737+ 'max' => 1000,
 738+ 'label-message' => 'prefs-watchlist-edits',
 739+ 'section' => 'watchlist/display'
739740 );
740741 $defaultPreferences['extendwatchlist'] =
741742 array(
742743 'type' => 'toggle',
743 - 'section' => 'watchlist',
 744+ 'section' => 'watchlist/advanced',
744745 'label-message' => 'tog-extendwatchlist',
745746 );
746747 $defaultPreferences['watchlisthideminor'] =
747748 array(
748749 'type' => 'toggle',
749 - 'section' => 'watchlist',
 750+ 'section' => 'watchlist/advanced',
750751 'label-message' => 'tog-watchlisthideminor',
751752 );
752753 $defaultPreferences['watchlisthidebots'] =
753754 array(
754755 'type' => 'toggle',
755 - 'section' => 'watchlist',
 756+ 'section' => 'watchlist/advanced',
756757 'label-message' => 'tog-watchlisthidebots',
757758 );
758759 $defaultPreferences['watchlisthideown'] =
759760 array(
760761 'type' => 'toggle',
761 - 'section' => 'watchlist',
 762+ 'section' => 'watchlist/advanced',
762763 'label-message' => 'tog-watchlisthideown',
763764 );
764765 $defaultPreferences['watchlisthideanons'] =
765766 array(
766767 'type' => 'toggle',
767 - 'section' => 'watchlist',
 768+ 'section' => 'watchlist/advanced',
768769 'label-message' => 'tog-watchlisthideanons',
769770 );
770771 $defaultPreferences['watchlisthideliu'] =
771772 array(
772773 'type' => 'toggle',
773 - 'section' => 'watchlist',
 774+ 'section' => 'watchlist/advanced',
774775 'label-message' => 'tog-watchlisthideliu',
775776 );
776777
@@ -777,7 +778,7 @@
778779 $defaultPreferences['watchlisthidepatrolled'] =
779780 array(
780781 'type' => 'toggle',
781 - 'section' => 'watchlist',
 782+ 'section' => 'watchlist/advanced',
782783 'label-message' => 'tog-watchlisthidepatrolled',
783784 );
784785 }
@@ -795,7 +796,7 @@
796797 if ( $user->isAllowed( $action ) ) {
797798 $defaultPreferences[$pref] = array(
798799 'type' => 'toggle',
799 - 'section' => 'watchlist',
 800+ 'section' => 'watchlist/advanced',
800801 'label-message' => "tog-$pref",
801802 );
802803 }
@@ -810,21 +811,21 @@
811812 array(
812813 'type' => 'int',
813814 'label-message' => 'resultsperpage',
814 - 'section' => 'searchoptions',
 815+ 'section' => 'searchoptions/display',
815816 'min' => 0,
816817 );
817818 $defaultPreferences['contextlines'] =
818819 array(
819820 'type' => 'int',
820821 'label-message' => 'contextlines',
821 - 'section' => 'searchoptions',
 822+ 'section' => 'searchoptions/display',
822823 'min' => 0,
823824 );
824825 $defaultPreferences['contextchars'] =
825826 array(
826827 'type' => 'int',
827828 'label-message' => 'contextchars',
828 - 'section' => 'searchoptions',
 829+ 'section' => 'searchoptions/display',
829830 'min' => 0,
830831 );
831832 global $wgEnableMWSuggest;
@@ -833,7 +834,7 @@
834835 array(
835836 'type' => 'toggle',
836837 'label-message' => 'mwsuggest-disable',
837 - 'section' => 'searchoptions',
 838+ 'section' => 'searchoptions/display',
838839 );
839840 }
840841
@@ -855,7 +856,7 @@
856857 'type' => 'multiselect',
857858 'label-message' => 'defaultns',
858859 'options' => $nsOptions,
859 - 'section' => 'searchoptions',
 860+ 'section' => 'searchoptions/advanced',
860861 'prefix' => 'searchNs',
861862 );
862863 }
@@ -865,13 +866,13 @@
866867 $defaultPreferences['diffonly'] =
867868 array(
868869 'type' => 'toggle',
869 - 'section' => 'misc',
 870+ 'section' => 'misc/diffs',
870871 'label-message' => 'tog-diffonly',
871872 );
872873 $defaultPreferences['norollbackdiff'] =
873874 array(
874875 'type' => 'toggle',
875 - 'section' => 'misc',
 876+ 'section' => 'misc/diffs',
876877 'label-message' => 'tog-norollbackdiff',
877878 );
878879 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r50872Follow-up to r50869:...siebrand21:56, 21 May 2009

Comments

#Comment by Siebrand (talk | contribs)   21:20, 21 May 2009
  • messages.inc not updated
  • MessagesEn.php not rebuilt
  • "This includes recent changes, page histories, and in logs." reads awkward. Are you certain that's a correct sentence?
  • "Date format" could be removed as a label for the radio buttons, or at least needs a colon
  • "Time zone" also needs a colon (although not related directly to this commit)
#Comment by Siebrand (talk | contribs)   21:26, 21 May 2009

Message 'prefs-advanced' is now being reused. That should probably not be done to allow customisation of each occurrence.

#Comment by Siebrand (talk | contribs)   21:58, 21 May 2009

All fixed in r50872.

Status & tagging log