Last modified: 2010-05-15 16:03:39 UTC
Created attachment 4896 [details] proposed patch An editor previewing a page using too many parser functions is warned "Warning: This page contains too many expensive parser function calls", and the page is put in a maintenance category. This is not the case when you include too many templates in a page/use too long template arguments. Of course, one can dig into the HTML source, but that is not really user-friendly. This patch tries to handle that issue, adding two more warning messages, and two more maintenance categories. I'd like some more experienced users to review it so that I can commit it :)
Perhaps change getWarnings() to encapsulate that array_keys() call? The check for addWarning() existence probably got moved over from when this lived in ParserFunctions, so couldn't be sure what version parser was present; it ought to be safe to remove that check now. On this: + if ( is_null( $current ) || is_null( $max ) ) { + $warning = wfMsg( $msgName ); + } else { + $warning = wfMsg( $msgName, $current, $max); + } it should be quite safe to just pass them on; they'll do no harm if present but unused.
Thanks for the review :) Committed, with your changes, in r35059