Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132965

Change subject: Remove "Help/Project" profile from Special:Search
......................................................................

Remove "Help/Project" profile from Special:Search

The vast majority of wikis have an empty help namespace and
searching project pages is mostly an advanced search feature.

Cluttering the UI with an extra tab that's (most likely) rarely
clicked isn't helping anyone.

Change-Id: I0c448bcee877e027ff95c96812aac86d89d4eb32
---
M includes/DefaultSettings.php
M includes/search/SearchEngine.php
M includes/specials/SpecialSearch.php
M languages/i18n/en.json
4 files changed, 1 insertion(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/132965/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 64512c8..b7116e7 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5321,17 +5321,6 @@
 );
 
 /**
- * Namespaces to be searched when user clicks the "Help" tab
- * on Special:Search.
- *
- * Same format as $wgNamespacesToBeSearchedDefault.
- */
-$wgNamespacesToBeSearchedHelp = array(
-       NS_PROJECT => true,
-       NS_HELP => true,
-);
-
-/**
  * If set to true the 'searcheverything' preference will be effective only for
  * logged-in users.
  * Useful for big wikis to maintain different search profiles for anonymous and
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 907047e..3d0655b 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -432,17 +432,6 @@
        }
 
        /**
-        * Return the help namespaces to be shown on Special:Search
-        *
-        * @return array
-        */
-       public static function helpNamespaces() {
-               global $wgNamespacesToBeSearchedHelp;
-
-               return array_keys( $wgNamespacesToBeSearchedHelp, true );
-       }
-
-       /**
         * Return a 'cleaned up' search string
         *
         * @param string $text
diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 2713a5f..33bd87f 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -30,7 +30,7 @@
 class SpecialSearch extends SpecialPage {
        /**
         * Current search profile. Search profile is just a name that identifies
-        * the active search tab on the search page (content, help, 
discussions...)
+        * the active search tab on the search page (content, discussions...)
         * For users tt replaces the set of enabled namespaces from the query
         * string when applicable. Extensions can add new profiles with hooks
         * with custom search options just for that profile.
@@ -974,14 +974,6 @@
                                'message' => 'searchprofile-images',
                                'tooltip' => 'searchprofile-images-tooltip',
                                'namespaces' => array( NS_FILE ),
-                       ),
-                       'help' => array(
-                               'message' => 'searchprofile-project',
-                               'tooltip' => 'searchprofile-project-tooltip',
-                               'namespaces' => SearchEngine::helpNamespaces(),
-                               'namespace-messages' => 
SearchEngine::namespacesAsText(
-                                       SearchEngine::helpNamespaces()
-                               ),
                        ),
                        'all' => array(
                                'message' => 'searchprofile-everything',
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 1c617f7..006278e 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -882,12 +882,10 @@
        "searchmenu-new": "<strong>Create the page \"[[:$1]]\" on this 
wiki!</strong> {{PLURAL:$2|0=|See also the page found with your search.|See 
also the search results found.}}",
        "searchmenu-new-nocreate": "",
        "searchprofile-articles": "Content pages",
-       "searchprofile-project": "Help and Project pages",
        "searchprofile-images": "Multimedia",
        "searchprofile-everything": "Everything",
        "searchprofile-advanced": "Advanced",
        "searchprofile-articles-tooltip": "Search in $1",
-       "searchprofile-project-tooltip": "Search in $1",
        "searchprofile-images-tooltip": "Search for files",
        "searchprofile-everything-tooltip": "Search all of content (including 
talk pages)",
        "searchprofile-advanced-tooltip": "Search in custom namespaces",

-- 
To view, visit https://gerrit.wikimedia.org/r/132965
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c448bcee877e027ff95c96812aac86d89d4eb32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to