From bca7cfb5e5c46ea015b31c8fb646c49f11523e5c Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Sat, 14 May 2011 15:14:03 +0000 Subject: [PATCH] Vector.php: coding style --- skins/Vector.php | 98 +++++++++++++++++++++++++----------------------- 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/skins/Vector.php b/skins/Vector.php index 6b72f1ff50..8b00521c44 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -83,22 +83,22 @@ class VectorTemplate extends BaseTemplate { if ( $wgVectorUseIconWatch ) { $mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch'; - if ( isset($nav['actions'][$mode]) ) { + if ( isset( $nav['actions'][$mode] ) ) { $nav['views'][$mode] = $nav['actions'][$mode]; - $nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' '); + $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' ); $nav['views'][$mode]['primary'] = true; - unset($nav['actions'][$mode]); + unset( $nav['actions'][$mode] ); } } $xmlID = ''; foreach ( $nav as $section => $links ) { foreach ( $links as $key => $link ) { - if ( $section == "views" && !(isset($link["primary"]) && $link["primary"]) ) { - $link['class'] = rtrim('collapsible ' . $link['class'], ' '); + if ( $section == 'views' && !( isset( $link['primary'] ) && $link['primary'] ) ) { + $link['class'] = rtrim( 'collapsible ' . $link['class'], ' ' ); } - $xmlID = isset($link["id"]) ? $link["id"] : 'ca-' . $xmlID; + $xmlID = isset( $link['id'] ) ? $link['id'] : 'ca-' . $xmlID; $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; if ( $link['class'] ) { @@ -106,7 +106,7 @@ class VectorTemplate extends BaseTemplate { ' class="' . htmlspecialchars( $link['class'] ) . '"'; unset( $nav[$section][$key]['class'] ); } - if ( isset($link['tooltiponly']) && $link['tooltiponly'] ) { + if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) { $nav[$section][$key]['key'] = Linker::tooltip( $xmlID ); } else { @@ -135,9 +135,9 @@ class VectorTemplate extends BaseTemplate {
-
html('specialpageattributes') ?>> +
html( 'specialpageattributes' ) ?>> - + data['sitenotice'] ): ?>
html( 'sitenotice' ) ?>
@@ -154,14 +154,14 @@ class VectorTemplate extends BaseTemplate { -
html('userlangattributes') ?>>html( 'subtitle' ) ?>
+
html( 'userlangattributes' ) ?>>html( 'subtitle' ) ?>
data['undelete'] ): ?>
html( 'undelete' ) ?>
- data['newtalk'] ): ?> + data['newtalk'] ): ?>
html( 'newtalk' ) ?>
@@ -185,7 +185,7 @@ class VectorTemplate extends BaseTemplate { - html('debughtml'); ?> + html( 'debughtml' ); ?> data['catlinks'] ): ?> @@ -222,7 +222,7 @@ class VectorTemplate extends BaseTemplate {
-