aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SkinTemplate.php
diff options
context:
space:
mode:
authorDaniel Friesen <dantman@users.mediawiki.org>2011-11-14 21:57:36 +0000
committerDaniel Friesen <dantman@users.mediawiki.org>2011-11-14 21:57:36 +0000
commit8ae1847dc87706e17a344520b8efd4d032686540 (patch)
treeffce7a7687b3420f97ce56b09278be910212cd40 /includes/SkinTemplate.php
parent6d6c43ee04843d1da62a8daedbc466ce7d312120 (diff)
downloadmediawikicore-8ae1847dc87706e17a344520b8efd4d032686540.tar.gz
mediawikicore-8ae1847dc87706e17a344520b8efd4d032686540.zip
Add isset tests to stuff inside BaseTemplate::getToolbox.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103047
Diffstat (limited to 'includes/SkinTemplate.php')
-rw-r--r--includes/SkinTemplate.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 8015523b68ea..7f20b66a2dfb 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -1411,20 +1411,20 @@ abstract class BaseTemplate extends QuickTemplate {
wfProfileIn( __METHOD__ );
$toolbox = array();
- if ( $this->data['nav_urls']['whatlinkshere'] ) {
+ if ( isset( $this->data['nav_urls']['whatlinkshere'] ) && $this->data['nav_urls']['whatlinkshere'] ) {
$toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
$toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
}
- if ( $this->data['nav_urls']['recentchangeslinked'] ) {
+ if ( isset( $this->data['nav_urls']['recentchangeslinked'] ) && $this->data['nav_urls']['recentchangeslinked'] ) {
$toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
$toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
$toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
}
- if ( $this->data['nav_urls']['trackbacklink'] ) {
+ if ( isset( $this->data['nav_urls']['trackbacklink'] ) && $this->data['nav_urls']['trackbacklink'] ) {
$toolbox['trackbacklink'] = $this->data['nav_urls']['trackbacklink'];
$toolbox['trackbacklink']['id'] = 't-trackbacklink';
}
- if ( $this->data['feeds'] ) {
+ if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
$toolbox['feeds']['id'] = 'feedlinks';
$toolbox['feeds']['links'] = array();
foreach ( $this->data['feeds'] as $key => $feed ) {
@@ -1436,17 +1436,17 @@ abstract class BaseTemplate extends QuickTemplate {
}
}
foreach ( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ) {
- if ( $this->data['nav_urls'][$special] ) {
+ if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
$toolbox[$special] = $this->data['nav_urls'][$special];
$toolbox[$special]['id'] = "t-$special";
}
}
- if ( $this->data['nav_urls']['print'] ) {
+ if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
$toolbox['print'] = $this->data['nav_urls']['print'];
$toolbox['print']['rel'] = 'alternate';
$toolbox['print']['msg'] = 'printableversion';
}
- if( $this->data['nav_urls']['permalink'] ) {
+ if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
$toolbox['permalink'] = $this->data['nav_urls']['permalink'];
if( $toolbox['permalink']['href'] === '' ) {
unset( $toolbox['permalink']['href'] );