@@ -1,14 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( function_exists( 'wfLoadSkin' ) ) { |
|
| 4 | - wfLoadSkin( 'pivot' ); |
|
| 3 | +if (function_exists('wfLoadSkin')) { |
|
| 4 | + wfLoadSkin('pivot'); |
|
| 5 | 5 | // Keep i18n globals so mergeMessageFileList.php doesn't break |
| 6 | - $wgMessagesDirs['pivot'] = __DIR__ . '/i18n'; |
|
| 6 | + $wgMessagesDirs['pivot'] = __DIR__.'/i18n'; |
|
| 7 | 7 | /* wfWarn( |
| 8 | 8 | 'Deprecated PHP entry point used for Pivot skin. Please use wfLoadSkin instead, ' . |
| 9 | 9 | 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' |
| 10 | 10 | ); */ |
| 11 | 11 | return true; |
| 12 | 12 | } else { |
| 13 | - die( 'This version of the Pivot skin requires MediaWiki 1.25+' ); |
|
| 13 | + die('This version of the Pivot skin requires MediaWiki 1.25+'); |
|
| 14 | 14 | } |
| 15 | 15 | \ No newline at end of file |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $this->html('headelement'); |
| 67 | 67 | switch ($wgPivotFeatures['usePivotTabs']) { |
| 68 | 68 | case true: |
| 69 | - ob_start(); |
|
| 69 | + ob_start(); |
|
| 70 | 70 | $this->html('bodytext'); |
| 71 | 71 | $out = ob_get_contents(); |
| 72 | 72 | ob_end_clean(); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'useAddThisFollow' => '' |
| 31 | 31 | ); |
| 32 | 32 | foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) { |
| 33 | - if ( !isset($wgPivotFeatures[$fgOption]) ) { |
|
| 33 | + if ( ! isset($wgPivotFeatures[$fgOption])) { |
|
| 34 | 34 | $wgPivotFeatures[$fgOption] = $fgOptionValue; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -138,11 +138,11 @@ discard block |
||
| 138 | 138 | <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> |
| 139 | 139 | <?php else: ?> |
| 140 | 140 | <?php if (isset($this->data['personal_urls']['anonlogin'])): ?> |
| 141 | - <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
| 141 | + <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage('login')->text() ?></a></li> |
|
| 142 | 142 | <?php elseif (isset($this->data['personal_urls']['login'])): ?> |
| 143 | - <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
| 143 | + <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage('login')->text() ?></a></li> |
|
| 144 | 144 | <?php else: ?> |
| 145 | - <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?></li> |
|
| 145 | + <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage('login')->text()); ?></li> |
|
| 146 | 146 | <?php endif; ?> |
| 147 | 147 | <?php endif; ?> |
| 148 | 148 | </ul> |
@@ -187,25 +187,25 @@ discard block |
||
| 187 | 187 | </div> |
| 188 | 188 | <?php endif; ?> |
| 189 | 189 | <!--[if lt IE 9]> |
| 190 | - <div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename') . ' '. wfMessage( 'pivot-browsermsg' )->text(); ?></div> |
|
| 190 | + <div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename').' '.wfMessage('pivot-browsermsg')->text(); ?></div> |
|
| 191 | 191 | <![endif]--> |
| 192 | 192 | |
| 193 | - <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="sitenotice panel radius"><?php $this->html( 'sitenotice' ); ?></div><?php } ?> |
|
| 194 | - <?php if ( $this->data['newtalk'] ) { ?><div id="usermessage" class="newtalk panel radius"><?php $this->html( 'newtalk' ); ?></div><?php } ?> |
|
| 193 | + <?php if ($this->data['sitenotice']) { ?><div id="siteNotice" class="sitenotice panel radius"><?php $this->html('sitenotice'); ?></div><?php } ?> |
|
| 194 | + <?php if ($this->data['newtalk']) { ?><div id="usermessage" class="newtalk panel radius"><?php $this->html('newtalk'); ?></div><?php } ?> |
|
| 195 | 195 | </div> |
| 196 | 196 | </div> |
| 197 | 197 | |
| 198 | 198 | <?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?> |
| 199 | - <a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right hide-for-print" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> <?php echo wfMessage( 'actions' )->text() ?></span></i></a> |
|
| 199 | + <a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right hide-for-print" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> <?php echo wfMessage('actions')->text() ?></span></i></a> |
|
| 200 | 200 | <ul id="drop1" class="tiny content f-dropdown" data-dropdown-content> |
| 201 | - <?php foreach($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'),'',$this->makeListItem($key, $tab)); } ?> |
|
| 202 | - <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true )); ?> |
|
| 201 | + <?php foreach ($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'), '', $this->makeListItem($key, $tab)); } ?> |
|
| 202 | + <?php wfRunHooks('SkinTemplateToolboxEnd', array(&$this, true)); ?> |
|
| 203 | 203 | </ul> |
| 204 | 204 | |
| 205 | 205 | <?php endif; |
| 206 | 206 | $namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText()); |
| 207 | 207 | $displaytitle = $this->data['title']; |
| 208 | - if (!empty($namespace)) { |
|
| 208 | + if ( ! empty($namespace)) { |
|
| 209 | 209 | $pagetitle = $this->getSkin()->getTitle(); |
| 210 | 210 | $newtitle = str_replace($namespace.':', '', $pagetitle); |
| 211 | 211 | $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | <div class="<?php echo $wgPivotFeatures['useAddThisShare']; ?> hide-for-print"></div> |
| 217 | 217 | <!-- Go to www.addthis.com/dashboard to customize your tools --> |
| 218 | 218 | <?php } ?> |
| 219 | - <?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?> |
|
| 219 | + <?php if ($this->data['isarticle']) { ?><h3 id="tagline"><?php $this->msg('tagline') ?></h3><?php } ?> |
|
| 220 | 220 | <h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5> |
| 221 | 221 | <div id="contentSub" class="clear_both"></div> |
| 222 | 222 | <div id="bodyContent" class="mw-bodytext"> |
@@ -298,10 +298,10 @@ discard block |
||
| 298 | 298 | function renderSidebar() { |
| 299 | 299 | $sidebar = $this->getSidebar(); |
| 300 | 300 | $toolbox = $this->getToolbox(); |
| 301 | - foreach ($sidebar as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { |
|
| 302 | - echo '<li id='.Sanitizer::escapeId( $box['id'] ); Linker::tooltip( $box['id'] ).'>'; |
|
| 303 | - echo '<li><label>'.htmlspecialchars( $box['header'] ).'</label></li>'; |
|
| 304 | - if ( is_array( $box['content'] ) ) { |
|
| 301 | + foreach ($sidebar as $boxName => $box) { if (($box['header'] != wfMessage('toolbox')->text())) { |
|
| 302 | + echo '<li id='.Sanitizer::escapeId($box['id']); Linker::tooltip($box['id']).'>'; |
|
| 303 | + echo '<li><label>'.htmlspecialchars($box['header']).'</label></li>'; |
|
| 304 | + if (is_array($box['content'])) { |
|
| 305 | 305 | foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } |
| 306 | 306 | } } |
| 307 | 307 | } |