Fix getting title in replaceTagParameters

there's no mTitle in the Article class as it's been moved to WikiPage I think?

Anyways we call getPage() instead and also call getTitle().
This commit is contained in:
paladox 2024-11-23 21:05:11 +00:00 committed by GitHub
parent 26b8978260
commit b1bb7a8ee1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -770,7 +770,7 @@ class Lister {
$imageUrl = $this->parseImageUrlWithPath( $article );
$pagename = $article->mTitle->getPrefixedText();
$pagename = $article->getPage()->getTitle()->getPrefixedText();
if ( $this->getEscapeLinks() && ( $article->mNamespace == NS_CATEGORY || $article->mNamespace == NS_FILE ) ) {
// links to categories or images need an additional ":"
$pagename = ':' . $pagename;
@ -783,7 +783,7 @@ class Lister {
$tag = str_replace( '%EXTERNALLINK%', $article->mExternalLink, $tag );
$tag = str_replace( '%EDITSUMMARY%', $article->mComment, $tag );
$title = $article->mTitle->getText();
$title = $article->getPage()->getTitle()->getText();
$replaceInTitle = $this->getParameters()->getParameter( 'replaceintitle' );
if ( is_array( $replaceInTitle ) && count( $replaceInTitle ) === 2 ) {