Added/Removed spaces around string concatenation
[lhc/web/wiklou.git] / includes / parser / Preprocessor_Hash.php
index 9f87ed7..465c5a6 100644 (file)
@@ -367,7 +367,7 @@ class Preprocessor_Hash implements Preprocessor {
                                }
 
                                $tagStartPos = $i;
-                               if ( $text[$tagEndPos-1] == '/' ) {
+                               if ( $text[$tagEndPos - 1] == '/' ) {
                                        // Short end tag
                                        $attrEnd = $tagEndPos - 1;
                                        $inner = null;
@@ -515,7 +515,7 @@ class Preprocessor_Hash implements Preprocessor {
                                                'open' => $curChar,
                                                'close' => $rule['end'],
                                                'count' => $count,
-                                               'lineStart' => ($i > 0 && $text[$i-1] == "\n"),
+                                               'lineStart' => ($i > 0 && $text[$i - 1] == "\n"),
                                        );
 
                                        $stack->push( $piece );
@@ -591,9 +591,19 @@ class Preprocessor_Hash implements Preprocessor {
                                                                $lastNode = $node;
                                                        }
                                                        if ( !$node ) {
+                                                               if ( $cacheable ) {
+                                                                       wfProfileOut( __METHOD__ . '-cache-miss' );
+                                                                       wfProfileOut( __METHOD__ . '-cacheable' );
+                                                               }
+                                                               wfProfileOut( __METHOD__ );
                                                                throw new MWException( __METHOD__ . ': eqpos not found' );
                                                        }
                                                        if ( $node->name !== 'equals' ) {
+                                                               if ( $cacheable ) {
+                                                                       wfProfileOut( __METHOD__ . '-cache-miss' );
+                                                                       wfProfileOut( __METHOD__ . '-cacheable' );
+                                                               }
+                                                               wfProfileOut( __METHOD__ );
                                                                throw new MWException( __METHOD__ . ': eqpos is not equals' );
                                                        }
                                                        $equalsNode = $node;