* Add Parser::incrementExpensiveFunctionCount() and use it in CoreParserFunctions...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 18 Apr 2008 14:34:38 +0000 (14:34 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 18 Apr 2008 14:34:38 +0000 (14:34 +0000)
commit82a87bd33c2130f980e4d8c85841ba5084bf7424
treeefd0df77edd7aec813804b1fca24dd568418f406
parent5ff6d358cdabe949652d5e7c58bd4403c7c02aa9
* Add Parser::incrementExpensiveFunctionCount() and use it in CoreParserFunctions::getcategorycount(); refactor slightly so that formatRaw is called even for 0 (do any languages format that differently? maybe if they use non-Arabic numerals?).  From bug 12698, by CBM.
* Add a cache so that calling getcategorycount for the same category many times won't stupidly repeat the same query over and over.  Currently an early return avoids incrementing the expensive function count in this case, so technically this makes things *slower*, not faster, but that can be tweaked if anyone cares.
includes/CoreParserFunctions.php
includes/Parser.php