From: umherirrender Date: Sat, 20 Oct 2012 11:32:35 +0000 (+0200) Subject: Remove a bunch of trailing spaces and unneeded newlines X-Git-Tag: 1.31.0-rc.0~21933^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=c157f4d42419e2d4e756bca8b2b67060bf3c4290;p=lhc%2Fweb%2Fwiklou.git Remove a bunch of trailing spaces and unneeded newlines Change-Id: I52ae3c55044bc8c53698e356bad74969406670bf --- diff --git a/includes/libs/JavaScriptMinifier.php b/includes/libs/JavaScriptMinifier.php index 0b4be9ae74..db5326c7cf 100644 --- a/includes/libs/JavaScriptMinifier.php +++ b/includes/libs/JavaScriptMinifier.php @@ -59,7 +59,7 @@ class JavaScriptMinifier { const TYPE_DO = 15; // keywords: case, var, finally, else, do, try const TYPE_FUNC = 16; // keywords: function const TYPE_LITERAL = 17; // all literals, identifiers and unrecognised tokens - + // Sanity limit to avoid excessive memory usage const STACK_LIMIT = 1000; @@ -385,7 +385,7 @@ class JavaScriptMinifier { self::TYPE_LITERAL => true ) ); - + // Rules for when newlines should be inserted if // $statementsOnOwnLine is enabled. // $newlineBefore is checked before switching state, @@ -514,7 +514,7 @@ class JavaScriptMinifier { return self::parseError($s, $end, 'Number with several E' ); } $end++; - + // + sign is optional; - sign is required. $end += strspn( $s, '-+', $end ); $len = strspn( $s, '0123456789', $end ); @@ -564,13 +564,13 @@ class JavaScriptMinifier { $out .= ' '; $lineLength++; } - + $out .= $token; $lineLength += $end - $pos; // += strlen( $token ) $last = $s[$end - 1]; $pos = $end; $newlineFound = false; - + // Output a newline after the token if required // This is checked before AND after switching state $newlineAdded = false; @@ -589,7 +589,7 @@ class JavaScriptMinifier { } elseif( isset( $goto[$state][$type] ) ) { $state = $goto[$state][$type]; } - + // Check for newline insertion again if ( $statementsOnOwnLine && !$newlineAdded && isset( $newlineAfter[$state][$type] ) ) { $out .= "\n"; @@ -598,7 +598,7 @@ class JavaScriptMinifier { } return $out; } - + static function parseError($fullJavascript, $position, $errorMsg) { // TODO: Handle the error: trigger_error, throw exception, return false... return false; diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index 98727f1706..6e1094f6c0 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -40,7 +40,7 @@ class UsercreateTemplate extends QuickTemplate { 'helptext' => $helptext, ); } - + function execute() { if( $this->data['message'] ) { ?> @@ -187,9 +187,9 @@ class UsercreateTemplate extends QuickTemplate { if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { foreach ( $this->data['extraInput'] as $inputItem ) { ?> -