Jack Phoenix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/336714 )
Change subject: Fix a bunch of undefined indexes ...................................................................... Fix a bunch of undefined indexes Bug: T157619 Change-Id: Ibe79c1452dcf8975ced2244793add80eca6afb12 --- M SkinCologneBlue.php 1 file changed, 47 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/CologneBlue refs/changes/14/336714/1 diff --git a/SkinCologneBlue.php b/SkinCologneBlue.php index 355b616..d966fd2 100644 --- a/SkinCologneBlue.php +++ b/SkinCologneBlue.php @@ -194,7 +194,9 @@ $element[] = $this->processBottomLink( 'recentchangeslinked', $toolbox['recentchangeslinked'] ); $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] ); - $element[] = $this->processBottomLink( 'emailuser', $toolbox['emailuser'] ); + if ( isset( $toolbox['emailuser'] ) && $toolbox['emailuser'] ) { + $element[] = $this->processBottomLink( 'emailuser', $toolbox['emailuser'] ); + } $lines[] = $this->getSkin()->getLanguage()->pipeList( array_filter( $element ) ); @@ -206,22 +208,41 @@ $content_nav['actions']['delete'], 'deletethispage' ); - $element[] = $this->processBottomLink( - 'undelete', - $content_nav['actions']['undelete'], - 'undeletethispage' - ); + if ( + isset( $content_nav['actions']['undelete'] ) && + $content_nav['actions']['undelete'] + ) + { + $element[] = $this->processBottomLink( + 'undelete', + $content_nav['actions']['undelete'], + 'undeletethispage' + ); + } - $element[] = $this->processBottomLink( - 'protect', - $content_nav['actions']['protect'], - 'protectthispage' - ); - $element[] = $this->processBottomLink( - 'unprotect', - $content_nav['actions']['unprotect'], - 'unprotectthispage' - ); + if ( + isset( $content_nav['actions']['protect'] ) && + $content_nav['actions']['protect'] + ) + { + $element[] = $this->processBottomLink( + 'protect', + $content_nav['actions']['protect'], + 'protectthispage' + ); + } + + if ( + isset( $content_nav['actions']['unprotect'] ) && + $content_nav['actions']['unprotect'] + ) + { + $element[] = $this->processBottomLink( + 'unprotect', + $content_nav['actions']['unprotect'], + 'unprotectthispage' + ); + } $element[] = $this->processBottomLink( 'move', $content_nav['actions']['move'], 'movethispage' ); @@ -455,7 +476,7 @@ $personalUrls = $this->getPersonalTools(); foreach ( array( 'logout', 'createaccount', 'login' ) as $key ) { - if ( $personalUrls[$key] ) { + if ( isset( $personalUrls[$key] ) && $personalUrls[$key] ) { $s[] = $this->makeListItem( $key, $personalUrls[$key], array( 'tag' => 'span' ) ); } } @@ -486,11 +507,16 @@ ); $content_navigation['actions']['watch'] = null; $content_navigation['actions']['unwatch'] = null; + $qbEditLinks = [ 'edit' => $content_navigation['views']['edit'] ]; + if ( + isset( $content_navigation['views']['addsection'] ) && + $content_navigation['views']['addsection'] + ) + { + $qbEditLinks['addsection'] = $content_navigation['views']['addsection']; + } $qbedit = array_merge( - array( - 'edit' => $content_navigation['views']['edit'], - 'addsection' => $content_navigation['views']['addsection'], - ), + $qbEditLinks, $content_navigation['actions'] ); -- To view, visit https://gerrit.wikimedia.org/r/336714 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe79c1452dcf8975ced2244793add80eca6afb12 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/CologneBlue Gerrit-Branch: master Gerrit-Owner: Jack Phoenix <j...@countervandalism.net> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits