fix: Fatal error

This commit is contained in:
Hannes 2021-01-28 21:09:52 +01:00
parent f4108050cf
commit 97850860b7
No known key found for this signature in database
GPG key ID: 371029119C5F0D51
5 changed files with 12 additions and 11 deletions

View file

@ -35,7 +35,7 @@ final class Footer extends Partial {
* @return array for use in Mustache template describing the footer elements. * @return array for use in Mustache template describing the footer elements.
*/ */
public function getFooterData(): array { public function getFooterData(): array {
$footerLinks = $this->skin->getFooterLinks(); $footerLinks = $this->skin->getFooterLinksPublic();
$lastMod = null; $lastMod = null;
// Get last modified message // Get last modified message
@ -119,7 +119,7 @@ final class Footer extends Partial {
*/ */
private function getFooterIcons() { private function getFooterIcons() {
// If footer icons are enabled append to the end of the rows // If footer icons are enabled append to the end of the rows
$footerIcons = $this->skin->getFooterIcons(); $footerIcons = $this->skin->getFooterIconsPublic();
if ( empty( $footerIcons ) ) { if ( empty( $footerIcons ) ) {
return []; return [];
} }

View file

@ -49,7 +49,7 @@ final class Header extends Partial {
*/ */
public function buildPersonalMenu(): array { public function buildPersonalMenu(): array {
$personalTools = $this->skin->getPersonalToolsForMakeListItem( $personalTools = $this->skin->getPersonalToolsForMakeListItem(
$this->skin->buildPersonalUrls() $this->skin->buildPersonalUrlsPublic()
); );
// Move the Echo badges and ULS out of default list // Move the Echo badges and ULS out of default list
@ -84,7 +84,7 @@ final class Header extends Partial {
*/ */
public function getExtratools(): array { public function getExtratools(): array {
$personalTools = $this->skin->getPersonalToolsForMakeListItem( $personalTools = $this->skin->getPersonalToolsForMakeListItem(
$this->skin->buildPersonalUrls() $this->skin->buildPersonalUrlsPublic()
); );
// Create the Echo badges and ULS // Create the Echo badges and ULS

View file

@ -33,7 +33,7 @@ final class PageLinks extends Partial {
* @return array html * @return array html
*/ */
public function buildPageLinks() : array { public function buildPageLinks() : array {
$contentNavigation = $this->skin->buildContentNavigationUrls(); $contentNavigation = $this->skin->buildContentNavigationUrlsPublic();
$namespaceshtml = $this->skin->getMenuData( 'namespaces', $contentNavigation[ 'namespaces' ] ?? [] ); $namespaceshtml = $this->skin->getMenuData( 'namespaces', $contentNavigation[ 'namespaces' ] ?? [] );
$variantshtml = $this->skin->getMenuData( 'variants', $contentNavigation[ 'variants' ] ?? [] ); $variantshtml = $this->skin->getMenuData( 'variants', $contentNavigation[ 'variants' ] ?? [] );

View file

@ -25,6 +25,7 @@ declare( strict_types=1 );
namespace Citizen\Partials; namespace Citizen\Partials;
use Exception;
use MediaWiki\MediaWikiServices; use MediaWiki\MediaWikiServices;
final class PageTools extends Partial { final class PageTools extends Partial {
@ -42,7 +43,7 @@ final class PageTools extends Partial {
*/ */
public function buildPageTools(): array { public function buildPageTools(): array {
$condition = $this->getConfigValue( 'CitizenShowPageTools' ); $condition = $this->getConfigValue( 'CitizenShowPageTools' );
$contentNavigation = $this->skin->buildContentNavigationUrls(); $contentNavigation = $this->skin->buildContentNavigationUrlsPublic();
$portals = $this->skin->buildSidebar(); $portals = $this->skin->buildSidebar();
$props = []; $props = [];
@ -57,7 +58,7 @@ final class PageTools extends Partial {
try { try {
$condition = MediaWikiServices::getInstance()->getPermissionManager()->userCan( $condition = MediaWikiServices::getInstance()->getPermissionManager()->userCan(
$permission, $this->skin->getUser(), $this->skin->getTitle() ); $permission, $this->skin->getUser(), $this->skin->getTitle() );
} catch ( \Exception $e ) { } catch ( Exception $e ) {
$condition = false; $condition = false;
} }
} }

View file

@ -172,7 +172,7 @@ class SkinCitizen extends SkinMustache {
* *
* @return array * @return array
*/ */
final public function buildPersonalUrls() { final public function buildPersonalUrlsPublic() {
return parent::buildPersonalUrls(); return parent::buildPersonalUrls();
} }
@ -181,7 +181,7 @@ class SkinCitizen extends SkinMustache {
* *
* @return array * @return array
*/ */
final public function getFooterLinks() { final public function getFooterLinksPublic() {
return parent::getFooterLinks(); return parent::getFooterLinks();
} }
@ -190,7 +190,7 @@ class SkinCitizen extends SkinMustache {
* *
* @return array * @return array
*/ */
final public function getFooterIcons() { final public function getFooterIconsPublic() {
return parent::getFooterIcons(); return parent::getFooterIcons();
} }
@ -199,7 +199,7 @@ class SkinCitizen extends SkinMustache {
* *
* @return array * @return array
*/ */
final public function buildContentNavigationUrls() { final public function buildContentNavigationUrlsPublic() {
return parent::buildContentNavigationUrls(); return parent::buildContentNavigationUrls();
} }