Add a new searchmenu-new-nocreate message
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Tue, 4 May 2010 15:36:53 +0000 (15:36 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Tue, 4 May 2010 15:36:53 +0000 (15:36 +0000)
This message is shown when no title matches the searchterm and when the user is not allowed to create pages either.
The message is empty be default and balances r61555 from bug 19600.

See also the related bug 20976

RELEASE-NOTES
includes/specials/SpecialSearch.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index c338b65..a3d8c38 100644 (file)
@@ -65,6 +65,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   which causes Vector to render the variants drop-down menu with a label
   showing the current variant name. This is off by default, pending further
   research into its user experience implications.
+* (bug 20976) "searchmenu-new-nocreate" message now displayed when when there
+  is no title match in search and the user has no rights to create pages.
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index 4b565e8..4c3c6cc 100644 (file)
@@ -327,6 +327,8 @@ class SpecialSearch {
                                $messageName = 'searchmenu-exists';
                        } elseif( $t->userCan( 'create' ) ) {
                                $messageName = 'searchmenu-new';
+                       } else {
+                               $messageName = 'searchmenu-new-nocreate';
                        }
                } 
                if( $messageName ) {
index f3195a1..b9d6cd9 100644 (file)
@@ -1611,6 +1611,7 @@ Note that using the navigation links will reset this column.',
 'searchmenu-legend'                => 'Search options',
 'searchmenu-exists'                => "'''There is a page named \"[[:\$1]]\" on this wiki'''",
 'searchmenu-new'                   => "'''Create the page \"[[:\$1]]\" on this wiki!'''",
+'searchmenu-new-nocreate'          => '', # do not translate or duplicate this message to other languages
 'searchhelp-url'                   => 'Help:Contents',
 'searchmenu-prefix'                => '[[Special:PrefixIndex/$1|Browse pages with this prefix]]',
 'searchmenu-help'                  => '[[{{MediaWiki:Searchhelp-url}}|{{int:help}}]]?', # do not translate or duplicate this message to other languages
index e89f818..6b6a63a 100644 (file)
@@ -1121,6 +1121,7 @@ Viewprevnext is sometimes preceded by the {{msg-mw|Showingresults}} or {{msg-mw|
 'searchmenu-legend'              => '{{Identical|Search options}}',
 'searchmenu-exists'              => 'An option shown in a menu beside search form offering a link to the existing page having the specified title (when using the default MediaWiki search engine).',
 'searchmenu-new'                 => 'An option shown in a menu beside search form offering a red link to the not yet existing page having the specified title (when using the default MediaWiki search engine).',
+'searchmenu-new-nocreate'        => 'An option shown in a menu beside search form when users are not allowed to create new pages (when using the default MediaWiki search engine).',
 'searchhelp-url'                 => '{{Identical|HelpContent}}
 Description: The URL of the search help page.
 {{doc-important|Do not change "Help:" part.}}',
index 89c3688..7faa996 100644 (file)
@@ -804,6 +804,7 @@ $wgMessageStructure = array(
                'searchmenu-legend',
                'searchmenu-exists',
                'searchmenu-new',
+               'searchmenu-new-nocreate',
                'searchhelp-url',
                'searchmenu-prefix',
                'searchmenu-help',