Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336923 )

Change subject: Revert "Fix remaining undefined index notices"
......................................................................

Revert "Fix remaining undefined index notices"

This reverts commit 3249e6d10b8c3e673a2dcec6d5dc3a1749107f55.

Change-Id: I7ff254962b7b1bb1f0cb416e043d16ec54128d44
---
M SkinCologneBlue.php
1 file changed, 30 insertions(+), 78 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/CologneBlue 
refs/changes/23/336923/1

diff --git a/SkinCologneBlue.php b/SkinCologneBlue.php
index 9b2ba42..ece6172 100644
--- a/SkinCologneBlue.php
+++ b/SkinCologneBlue.php
@@ -168,38 +168,23 @@
                        $element = array();
 
                        $editLinkMessage = 
$this->getSkin()->getTitle()->exists() ? 'editthispage' : 'create-this-page';
+                       $element[] = $this->processBottomLink( 'edit', 
$content_nav['views']['edit'], $editLinkMessage );
+                       $element[] = $this->processBottomLink(
+                               'viewsource',
+                               $content_nav['views']['viewsource'],
+                               'viewsource'
+                       );
 
-                       if ( isset( $content_nav['views']['edit'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'edit',
-                                       $content_nav['views']['edit'],
-                                       $editLinkMessage
-                               );
-                       }
-
-                       if ( isset( $content_nav['views']['viewsource'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'viewsource',
-                                       $content_nav['views']['viewsource'],
-                                       'viewsource'
-                               );
-                       }
-
-                       if ( isset( $content_nav['actions']['watch'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'watch',
-                                       $content_nav['actions']['watch'],
-                                       'watchthispage'
-                               );
-                       }
-
-                       if ( isset( $content_nav['actions']['unwatch'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'unwatch',
-                                       $content_nav['actions']['unwatch'],
-                                       'unwatchthispage'
-                               );
-                       }
+                       $element[] = $this->processBottomLink(
+                               'watch',
+                               $content_nav['actions']['watch'],
+                               'watchthispage'
+                       );
+                       $element[] = $this->processBottomLink(
+                               'unwatch',
+                               $content_nav['actions']['unwatch'],
+                               'unwatchthispage'
+                       );
 
                        $element[] = $this->talkLink();
 
@@ -208,10 +193,7 @@
                        $element[] = $this->processBottomLink( 'whatlinkshere', 
$toolbox['whatlinkshere'] );
                        $element[] = $this->processBottomLink( 
'recentchangeslinked', $toolbox['recentchangeslinked'] );
 
-                       if ( isset( $toolbox['contributions'] ) ) {
-                               $element[] = $this->processBottomLink( 
'contributions', $toolbox['contributions'] );
-                       }
-
+                       $element[] = $this->processBottomLink( 'contributions', 
$toolbox['contributions'] );
                        if ( isset( $toolbox['emailuser'] ) ) {
                                $element[] = $this->processBottomLink( 
'emailuser', $toolbox['emailuser'] );
                        }
@@ -221,14 +203,11 @@
                        // Second row. Privileged actions.
                        $element = array();
 
-                       if ( isset( $content_nav['actions']['delete'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'delete',
-                                       $content_nav['actions']['delete'],
-                                       'deletethispage'
-                               );
-                       }
-
+                       $element[] = $this->processBottomLink(
+                               'delete',
+                               $content_nav['actions']['delete'],
+                               'deletethispage'
+                       );
                        if ( isset( $content_nav['actions']['undelete'] ) ) {
                                $element[] = $this->processBottomLink(
                                        'undelete',
@@ -253,13 +232,7 @@
                                );
                        }
 
-                       if ( isset( $content_nav['actions']['move'] ) ) {
-                               $element[] = $this->processBottomLink(
-                                       'move',
-                                       $content_nav['actions']['move'],
-                                       'movethispage'
-                               );
-                       }
+                       $element[] = $this->processBottomLink( 'move', 
$content_nav['actions']['move'], 'movethispage' );
 
                        $lines[] = $this->getSkin()->getLanguage()->pipeList( 
array_filter( $element ) );
 
@@ -512,38 +485,20 @@
                // $...['namespaces']['talk'] together serve the same purpose. 
We also
                // don't use $...['variants'], these are displayed in the top 
menu.
                $content_navigation = $this->data['content_navigation'];
-
-               $content_navigation_overrides = array();
-
-               foreach (
-                       array(
-                               array('views', 'history'),
-                               array('actions', 'watch'),
-                               array('actions', 'unwatch'),
-                       ) as $key ) {
-                       if ( isset( $content_navigation[$key[0]][$key[1]] ) ) {
-                               $content_navigation_overrides[$key[1]] = 
$content_navigation[$key[0]][$key[1]];
-                       } else {
-                               $content_navigation_overrides[$key[1]] = 
array();
-                       }
-               }
-
                $qbpageoptions = array_merge(
                        $content_navigation['namespaces'],
-                       $content_navigation_overrides
+                       array(
+                               'history' => 
$content_navigation['views']['history'],
+                               'watch' => 
$content_navigation['actions']['watch'],
+                               'unwatch' => 
$content_navigation['actions']['unwatch'],
+                       )
                );
-
                $content_navigation['actions']['watch'] = null;
                $content_navigation['actions']['unwatch'] = null;
-
-               if ( isset( $content_navigation['views']['edit'] ) ) {
-                       $qbEditLinks = [ 'edit' => 
$content_navigation['views']['edit'] ];
-               }
-
+               $qbEditLinks = [ 'edit' => $content_navigation['views']['edit'] 
];
                if ( isset( $content_navigation['views']['addsection'] ) ) {
                        $qbEditLinks['addsection'] = 
$content_navigation['views']['addsection'];
                }
-
                $qbedit = array_merge(
                        $qbEditLinks,
                        $content_navigation['actions']
@@ -628,10 +583,7 @@
                        $heading = (string)$heading;
 
                        $portletId = Sanitizer::escapeId( "p-$heading" );
-                       $headingMsg = $heading;
-                       if ( isset( $idToMessage[$heading] ) ) {
-                               $headingMsg = wfMessage( $idToMessage[$heading] 
? $idToMessage[$heading] : $heading );
-                       }
+                       $headingMsg = wfMessage( $idToMessage[$heading] ? 
$idToMessage[$heading] : $heading );
                        $headingHTML = "<h3>";
                        $headingHTML .= $headingMsg->exists()
                                ? $headingMsg->escaped()

-- 
To view, visit https://gerrit.wikimedia.org/r/336923
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ff254962b7b1bb1f0cb416e043d16ec54128d44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/CologneBlue
Gerrit-Branch: wmf/1.29.0-wmf.11
Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to