From 82e5344ead4e09b4bd57b6553060404a78ca07c1 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Sun, 17 Nov 2024 00:43:06 +0530 Subject: [PATCH] Avoid recording template link to special page in getContent() Replace Title::isExternal check with !Title::canExist(). The latter subsumes the former. No content can be retrieved if the page cannot exist in the database (such as special pages), and hence the templatelinks row is unnecessary. Bug: T377530 Change-Id: I44775980c4619f5ef719c6076976dd21095ba6e2 --- includes/Engines/LuaCommon/TitleLibrary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Engines/LuaCommon/TitleLibrary.php b/includes/Engines/LuaCommon/TitleLibrary.php index 5c4d8b16..5b34b45b 100644 --- a/includes/Engines/LuaCommon/TitleLibrary.php +++ b/includes/Engines/LuaCommon/TitleLibrary.php @@ -291,7 +291,7 @@ class TitleLibrary extends LibraryBase { */ private function getContentInternal( $text ) { $title = Title::newFromText( $text ); - if ( !$title || $title->isExternal() ) { + if ( !$title || !$title->canExist() ) { return null; }