r93204 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93203‎ | r93204 | r93205 >
Date:16:39, 26 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added preference for toplink and small fix
Modified paths:
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php (modified) (history)
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.i18n.php (modified) (history)
  • /trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.i18n.php
@@ -62,11 +62,12 @@
6363 // Preferences
6464 'prefs-swl' => 'Semantic watchlist',
6565 'prefs-swlgroup' => 'Groups to watch',
66 - 'prefs-swlnotification' => 'Notification options',
 66+ 'prefs-swlglobal' => 'General options',
 67+ 'swl-prefs-emailnofity' => 'E-mail me on changes to properties I am watching',
 68+ 'swl-prefs-watchlisttoplink' => 'Show a link to the Semantic Watchlist on the top of the page',
6769 'swl-prefs-category-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from category ''$4''",
6870 'swl-prefs-namespace-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from namespace ''$4''",
6971 'swl-prefs-concept-label' => "'''$1''': {{PLURAL:$2|property|properties}} $3 from concept ''$4''",
70 - 'swl-prefs-emailnofity' => 'E-mail me on changes to properties I am watching',
7172
7273 // API
7374 'swl-err-userid-xor-groupids' => 'Either the userid or the groupids parameter needs to be specified, but not both.',
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.settings.php
@@ -44,4 +44,11 @@
4545 $egSWLMaxMails = 1;
4646
4747 # The default value for the user preference to send email notifications.
48 -$wgDefaultUserOptions['swl_email'] = false;
 48+$wgDefaultUserOptions['swl_email'] = true;
 49+
 50+# The default value for the user preference to display a top link to the semantic watchlist.
 51+$wgDefaultUserOptions['swl_watchlisttoplink'] = true;
 52+
 53+# Enable displaying a top link to the semantic watchlist?
 54+$egSWLEnableTopLink = true;
 55+
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php
@@ -116,11 +116,19 @@
117117 $preferences['swl_email'] = array(
118118 'type' => 'toggle',
119119 'label-message' => 'swl-prefs-emailnofity',
120 - 'section' => 'swl/swlnotification',
121 - 'default' => $GLOBALS['egSWLEnableEmailNotify']
 120+ 'section' => 'swl/swlglobal',
122121 );
123122 }
124123
 124+ // Only show the top link preference when it's enabled.
 125+ if ( $GLOBALS['egSWLEnableTopLink'] ) {
 126+ $preferences['swl_watchlisttoplink'] = array(
 127+ 'type' => 'toggle',
 128+ 'label-message' => 'swl-prefs-watchlisttoplink',
 129+ 'section' => 'swl/swlglobal',
 130+ );
 131+ }
 132+
125133 foreach ( $groups as /* SWLGroup */ $group ) {
126134 if ( count( $group->getProperties() ) == 0 ) {
127135 continue;