X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FCoreParserFunctions.php;h=3d262628be4eccf16a9cfdee7f4ef4325c9bf05c;hb=1d7a1bf8bddf0908e4f572c82268733f63126a13;hp=e34d10b6a398b399a8a881a2e632cbd15b742284;hpb=cbac334f116c6546c422a67ce99d2a56eb792d30;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index e34d10b6a3..3d262628be 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -174,7 +174,6 @@ class CoreParserFunctions { $magicWords = new MagicWordArray( [ 'url_path', 'url_query', 'url_wiki' ] ); } switch ( $magicWords->matchStartToEnd( $arg ) ) { - // Encode as though it's a wiki page, '_' for ' '. case 'url_wiki': $func = 'wfUrlencode'; @@ -583,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() ); @@ -633,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() ); @@ -689,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() );