API: Adding inprop=talkid,subjectid to prop=info
[lhc/web/wiklou.git] / includes / Preprocessor_Hash.php
index 2034278..85e152c 100644 (file)
@@ -254,6 +254,7 @@ class Preprocessor_Hash implements Preprocessor {
                                        continue;
                                }
                                $name = $matches[1];
+                               $lowerName = strtolower( $name );
                                $attrStart = $i + strlen( $name ) + 1;
 
                                // Find end of tag
@@ -268,7 +269,7 @@ class Preprocessor_Hash implements Preprocessor {
                                }
 
                                // Handle ignored tags
-                               if ( in_array( $name, $ignoredTags ) ) {
+                               if ( in_array( $lowerName, $ignoredTags ) ) {
                                        $accum->addNodeWithText( 'ignore', substr( $text, $i, $tagEndPos - $i + 1 ) );
                                        $i = $tagEndPos + 1;
                                        continue;
@@ -296,7 +297,7 @@ class Preprocessor_Hash implements Preprocessor {
                                        }
                                }
                                // <includeonly> and <noinclude> just become <ignore> tags
-                               if ( in_array( $name, $ignoredElements ) ) {
+                               if ( in_array( $lowerName, $ignoredElements ) ) {
                                        $accum->addNodeWithText(  'ignore', substr( $text, $tagStartPos, $i - $tagStartPos ) );
                                        continue;
                                }
@@ -803,6 +804,10 @@ class PPFrame_Hash implements PPFrame {
                {
                        return '<span class="error">Node-count limit exceeded</span>';
                }
+               if ( $depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+                       return '<span class="error">Expansion depth limit exceeded</span>';
+               }
+               ++$depth;
 
                $outStack = array( '', '' );
                $iteratorStack = array( false, $root );
@@ -955,6 +960,7 @@ class PPFrame_Hash implements PPFrame {
                                }
                        }
                }
+               --$depth;
                return $outStack[0];
        }