jenkins-bot has submitted this change and it was merged.
Change subject: Record a link to pages looked up by ID
......................................................................
Record a link to pages looked up by ID
If mw.title.new is called with a page ID, record a link to it.
Change-Id: Idc5327d21b780ff8242367878102034413663643
---
M engines/LuaCommon/TitleLibrary.php
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Anomie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/engines/LuaCommon/TitleLibrary.php
b/engines/LuaCommon/TitleLibrary.php
index 983475f..635683b 100644
--- a/engines/LuaCommon/TitleLibrary.php
+++ b/engines/LuaCommon/TitleLibrary.php
@@ -150,6 +150,11 @@
$this->incrementExpensiveFunctionCount();
$title = Title::newFromID( $text_or_id );
$this->idCache[$text_or_id] = $title;
+
+ // Record a link
+ if ( $this->getParser() && $title &&
!$title->equals( $this->getTitle() ) ) {
+
$this->getParser()->getOutput()->addLink( $title );
+ }
}
if ( $title ) {
$this->titleCache[$title->getPrefixedDBkey()] =
$title;
--
To view, visit https://gerrit.wikimedia.org/r/179196
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc5327d21b780ff8242367878102034413663643
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits