mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-23 15:56:55 +00:00
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
This commit is contained in:
parent
8a756e79ca
commit
82e5344ead
|
@ -291,7 +291,7 @@ class TitleLibrary extends LibraryBase {
|
||||||
*/
|
*/
|
||||||
private function getContentInternal( $text ) {
|
private function getContentInternal( $text ) {
|
||||||
$title = Title::newFromText( $text );
|
$title = Title::newFromText( $text );
|
||||||
if ( !$title || $title->isExternal() ) {
|
if ( !$title || !$title->canExist() ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue