From 954929e27e4a1c48296eb5f8f97a7f65b847da8b Mon Sep 17 00:00:00 2001 From: bwang Date: Fri, 11 Jun 2021 10:40:20 -0500 Subject: [PATCH] Use Skin:getAfterPortlet instead of deprecated BaseTemplate:getAfterPortlet Additional change: * Add .DS_Store to gitignore Change-Id: I15ed3c820823782d28f11f3724d56736db0ca3e0 --- .gitignore | 1 + includes/TimelessTemplate.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3484c6c..8b02888 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /vendor /composer.lock /.eslintcache +.DS_Store diff --git a/includes/TimelessTemplate.php b/includes/TimelessTemplate.php index 63d67c5..1302b51 100644 --- a/includes/TimelessTemplate.php +++ b/includes/TimelessTemplate.php @@ -283,7 +283,16 @@ class TimelessTemplate extends BaseTemplate { $bodyDivOptions['id'] = $options['body-id']; } - $afterPortlet = $this->getAfterPortlet( $name ); + $afterPortlet = ''; + $content = $this->getSkin()->getAfterPortlet( $name ); + if ( $content !== '' ) { + $afterPortlet = Html::rawElement( + 'div', + [ 'class' => [ 'after-portlet', 'after-portlet-' . $name ] ], + $content + ); + } + if ( $name === 'lang' ) { $this->afterLangPortlet = $afterPortlet; }