Last modified: 2010-05-15 16:03:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16094, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14094 - When the expansion size is reached, the editor is not warned about it
When the expansion size is reached, the editor is not warned about it
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.13.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nicolas Dumazet
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-12 15:55 UTC by Nicolas Dumazet
Modified: 2010-05-15 16:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
proposed patch (7.22 KB, patch)
2008-05-12 15:55 UTC, Nicolas Dumazet
Details

Description Nicolas Dumazet 2008-05-12 15:55:22 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 :)
Comment 1 Brion Vibber 2008-05-19 20:45:28 UTC
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.
Comment 2 Nicolas Dumazet 2008-05-19 21:34:56 UTC
Thanks for the review :)

Committed, with your changes, in r35059

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links