Extend Title check in Skin for titles without associated titles
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Wed, 16 Sep 2015 15:50:56 +0000 (17:50 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Wed, 16 Sep 2015 15:50:56 +0000 (17:50 +0200)
Like talk or the subject title (for a talk title). This prevents Skin.php
from trying to get the talk title of a title in a namespace that can't hold
any.

Follow up:
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/80409

Bug: T110878
Change-Id: I3c803d784f931a21b47065590e567f8bb111aa2a

includes/skins/Skin.php

index 53af3e7..0b19c33 100644 (file)
@@ -238,8 +238,8 @@ abstract class Skin extends ContextSource {
                        $titles[] = $user->getTalkPage();
                }
 
-               // Other tab link
-               if ( $title->isSpecialPage() ) {
+               // Check, if the page can hold some kind of content, otherwise do nothing
+               if ( !$title->canExist() ) {
                        // nothing
                } elseif ( $title->isTalkPage() ) {
                        $titles[] = $title->getSubjectPage();