r87215 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87214‎ | r87215 | r87216 >
Date:21:14, 1 May 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
(bug 28343) Kill unused contextlines/contextchars
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -71,6 +71,7 @@
7272 details.
7373 * $wgProfiling has been removed.
7474 * The spyc library is now no longer included in phase3.
 75+* (bug 28343) Unused preferences contextlines/contextchars have been removed
7576
7677 === New features in 1.18 ===
7778 * (bug 8130) Query pages should limit to content namespaces, not just main
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1777,8 +1777,6 @@
17781778 'columns' => 'Columns:',
17791779 'searchresultshead' => 'Search',
17801780 'resultsperpage' => 'Hits per page:',
1781 -'contextlines' => 'Lines per hit:',
1782 -'contextchars' => 'Context per line:',
17831781 'stub-threshold' => 'Threshold for <a href="#" class="stub">stub link</a> formatting (bytes):',
17841782 'stub-threshold-disabled' => 'Disabled',
17851783 'recentchangesdays' => 'Days to show in recent changes:',
Index: trunk/phase3/maintenance/language/messages.inc
@@ -942,8 +942,6 @@
943943 'columns',
944944 'searchresultshead',
945945 'resultsperpage',
946 - 'contextlines',
947 - 'contextchars',
948946 'stub-threshold',
949947 'stub-threshold-disabled',
950948 'recentchangesdays',
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3063,8 +3063,6 @@
30643064 $wgDefaultUserOptions = array(
30653065 'ccmeonemails' => 0,
30663066 'cols' => 80,
3067 - 'contextchars' => 50,
3068 - 'contextlines' => 5,
30693067 'date' => 'default',
30703068 'diffonly' => 0,
30713069 'disablemail' => 0,
Index: trunk/phase3/includes/search/SearchEngine.php
@@ -362,14 +362,11 @@
363363 }
364364
365365 /**
366 - * Find snippet highlight settings for a given user
 366+ * Find snippet highlight settings for all users
367367 *
368 - * @param $user User
369368 * @return Array contextlines, contextchars
370369 */
371 - public static function userHighlightPrefs( &$user ) {
372 - // $contextlines = $user->getOption( 'contextlines', 5 );
373 - // $contextchars = $user->getOption( 'contextchars', 50 );
 370+ public static function userHighlightPrefs() {
374371 $contextlines = 2; // Hardcode this. Old defaults sucked. :)
375372 $contextchars = 75; // same as above.... :P
376373 return array( $contextlines, $contextchars );
Index: trunk/phase3/includes/Preferences.php
@@ -930,18 +930,6 @@
931931 'section' => 'searchoptions/displaysearchoptions',
932932 'min' => 0,
933933 );
934 - $defaultPreferences['contextlines'] = array(
935 - 'type' => 'int',
936 - 'label-message' => 'contextlines',
937 - 'section' => 'searchoptions/displaysearchoptions',
938 - 'min' => 0,
939 - );
940 - $defaultPreferences['contextchars'] = array(
941 - 'type' => 'int',
942 - 'label-message' => 'contextchars',
943 - 'section' => 'searchoptions/displaysearchoptions',
944 - 'min' => 0,
945 - );
946934
947935 global $wgEnableMWSuggest;
948936 if ( $wgEnableMWSuggest ) {

Comments

#Comment by Reedy (talk | contribs)   22:18, 1 May 2011

Ahhh preferences. Possibly the only thing more nasty than globals

Status & tagging log