@@ -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(); |
@@ -39,8 +39,9 @@ discard block |
||
39 | 39 | $out->addHeadItem('ie-meta', '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'); |
40 | 40 | break; |
41 | 41 | case 2: |
42 | - if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) |
|
43 | - header('X-UA-Compatible: IE=edge'); |
|
42 | + if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { |
|
43 | + header('X-UA-Compatible: IE=edge'); |
|
44 | + } |
|
44 | 45 | break; |
45 | 46 | } |
46 | 47 | $out->addModuleStyles('skins.pivot.styles'); |
@@ -93,7 +94,10 @@ discard block |
||
93 | 94 | <!-- START PIVOTTEMPLATE --> |
94 | 95 | <div class="off-canvas-wrap docs-wrap" data-offcanvas=""> |
95 | 96 | <div class="inner-wrap"> |
96 | - <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "<div class='fixed'>"; ?> |
|
97 | + <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
98 | + echo "<div class='fixed'>"; |
|
99 | +} |
|
100 | +?> |
|
97 | 101 | <nav class="tab-bar hide-for-print"> |
98 | 102 | <section id="left-nav-aside" class="left-small show-for-small"> |
99 | 103 | <a class="left-off-canvas-toggle"><span id="menu-user"><i class="fa fa-navicon fa-lg"></i></span></a> |
@@ -110,10 +114,16 @@ discard block |
||
110 | 114 | </section> |
111 | 115 | |
112 | 116 | <section id="right-nav-aside" class="right-small"> |
113 | - <a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa <?php if ($wgUser->isLoggedIn()): ?>fa-user<?php else: ?>fa-navicon<?php endif; ?> fa-lg"></i></span></a> |
|
117 | + <a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa <?php if ($wgUser->isLoggedIn()): ?>fa-user<?php else { |
|
118 | + : ?>fa-navicon<?php endif; |
|
119 | +} |
|
120 | +?> fa-lg"></i></span></a> |
|
114 | 121 | </section> |
115 | 122 | </nav> |
116 | - <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "</div>"; ?> |
|
123 | + <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
124 | + echo "</div>"; |
|
125 | +} |
|
126 | +?> |
|
117 | 127 | <aside class="left-off-canvas-menu"> |
118 | 128 | <ul class="off-canvas-list"> |
119 | 129 | |
@@ -136,19 +146,28 @@ discard block |
||
136 | 146 | <?php if ($wgUser->isLoggedIn()): ?> |
137 | 147 | <li id="personal-tools"><label>Personal</label></li> |
138 | 148 | <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> |
139 | - <?php else: ?> |
|
149 | + <?php else { |
|
150 | + : ?> |
|
140 | 151 | <?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> |
|
152 | + <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; |
|
153 | +} |
|
154 | +?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
142 | 155 | <?php elseif (isset($this->data['personal_urls']['login'])): ?> |
143 | 156 | <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
144 | - <?php else: ?> |
|
145 | - <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?></li> |
|
157 | + <?php else { |
|
158 | + : ?> |
|
159 | + <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); |
|
160 | +} |
|
161 | +?></li> |
|
146 | 162 | <?php endif; ?> |
147 | 163 | <?php endif; ?> |
148 | 164 | </ul> |
149 | 165 | </aside> |
150 | 166 | |
151 | - <section id="main-section" class="main-section" <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "style='margin-top:2.8125em'"; ?>> |
|
167 | + <section id="main-section" class="main-section" <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
168 | + echo "style='margin-top:2.8125em'"; |
|
169 | +} |
|
170 | +?>> |
|
152 | 171 | |
153 | 172 | <div id="page-content"> |
154 | 173 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'useAddThisFollow' => false |
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> |
@@ -181,19 +181,19 @@ discard block |
||
181 | 181 | <div class="row"> |
182 | 182 | <div class="large-12 columns"> |
183 | 183 | <!--[if lt IE 9]> |
184 | - <div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename') . ' '. wfMessage( 'pivot-browsermsg' )->text(); ?></div> |
|
184 | + <div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename').' '.wfMessage('pivot-browsermsg')->text(); ?></div> |
|
185 | 185 | <![endif]--> |
186 | 186 | |
187 | - <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="sitenotice panel radius"><?php $this->html( 'sitenotice' ); ?></div><?php } ?> |
|
188 | - <?php if ( $this->data['newtalk'] ) { ?><div id="usermessage" class="newtalk panel radius"><?php $this->html( 'newtalk' ); ?></div><?php } ?> |
|
187 | + <?php if ($this->data['sitenotice']) { ?><div id="siteNotice" class="sitenotice panel radius"><?php $this->html('sitenotice'); ?></div><?php } ?> |
|
188 | + <?php if ($this->data['newtalk']) { ?><div id="usermessage" class="newtalk panel radius"><?php $this->html('newtalk'); ?></div><?php } ?> |
|
189 | 189 | </div> |
190 | 190 | </div> |
191 | 191 | |
192 | 192 | <?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?> |
193 | - <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> |
|
193 | + <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> |
|
194 | 194 | <ul id="drop1" class="tiny content f-dropdown" data-dropdown-content> |
195 | - <?php foreach($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'),'',$this->makeListItem($key, $tab)); } ?> |
|
196 | - <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true )); ?> |
|
195 | + <?php foreach ($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'), '', $this->makeListItem($key, $tab)); } ?> |
|
196 | + <?php wfRunHooks('SkinTemplateToolboxEnd', array(&$this, true)); ?> |
|
197 | 197 | </ul> |
198 | 198 | <?php if ($wgUser->isLoggedIn()): ?> |
199 | 199 | <div id="echo-notifications"> |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | <?php endif; |
205 | 205 | $namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText()); |
206 | 206 | $displaytitle = $this->data['title']; |
207 | - if (!empty($namespace)) { |
|
207 | + if ( ! empty($namespace)) { |
|
208 | 208 | $pagetitle = $this->getSkin()->getTitle(); |
209 | 209 | $newtitle = str_replace($namespace.':', '', $pagetitle); |
210 | 210 | $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | <div class="addthis_sharing_toolbox show-for-large-up hide-for-print"></div> |
216 | 216 | <!-- Go to www.addthis.com/dashboard to customize your tools --> |
217 | 217 | <?php } ?> |
218 | - <?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?> |
|
218 | + <?php if ($this->data['isarticle']) { ?><h3 id="tagline"><?php $this->msg('tagline') ?></h3><?php } ?> |
|
219 | 219 | <h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5> |
220 | 220 | <div id="contentSub" class="clear_both"></div> |
221 | 221 | <div id="bodyContent" class="mw-bodytext"> |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | function renderSidebar() { |
298 | 298 | $sidebar = $this->getSidebar(); |
299 | 299 | $toolbox = $this->getToolbox(); |
300 | - foreach ($sidebar as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { |
|
301 | - echo '<li id='.Sanitizer::escapeId( $box['id'] ); Linker::tooltip( $box['id'] ).'>'; |
|
302 | - echo '<li><label>'.htmlspecialchars( $box['header'] ).'</label></li>'; |
|
303 | - if ( is_array( $box['content'] ) ) { |
|
300 | + foreach ($sidebar as $boxName => $box) { if (($box['header'] != wfMessage('toolbox')->text())) { |
|
301 | + echo '<li id='.Sanitizer::escapeId($box['id']); Linker::tooltip($box['id']).'>'; |
|
302 | + echo '<li><label>'.htmlspecialchars($box['header']).'</label></li>'; |
|
303 | + if (is_array($box['content'])) { |
|
304 | 304 | foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } |
305 | 305 | } } |
306 | 306 | } |