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

View file

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

View file

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

View file

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

View file

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