Merge "Remove deprecated method insertArticleLink() from class ChangeList"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 19 Feb 2019 12:49:46 +0000 (12:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 19 Feb 2019 12:49:46 +0000 (12:49 +0000)
includes/specials/SpecialContributions.php
includes/specials/SpecialRedirect.php
languages/data/Names.php
languages/i18n/en.json
languages/i18n/qqq.json
languages/messages/MessagesGcr.php

index 5b939ef..3a180db 100644 (file)
@@ -152,6 +152,15 @@ class SpecialContributions extends IncludableSpecialPage {
                }
                $this->opts = ContribsPager::processDateFilter( $this->opts );
 
+               if ( $this->opts['namespace'] < NS_MAIN ) {
+                       $this->getOutput()->wrapWikiMsg(
+                               "<div class=\"mw-negative-namespace-not-supported error\">\n\$1\n</div>",
+                               [ 'negative-namespace-not-supported' ]
+                       );
+                       $out->addHTML( $this->getForm() );
+                       return;
+               }
+
                $feedType = $request->getVal( 'feed' );
 
                $feedParams = [
index 1b2bda9..c4e4635 100644 (file)
@@ -119,7 +119,9 @@ class SpecialRedirect extends FormSpecialPage {
                        // ... and we can
                        if ( $mto && !$mto->isError() ) {
                                // ... change the URL to point to a thumbnail.
-                               $url = $mto->getUrl();
+                               // Note: This url is more temporary as can change
+                               // if file is reuploaded and has different aspect ratio.
+                               $url = [ $mto->getUrl(), $height === -1 ? 301 : 302 ];
                        }
                }
 
@@ -224,7 +226,21 @@ class SpecialRedirect extends FormSpecialPage {
                                break;
                }
                if ( $status && $status->isGood() ) {
-                       $this->getOutput()->redirect( $status->getValue() );
+                       // These urls can sometimes be linked from prominent places,
+                       // so varnish cache.
+                       $value = $status->getValue();
+                       if ( is_array( $value ) ) {
+                               list( $url, $code ) = $value;
+                       } else {
+                               $url = $value;
+                               $code = 301;
+                       }
+                       if ( $code === 301 ) {
+                               $this->getOutput()->setCdnMaxage( 60 * 60 );
+                       } else {
+                               $this->getOutput()->setCdnMaxage( 10 );
+                       }
+                       $this->getOutput()->redirect( $url, $code );
 
                        return true;
                }
index 4f24713..aaa5d16 100644 (file)
@@ -173,7 +173,7 @@ class Names {
                'gan' => '贛語', # Gan (multiple scripts - defaults to Traditional)
                'gan-hans' => "赣语(简体)\u{200E}", # Gan (Simplified Han)
                'gan-hant' => "贛語(繁體)\u{200E}", # Gan (Traditional Han)
-               'gcr' => 'kréyòl gwiyanè', # Guianan Creole
+               'gcr' => 'kriyòl gwiyannen', # Guianan Creole
                'gd' => 'Gàidhlig', # Scots Gaelic
                'gl' => 'galego', # Galician
                'glk' => 'گیلکی', # Gilaki
index 81c305f..7416d3f 100644 (file)
        "anoncontribs": "Contributions",
        "contribsub2": "For {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "User account \"$1\" is not registered.",
+       "negative-namespace-not-supported": "Namespaces with negative values are not supported.",
        "nocontribs": "No changes were found matching these criteria.",
        "uctop": "current",
        "month": "From month (and earlier):",
index 0c43ccc..796d436 100644 (file)
        "anoncontribs": "Same as {{msg-mw|mycontris}} but used for non-logged-in users.\n\nSee also:\n* {{msg-mw|Accesskey-pt-anoncontribs}}\n* {{msg-mw|Tooltip-pt-anoncontribs}}\n{{Identical|Contribution}}",
        "contribsub2": "Contributions for \"user\" (links). Parameters:\n* $1 is an IP address or a username, with a link which points to the user page (if registered user).\n* $2 is list of tool links. The list contains a link which has text {{msg-mw|Sp-contributions-talk}}.\n* $3 is a plain text username used for GENDER.\n{{Identical|For $1}}",
        "contributions-userdoesnotexist": "This message is used in [[Special:Contributions]]. It is used to tell the user that the name he searched for doesn't exist.\n\nParameters:\n* $1 - a username\n{{Identical|Userdoesnotexist}}",
+       "negative-namespace-not-supported": "This message is used in [[Special:Contributions]] to tell users that use namespaces with negative value. It not supported as associated namespace(s) doesn't exist.",
        "nocontribs": "Used in [[Special:Contributions]] and [[Special:DeletedContributions]].\n\nSee examples: [[Special:Contributions/x]] and [[Special:DeletedContributions/x]].\n\nParameters:\n* $1 - (Unused) the user name",
        "uctop": "This message is used in [[Special:Contributions]]. It is used to show that a particular edit was the last made to a page. Example: 09:57, 11 February 2008 (hist) (diff) Pagename‎ (edit summary) (current)\n{{Identical|Current}}",
        "month": "Used in [[Special:Contributions]] and history pages ([{{fullurl:Sandbox|action=history}} example]), as label for a dropdown box to select a specific month to view the edits made in that month, and the earlier months. See also {{msg-mw|year}}.",
index 6e460fa..a880114 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/** Guianan Creole (kréyòl gwiyanè)
+/** Guianan Creole (Kriyòl Gwiyannen)
  *
  * To improve a translation please visit https://translatewiki.net
  *