[MediaWiki-commits] [Gerrit] mediawiki...CologneBlue[wmf/1.29.0-wmf.11]: Fix remaining undefined index notices
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/336917 ) Change subject: Fix remaining undefined index notices .. Fix remaining undefined index notices Since the removal of error supression the notices of undefined indecies in this skin have been many. This should continue the work done previously to squelch remaining undefined index notices. Bug: T157619 Change-Id: I9d098389285d8a8d7927e6bbfb2e0b42844a7dd1 (cherry picked from commit 96b0ddfc5941187cec883c6e6597139ab8bc73dc) --- M SkinCologneBlue.php 1 file changed, 78 insertions(+), 30 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/SkinCologneBlue.php b/SkinCologneBlue.php index ece6172..9b2ba42 100644 --- a/SkinCologneBlue.php +++ b/SkinCologneBlue.php @@ -168,23 +168,38 @@ $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' - ); - $element[] = $this->processBottomLink( - 'watch', - $content_nav['actions']['watch'], - 'watchthispage' - ); - $element[] = $this->processBottomLink( - 'unwatch', - $content_nav['actions']['unwatch'], - 'unwatchthispage' - ); + 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->talkLink(); @@ -193,7 +208,10 @@ $element[] = $this->processBottomLink( 'whatlinkshere', $toolbox['whatlinkshere'] ); $element[] = $this->processBottomLink( 'recentchangeslinked', $toolbox['recentchangeslinked'] ); - $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] ); + if ( isset( $toolbox['contributions'] ) ) { + $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] ); + } + if ( isset( $toolbox['emailuser'] ) ) { $element[] = $this->processBottomLink( 'emailuser', $toolbox['emailuser'] ); } @@ -203,11 +221,14 @@ // Second row. Privileged actions. $element = array(); - $element[] = $this->processBottomLink( - 'delete', - $content_nav['actions']['delete'], - 'deletethispage' - ); + if ( isset( $content_nav['actions']['delete'] ) ) { + $element[] = $this->processBottomLink( + 'delete', + $content_nav['actions']['delete'], +
[MediaWiki-commits] [Gerrit] mediawiki...CologneBlue[wmf/1.29.0-wmf.11]: Fix remaining undefined index notices
Thcipriani has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/336917 ) Change subject: Fix remaining undefined index notices .. Fix remaining undefined index notices Since the removal of error supression the notices of undefined indecies in this skin have been many. This should continue the work done previously to squelch remaining undefined index notices. Bug: T157619 Change-Id: I9d098389285d8a8d7927e6bbfb2e0b42844a7dd1 (cherry picked from commit 96b0ddfc5941187cec883c6e6597139ab8bc73dc) --- M SkinCologneBlue.php 1 file changed, 78 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/CologneBlue refs/changes/17/336917/1 diff --git a/SkinCologneBlue.php b/SkinCologneBlue.php index ece6172..9b2ba42 100644 --- a/SkinCologneBlue.php +++ b/SkinCologneBlue.php @@ -168,23 +168,38 @@ $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' - ); - $element[] = $this->processBottomLink( - 'watch', - $content_nav['actions']['watch'], - 'watchthispage' - ); - $element[] = $this->processBottomLink( - 'unwatch', - $content_nav['actions']['unwatch'], - 'unwatchthispage' - ); + 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->talkLink(); @@ -193,7 +208,10 @@ $element[] = $this->processBottomLink( 'whatlinkshere', $toolbox['whatlinkshere'] ); $element[] = $this->processBottomLink( 'recentchangeslinked', $toolbox['recentchangeslinked'] ); - $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] ); + if ( isset( $toolbox['contributions'] ) ) { + $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] ); + } + if ( isset( $toolbox['emailuser'] ) ) { $element[] = $this->processBottomLink( 'emailuser', $toolbox['emailuser'] ); } @@ -203,11 +221,14 @@ // Second row. Privileged actions. $element = array(); - $element[] = $this->processBottomLink( - 'delete', - $content_nav['actions']['delete'], - 'deletethispage' - ); + if ( isset( $content_nav['actions']['delete'] ) ) { + $element[] = $this->processBottomLink( + 'delete', +