From 31fd25b43d05ac8fb7a3ab3d9d8181350ad8a6b0 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Wed, 3 Jun 2020 14:57:03 -0700 Subject: [PATCH] Move html-printtail template variable to SkinVector As part as our move away from VectorTemplate construct html-printtail using Skin methods. This copies the logic in BaseTemplate::getTrail Bug: T251212 Change-Id: I6a0c0b65f59fcf1f1550ec20d106f0143f681935 --- includes/SkinVector.php | 7 +++++++ includes/VectorTemplate.php | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 5ea4d79..3696b22 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -24,6 +24,7 @@ use MediaWiki\MediaWikiServices; use Vector\Constants; +use Wikimedia\WrappedString; /** * Skin subclass for Vector @@ -140,6 +141,12 @@ class SkinVector extends SkinTemplate { $title = $out->getTitle(); return [ + // HTML strings: + 'html-printtail' => WrappedString::join( "\n", [ + MWDebug::getDebugHTML( $this->getContext() ), + $this->bottomScripts(), + wfReportTime( $out->getCSP()->getNonce() ) + ] ) . '', 'html-sitenotice' => $this->getSiteNotice(), 'html-userlangattributes' => $this->prepareUserLanguageAttributes(), 'html-subtitle' => $this->prepareSubtitle(), diff --git a/includes/VectorTemplate.php b/includes/VectorTemplate.php index 1e2355c..93678de 100644 --- a/includes/VectorTemplate.php +++ b/includes/VectorTemplate.php @@ -164,8 +164,6 @@ class VectorTemplate extends BaseTemplate { 'html-printfooter' => $skin->printSource(), 'html-catlinks' => $skin->getCategories(), - // From BaseTemplate::getTrail (handles bottom JavaScript) - 'html-printtail' => $this->getTrail() . '', 'data-footer' => [ 'html-hook-vector-before-footer' => $htmlHookVectorBeforeFooter, 'array-footer-rows' => $this->getTemplateFooterRows(),