(bug 28343) Kill unused contextlines/contextchars
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 1 May 2011 21:14:32 +0000 (21:14 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 1 May 2011 21:14:32 +0000 (21:14 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/Preferences.php
includes/search/SearchEngine.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index d990038..17aabb6 100644 (file)
@@ -71,6 +71,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
   details.
 * $wgProfiling has been removed.
 * The spyc library is now no longer included in phase3.
+* (bug 28343) Unused preferences contextlines/contextchars have been removed
 
 === New features in 1.18 ===
 * (bug 8130) Query pages should limit to content namespaces, not just main
index 4abd2d5..5a134f4 100644 (file)
@@ -3063,8 +3063,6 @@ $wgReservedUsernames = array(
 $wgDefaultUserOptions = array(
        'ccmeonemails'            => 0,
        'cols'                    => 80,
-       'contextchars'            => 50,
-       'contextlines'            => 5,
        'date'                    => 'default',
        'diffonly'                => 0,
        'disablemail'             => 0,
index 65ff625..1331181 100644 (file)
@@ -930,18 +930,6 @@ class Preferences {
                        'section' => 'searchoptions/displaysearchoptions',
                        'min' => 0,
                );
-               $defaultPreferences['contextlines'] = array(
-                       'type' => 'int',
-                       'label-message' => 'contextlines',
-                       'section' => 'searchoptions/displaysearchoptions',
-                       'min' => 0,
-               );
-               $defaultPreferences['contextchars'] = array(
-                       'type' => 'int',
-                       'label-message' => 'contextchars',
-                       'section' => 'searchoptions/displaysearchoptions',
-                       'min' => 0,
-               );
 
                global $wgEnableMWSuggest;
                if ( $wgEnableMWSuggest ) {
index f5eaf18..a4b3e71 100644 (file)
@@ -362,14 +362,11 @@ class SearchEngine {
        }
 
        /**
-        * Find snippet highlight settings for a given user
+        * Find snippet highlight settings for all users
         *
-        * @param $user User
         * @return Array contextlines, contextchars
         */
-       public static function userHighlightPrefs( &$user ) {
-               // $contextlines = $user->getOption( 'contextlines',  5 );
-               // $contextchars = $user->getOption( 'contextchars', 50 );
+       public static function userHighlightPrefs() {
                $contextlines = 2; // Hardcode this. Old defaults sucked. :)
                $contextchars = 75; // same as above.... :P
                return array( $contextlines, $contextchars );
index 3bce962..50ab0ea 100644 (file)
@@ -1777,8 +1777,6 @@ Note that their indexes of {{SITENAME}} content may be out of date.',
 'columns'                       => 'Columns:',
 'searchresultshead'             => 'Search',
 'resultsperpage'                => 'Hits per page:',
-'contextlines'                  => 'Lines per hit:',
-'contextchars'                  => 'Context per line:',
 'stub-threshold'                => 'Threshold for <a href="#" class="stub">stub link</a> formatting (bytes):',
 'stub-threshold-disabled'       => 'Disabled',
 'recentchangesdays'             => 'Days to show in recent changes:',
index dcc31b5..1695d10 100644 (file)
@@ -942,8 +942,6 @@ $wgMessageStructure = array(
                'columns',
                'searchresultshead',
                'resultsperpage',
-               'contextlines',
-               'contextchars',
                'stub-threshold',
                'stub-threshold-disabled',
                'recentchangesdays',