r55500 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55499‎ | r55500 | r55501 >
Date:20:15, 22 August 2009
Author:brion
Status:ok
Tags:
Comment:
Clean up some of the unnecessary tabs splattered throughout our output. They tend to combine confusingly and just inflate both source and output without actually improving readability much.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -98,7 +98,7 @@
9999 }
100100 }
101101 function addScript( $script ) {
102 - $this->mScripts .= "\t\t" . $script . "\n";
 102+ $this->mScripts .= $script . "\n";
103103 }
104104
105105 /**
@@ -275,7 +275,7 @@
276276 * @param string $script JavaScript text, no <script> tags
277277 */
278278 function addInlineScript( $script ) {
279 - $this->mScripts .= "\t\t" . Html::inlineScript( "\n\t\t$script\n\t\t" ) . "\n";
 279+ $this->mScripts .= Html::inlineScript( "\n$script\n" ) . "\n";
280280 }
281281
282282 function getScript() {
@@ -1703,7 +1703,8 @@
17041704 $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" dir=\"$dir\">\n";
17051705 }
17061706
1707 - $ret .= "<head>\n\t<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n\t";
 1707+ $ret .= "<head>\n";
 1708+ $ret .= "<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n";
17081709 $ret .= implode( "\n", array(
17091710 $this->getHeadLinks(),
17101711 $this->buildCssLinks(),
@@ -1824,7 +1825,7 @@
18251826 }
18261827 }
18271828
1828 - return implode( "\n\t", $tags ) . "\n";
 1829+ return implode( "\n", $tags ) . "\n";
18291830 }
18301831
18311832 /**
@@ -1901,7 +1902,7 @@
19021903 $links[] = $link;
19031904 }
19041905
1905 - return "\t" . implode( "\n\t", $links );
 1906+ return implode( "\n", $links );
19061907 }
19071908
19081909 protected function styleLink( $style, $options ) {
Index: trunk/phase3/includes/Skin.php
@@ -488,7 +488,7 @@
489489 'action=raw&ctype='.$wgJsMimeType );
490490 $wgOut->addScriptFile( $userjs );
491491 }
492 - return "\t" . $vars . "\t" . $out->mScripts;
 492+ return $vars . "\n" . $out->mScripts;
493493 }
494494
495495 /**
@@ -980,7 +980,7 @@
981981 * @return String HTML-wrapped JS code to be put before </body>
982982 */
983983 function bottomScripts() {
984 - $bottomScriptText = "\n\t\t" . Html::inlineScript( 'if (window.runOnloadHook) runOnloadHook();' ) . "\n";
 984+ $bottomScriptText = "\n" . Html::inlineScript( 'if (window.runOnloadHook) runOnloadHook();' ) . "\n";
985985 wfRunHooks( 'SkinAfterBottomScripts', array( $this, &$bottomScriptText ) );
986986 return $bottomScriptText;
987987 }

Status & tagging log