diff --git a/LibertyTemplate.php b/LibertyTemplate.php index 8584df7..71cacc5 100644 --- a/LibertyTemplate.php +++ b/LibertyTemplate.php @@ -883,13 +883,13 @@ protected function parseNavbar() { $skin = $this->getSkin(); $userName = $skin->getUser()->getName(); $userLang = $skin->getLanguage()->mCode; - $globalData = ContentHandler::getContentText( $this->getContentOfTitle( + $globalData = $this->getContentText( $this->getContentOfTitle( Title::newFromText( 'Liberty-Navbar', NS_MEDIAWIKI ) ) ); - $globalLangData = ContentHandler::getContentText( $this->getContentOfTitle( + $globalLangData = $this->getContentText( $this->getContentOfTitle( Title::newFromText( 'Liberty-Navbar/' . $userLang, NS_MEDIAWIKI ) ) ); - $userData = ContentHandler::getContentText( $this->getContentOfTitle( + $userData = $this->getContentText( $this->getContentOfTitle( Title::newFromText( $userName . '/Liberty-Navbar', NS_USER ) ) ); if ( !empty( $userData ) ) { @@ -1241,6 +1241,25 @@ protected function buildAd( $position ) { getText(); + } + + return null; + } + private function getContentOfTitle( Title $title ): ?Content { $page = null;