Workaround for runJobs CategoryTree issue:
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 18 Mar 2008 21:45:18 +0000 (21:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 18 Mar 2008 21:45:18 +0000 (21:45 +0000)
* Don't bloat $this->mStripList on every setHook() call.

It adds up in batch processing until we end up with regex errors!

includes/Parser.php

index 00b8900..8b2eb0f 100644 (file)
@@ -3843,7 +3843,9 @@ class Parser
                $tag = strtolower( $tag );
                $oldVal = isset( $this->mTagHooks[$tag] ) ? $this->mTagHooks[$tag] : null;
                $this->mTagHooks[$tag] = $callback;
-               $this->mStripList[] = $tag;
+               if( !in_array( $tag, $this->mStripList ) ) {
+                       $this->mStripList[] = $tag;
+               }
 
                return $oldVal;
        }