Merge "Import PSR NullLogger instead of using absolute class references"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 14 Jul 2019 17:03:37 +0000 (17:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 14 Jul 2019 17:03:37 +0000 (17:03 +0000)
includes/Title.php
includes/libs/http/MultiHttpClient.php
tests/phpunit/includes/TitleTest.php

index 28bec0b..95ccd9a 100644 (file)
@@ -1770,6 +1770,7 @@ class Title implements LinkTarget, IDBAccessObject {
                if (
                        !MediaWikiServices::getInstance()->getNamespaceInfo()->
                                hasSubpages( $this->mNamespace )
+                       || strtok( $this->getText(), '/' ) === false
                ) {
                        return $this->getText();
                }
index a6135ae..2e418b9 100644 (file)
@@ -57,7 +57,7 @@ class MultiHttpClient implements LoggerAwareInterface {
        /** @var float */
        protected $connTimeout = 10;
        /** @var float */
-       protected $reqTimeout = 300;
+       protected $reqTimeout = 900;
        /** @var bool */
        protected $usePipelining = false;
        /** @var int */
index d0a95c2..913f56d 100644 (file)
@@ -554,6 +554,10 @@ class TitleTest extends MediaWikiTestCase {
                        # Title, expected base, optional message
                        [ 'User:John_Doe/subOne/subTwo', 'John Doe' ],
                        [ 'User:Foo / Bar / Baz', 'Foo ' ],
+                       [ 'Talk:////', '////' ],
+                       [ 'Template:////', '////' ],
+                       [ 'Template:Foo////', 'Foo' ],
+                       [ 'Template:Foo////Bar', 'Foo' ],
                ];
        }