From bbe0dfb8656d6ea6a5147275b77a0122220b4ec5 Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Sun, 19 May 2013 19:27:53 +0200 Subject: [PATCH] Non existent user subpages should return 404 Bug: 46491 Change-Id: I900f1542b077b569ed64306ecf9f965ddabe59f8 --- includes/Article.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index d23bebf073..a0d4438222 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1092,6 +1092,7 @@ class Article implements Page { public function showMissingArticle() { global $wgSend404Code; $outputPage = $this->getContext()->getOutput(); + // Whether the page is a root user page of an existing user (but not a subpage) $validUserPage = false; # Show info in user (talk) namespace. Does the user exist? Is he blocked? @@ -1119,9 +1120,9 @@ class Article implements Page { ) ) ); - $validUserPage = true; + $validUserPage = !$this->getTitle()->isSubpage(); } else { - $validUserPage = true; + $validUserPage = !$this->getTitle()->isSubpage(); } } -- 2.20.1