From 7c82f522276524c0105517b19a8a97b3a4e9c05d Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Sun, 31 May 2009 19:13:21 +0000 Subject: [PATCH] spacing tweaks to Vector.php --- skins/Vector.php | 178 +++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/skins/Vector.php b/skins/Vector.php index a28088b15a..508db9562d 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -16,11 +16,11 @@ if( !defined( 'MEDIAWIKI' ) ) * @ingroup Skins */ class SkinVector extends SkinTemplate { - + /* Functions */ - + /** - * Intializes output page and sets up skin-specific parameters + * Initializes output page and sets up skin-specific parameters * @param object $out Output page object to initialize */ public function initPage( OutputPage $out ) { @@ -29,18 +29,18 @@ class SkinVector extends SkinTemplate { $this->stylename = 'vector'; $this->template = 'VectorTemplate'; } - + /** * Defines CSS files to be included * @param object $out Output page to add styles to */ public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - + // Append to the default screen common & print styles... $out->addStyle( 'vector/main.css', 'screen' ); } - + /** * A structured array of edit links by default used for the tabs * @return array @@ -58,21 +58,21 @@ class SkinVector extends SkinTemplate { 'actions' => array(), 'variants' => array() ); - + // Detects parameters $action = $wgRequest->getVal( 'action', 'view' ); $section = $wgRequest->getVal( 'section' ); - + // Checks if page is some kind of content if( $this->iscontent ) { - + // Gets page objects for the related namespaces $subjectPage = $this->mTitle->getSubjectPage(); $talkPage = $this->mTitle->getTalkPage(); - + // Determines if this is a talk page $isTalk = $this->mTitle->isTalkPage(); - + // Generates XML IDs from namespace names $subjectId = $wgContLang->lc( $this->mTitle->getSubjectNsText() ); if ( $subjectId == '' ) { @@ -80,7 +80,7 @@ class SkinVector extends SkinTemplate { } $talkId = "{$subjectId}_talk"; $currentId = $isTalk ? $talkId : $subjectId; - + // Adds namespace links $links['namespaces'][$subjectId] = $this->tabAction( $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true @@ -88,7 +88,7 @@ class SkinVector extends SkinTemplate { $links['namespaces'][$talkId] = $this->tabAction( $talkPage, 'talk', $isTalk, '', true ); - + // Adds view view link if ( $this->mTitle->exists() ) { $links['views']['view'] = $this->tabAction( @@ -96,9 +96,9 @@ class SkinVector extends SkinTemplate { 'view', ( $action == 'view' ), '', true ); } - + wfProfileIn( __METHOD__ . '-edit' ); - + // Checks if user can... if ( // edit the current page @@ -112,7 +112,7 @@ class SkinVector extends SkinTemplate { ) { // Builds CSS class for talk page links $isTalkClass = $isTalk ? ' istalk' : ''; - + // Determines if we're in edit mode $selected = ( ( $action == 'edit' || $action == 'submit' ) && @@ -145,7 +145,7 @@ class SkinVector extends SkinTemplate { } elseif ( $this->mTitle->isKnown() ) { // Adds view source view link $links['views']['viewsource'] = array( - 'class' => ( $action == 'edit') ? 'selected' : false, + 'class' => ( $action == 'edit' ) ? 'selected' : false, 'text' => wfMsg( 'viewsource' ), 'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() ) @@ -154,7 +154,7 @@ class SkinVector extends SkinTemplate { wfProfileOut( __METHOD__ . '-edit' ); wfProfileIn( __METHOD__ . '-live' ); - + // Checks if the page exists if ( $this->mTitle->exists() ) { // Adds history view link @@ -164,7 +164,7 @@ class SkinVector extends SkinTemplate { 'href' => $this->mTitle->getLocalUrl( 'action=history' ), 'rel' => 'archives', ); - + if( $wgUser->isAllowed( 'delete' ) ) { $links['actions']['delete'] = array( 'class' => ($action == 'delete') ? 'selected' : false, @@ -183,7 +183,7 @@ class SkinVector extends SkinTemplate { 'href' => $moveTitle->getLocalUrl() ); } - + if ( $this->mTitle->getNamespace() !== NS_MEDIAWIKI && $wgUser->isAllowed( 'protect' ) @@ -262,7 +262,7 @@ class SkinVector extends SkinTemplate { // Adds watch action link $links['actions']['watch'] = array( 'class' => - ( $action == 'watch' or $action == 'unwatch') ? + ( $action == 'watch' or $action == 'unwatch' ) ? 'selected' : false, 'text' => wfMsg( 'watch' ), 'href' => $this->mTitle->getLocalUrl( 'action=watch' ) @@ -278,12 +278,12 @@ class SkinVector extends SkinTemplate { ); } } - + // If it's not content, it's got to be a special page } else { $links['namespaces']['special'] = array( 'class' => 'selected', - 'text' => wfMsg('nstab-special'), + 'text' => wfMsg( 'nstab-special' ), 'href' => $wgRequest->getRequestURL() ); } @@ -306,7 +306,7 @@ class SkinVector extends SkinTemplate { } // Appends variant link $links['variants'][$vcount] = array( - 'class' => ( $code == $preferred )? 'selected' : false, + 'class' => ( $code == $preferred ) ? 'selected' : false, 'text' => $varname, 'href' => $this->mTitle->getLocalURL( '', $code ) ); @@ -315,7 +315,7 @@ class SkinVector extends SkinTemplate { } wfProfileOut( __METHOD__ ); - + return $links; } } @@ -325,29 +325,29 @@ class SkinVector extends SkinTemplate { * @ingroup Skins */ class VectorTemplate extends QuickTemplate { - + /* Members */ - + /** * @var Cached skin object */ var $skin; - + /* Functions */ - + /** * Outputs the entire contents of the XHTML page */ public function execute() { global $wgRequest, $wgUseTwoButtonsSearchForm; - + $this->skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); - + // Suppress warnings to prevent notices about missing indexes in // $this->data (is this really the best way to handle this?) wfSuppressWarnings(); - + // Build additional attributes for navigation urls $nav = $this->skin->buildNavigationUrls(); foreach ( $nav as $section => $links ) { @@ -379,7 +379,7 @@ class VectorTemplate extends QuickTemplate { $this->data['view_urls'] = $nav['views']; $this->data['action_urls'] = $nav['actions']; $this->data['variant_urls'] = $nav['variants']; - + // Build additional attributes for personal_urls foreach ( $this->data['personal_urls'] as $key => $item) { $this->data['personal_urls'][$key]['attributes'] = @@ -391,7 +391,7 @@ class VectorTemplate extends QuickTemplate { $this->data['personal_urls'][$key]['key'] = $this->skin->tooltipAndAccesskey('pt-'.$key); } - + // Generate additional footer links $footerlinks = array( 'info' => array( @@ -408,7 +408,7 @@ class VectorTemplate extends QuickTemplate { 'disclaimer', ), ); - + // Build list of valid footer links $validFooterLinks = array(); foreach( $footerlinks as $category => $links ) { @@ -419,7 +419,7 @@ class VectorTemplate extends QuickTemplate { } } } - + // Begin content output ?> data['xhtmlnamespaces'] as $tag => $ns): ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> @@ -524,7 +524,7 @@ class VectorTemplate extends QuickTemplate { data['catlinks']) { $this->html('catlinks'); } ?> - data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> + data['dataAfterContent']) { $this->html('dataAfterContent'); } ?>
@@ -605,16 +605,16 @@ class VectorTemplate extends QuickTemplate {