Avoid using deprecated Title::canTalk()
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index f0f1f5f..3d26262 100644 (file)
@@ -582,14 +582,14 @@ class CoreParserFunctions {
        }
        public static function talkspace( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return str_replace( '_', ' ', $t->getTalkNsText() );
        }
        public static function talkspacee( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return wfUrlencode( $t->getTalkNsText() );
@@ -632,14 +632,14 @@ class CoreParserFunctions {
        }
        public static function fullpagename( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return wfEscapeWikiText( $t->getPrefixedText() );
        }
        public static function fullpagenamee( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return wfEscapeWikiText( $t->getPrefixedURL() );
@@ -688,14 +688,14 @@ class CoreParserFunctions {
        }
        public static function talkpagename( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return wfEscapeWikiText( $t->getTalkPage()->getPrefixedText() );
        }
        public static function talkpagenamee( $parser, $title = null ) {
                $t = Title::newFromText( $title );
-               if ( is_null( $t ) || !$t->canTalk() ) {
+               if ( is_null( $t ) || !$t->canHaveTalkPage() ) {
                        return '';
                }
                return wfEscapeWikiText( $t->getTalkPage()->getPrefixedURL() );