Commit graph

815 commits

Author SHA1 Message Date
Brion Vibber
67e424a292 * (bug 26298) Throw warning instead of silently saving blank page when php-suhosin removes wpTextbox1 for being 'too long' or some such
To resolve this, edit your php.ini and raise the limits in suhosin.request.max_value_length and suhosin.post.max_value_length settings to more reasonable values.

As a helper for users hit by this, I've made a tweak on trunk in rXXXXX to check for the case of a missing wpTextbox1 field (which I can confirm when installing Suhosin and setting the suhosin.request.max_value_length absurdly low). This extends the previous behavior to check for incomplete form submissions by just checking if the edittime (a late field) is present; and also I added a message to show when it forces those previews.

So now when someone hits this sort of filter, it'll force a preview. Unfortunately that'll show a big empty box, but at least you'll know it's because something went wrong, and it won't save it silently...

Adds UI message 'edit_form_incomplete' with default English value. It's fairly generic as we can't know whether the field was filtered for length, content, or what.
2011-02-14 03:10:08 +00:00
Aaron Schulz
f8a792c12c Broke long line 2011-02-13 23:20:53 +00:00
Mark A. Hershberger
b4cee86beb w/s fixups 2011-02-12 04:06:22 +00:00
Roan Kattouw
cefa6bab99 Wrap old toolbar addButton() calls in a document ready, so they're not run early and explode in debug mode 2011-02-11 09:38:38 +00:00
Alexandre Emsenhuber
1fb56df473 Added "context title" to replace $wgTitle, current behavior unchanges, but added a comment that this might change in the future to completely remove $wgTitle usage in EditPage
Also removed null check on showEditForm() since $wgTitle is set on ApiEditPage.php, so it won't catch anything
2011-02-10 17:08:37 +00:00
Platonides
57e0786ec3 More wfProfileOut()ing 2011-02-10 16:04:19 +00:00
Platonides
661444925a Close wfProfileIn()s 2011-02-10 15:53:54 +00:00
Platonides
b0f5a521ad Remove unused $wgContLang globals after refactoring at r81456 and r81456 2011-02-08 22:40:07 +00:00
Alexandre Emsenhuber
5ce1ed2b1b * Changed all calls to wfMsgWikiHtml() in core
* Now replacing parameter before parsing where possible
* Used 'parseinline' for 'nosuchuser' message in Special:Userlogin for consistency with other error messages
2011-02-06 12:38:33 +00:00
Alexandre Emsenhuber
136f4c06fa Deprecated wfMsgWeirdKey(), use wfMessage() instead. Moved getDefaultMessageText() from Article to Title so that it can be used there instead of duplicating code. No usage in extensions. 2011-02-05 15:11:52 +00:00
Alexandre Emsenhuber
a58b7f5139 * Use wfMessage() instead of wfMsgGetKey() and wfEmptyMsg()
* Factorise common code
2011-02-03 15:29:13 +00:00
Alexandre Emsenhuber
51c6afc751 * Replaced $wgMessageCache by MessageCache::singleton(); since we only use one instance of this class (as for ParserCache, LinkCache)
* MessageCache::singleton() calls wfGetMessageCacheStorage() directly instead of using $messageMemc, just in case this would be called before that variable is set
* Per TimStarling: also removed deprecated methods in MessageCache class: addMessages() and related, [get|set|enable|disable]Transform(), loadAllMessages(), loadMessageFile() and some others. Same for the legacyData stuff in LocalisationCache that was only used by MessageCache::addMessages() and related. 
* Converted remaining extensions
2011-01-26 15:42:04 +00:00
Niklas Laxström
91d472a490 Kill some duplicated queries by also caching negative results in wasDeletedSinceLastEdit 2011-01-20 07:38:30 +00:00
Brian Wolff
0c0dad3cd3 (follow-up r66913) Per CR, make the editsummary length checker use jQuery/RL fanciness.
The js was tested in firefox 3.0.6, IE6, some oldish version of Opera, Konqourer, and Chrome.
(Of course in IE6, the rest of mediawiki fell on its face, but the js added here worked).
2011-01-19 03:59:11 +00:00
Brian Wolff
3b84269eb2 Make it so that editintro's included using the editintro url parameter, don't
show <noinclude> sections.

Its quite counter-intuitive that noinclude sections are included. There was a recent
discussion on the Wikinews Water cooler (village pump equivalent) about why interwikis
for such templates were being included on pages using the editintro even though the
interwiki was in a <noinclude> section.
2011-01-17 03:34:08 +00:00
Alexandre Emsenhuber
a9dc5fbc91 Modified EditPage to use Article::doEdit() instead of Article::insertNewArticle() and Article::updateArticle().
The redirect to the page is now done in EditPage::attemptSave() instead of being hidden in EditPage::internalAttemptSave(); this change should not affect anyboby, the only other call to internalAttemptSave() is in ApiEditPage.php where it's not used.
2011-01-15 15:21:36 +00:00
Daniel Friesen
a7ccb0fbb3 Fix boolean for $editnotice_base message existance check that was messed up in r80248.
Also switch to using === for '' and '-' comparison like Nikerabbit wanted.
2011-01-14 22:46:08 +00:00
Chad Horohoe
184db7405f Fix for r80248: undefined variable. 2011-01-14 13:25:14 +00:00
Daniel Friesen
5158134a6d Fix remainder of the accidental ->empty() calls I used when converting wfEmptyMsg into Message::exists() calls. 2011-01-14 11:36:37 +00:00
Siebrand Mazeland
bcb43b5a53 fix syntax terror. 2011-01-14 11:14:48 +00:00
Daniel Friesen
39ab3cfc9f Implement Message::isBlank and Message::isDisabled.
And while we're at it... update a random assortment of code using wfEmptyMsg to use the new wfMessage class and our exists/isBlank/isDisabled methods.
2011-01-14 10:51:05 +00:00
Niklas Laxström
3f4443ebf2 Fix syntax terror from r79884 2011-01-09 12:23:41 +00:00
Niklas Laxström
109423a6d9 * (bug 26187) Confirmrecreate no longer parses the edit summary 2011-01-09 11:30:36 +00:00
Brian Wolff
767da0cb61 Comment in code says - truncate to 250 bytes, then add ellipse. but
we don't add the ellipse, so change it to add the ellipse. The 
comment and code should be the same, and since we have the room
might as well add the ellipse.

This normally wouldn't affect much, since users with JS on
will be prevented from adding that long a summary on the
client side
2011-01-07 00:17:52 +00:00
Sam Reed
0de35fc275 Followup r75763, fixup wrong change of deprecated method
No need to do separate htmlspecialchars et al, Xml::expandAttributes
2010-12-12 18:35:19 +00:00
Platonides
3dc0ab1120 Follow up r77981,r77982. Rename the new globalcsspreview/globaljspreview to sitecsspreview/sitejspreview per CodeReview. 2010-12-11 22:44:42 +00:00
Raimond Spekking
a3e80ee9a8 follow-up r77981: Fix class: mw-js -> mw-css for the CSS section
Add comments with the full message keys to make sure grep will find them
2010-12-07 17:25:49 +00:00
Platonides
3c44865cca Show the source on preview for CSS and Javascript pages.
Add pages in MediaWiki namespace into that group (bug 10871).
Only normal <pre> formatting is being used since ShowRawCssJs 
hook directly sends things out to the output.
2010-12-07 14:53:36 +00:00
Philip Tzou
04b1ace8b0 Add a new method 'spamPageWithContent' to class EditPage. User can be allowed to view his/her diff and submitted text when hit the spam-filter. The changes to extension SpamBlacklist will be followed up soon. 2010-11-26 07:48:41 +00:00
Victor Vasiliev
bbad085453 * Show "skin does not exist error" only when the skin is inputted in the wrong case. This seems to be the original intention. Otherwise it renders the warning on the completely legitimate subpages with user scripts.
* Deprecate isValidUserCssJSSubpage() as having a very confusing title. User scripts *are* valid user JS subpages.
2010-11-25 23:12:05 +00:00
Sam Reed
6b0d4abc64 Revert r77297, Won't be reverting MimeMagic
Mainly whitespace reverts here
2010-11-25 22:22:53 +00:00
Antoine Musso
6fe29c9c30 revert r76464
* mixed style changes and variable removing
* logic changes
* useful comments removed
2010-11-25 20:01:34 +00:00
Raimond Spekking
0b92d62616 (bug 21911) Per Tim Starling's comment #10: Remove hard coded limit for long page warning.
New message [[MediaWiki:Longpage-hint]] (empty per default) can be used instead.
Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw number of the textsize in Byte for calculation with PerserFunctions
(yes, I know that PerserFunctions are not in core, unfortunately, but every installation I know or attend have it)
2010-11-23 12:57:27 +00:00
Sam Reed
10ecfeb03b Various unused variables, add some braces
Explicitally define some variables used in hook type calls
2010-11-10 19:49:04 +00:00
Platonides
4a84d2a0b3 Minor whitespace change. 2010-11-07 23:17:04 +00:00
OverlordQ
f2df835d56 Revert r69337 (Removal of minordefault preference) 2010-11-01 18:58:24 +00:00
Sam Reed
39c005ca79 bug 25517 Assignment in conditions should be avoided/ http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions 2010-11-01 00:07:17 +00:00
Sam Reed
3cfa08995d Update a few deprecated method calls 2010-10-31 23:46:35 +00:00
Platonides
babc48cf0e Remove call to deprecated $wgOut->includeJQuery(); 2010-10-31 18:19:02 +00:00
Sam Reed
efd8358882 More deprecated method calls 2010-10-31 16:33:48 +00:00
Sam Reed
6b3b915353 Big attack on unused variables... 2010-10-14 20:53:04 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Alexandre Emsenhuber
ef55744d0a Removed unexisting parameter from doc 2010-10-10 09:21:12 +00:00
Trevor Parscal
a5010f97d9 Removed CSS file/rule which was added to fix a bug it never actually fixed. More investigation needs to be put into bug #19334 2010-10-06 20:37:34 +00:00
Chad Horohoe
cc6a650bf8 Refactor GAID_FOR_UPDATE into Title::GAID_FOR_UPDATE. Yay less file-scope code (extensions will follow) 2010-09-30 19:13:25 +00:00
Platonides
5167ae7213 Do not show math toolbar button if TeX is disabled.
Do not show image and media toolbar buttons if the wiki can't show images (either by local upload or via a foreign repo)
2010-09-29 23:27:26 +00:00
Niklas Laxström
ec1714baee Don't show empty source code for non-existing pages if editing was prevented by a permission error 2010-09-28 08:16:42 +00:00
Trevor Parscal
fd5ad32869 Fixed check for mediaWiki existance and removed additional unneeded wrapping in mediaWiki.loader.using calls as per comments on r73499. 2010-09-22 18:03:29 +00:00
Trevor Parscal
8843030579 Removed unneeded mediaWiki.loader.using wrapper which got the old toolbar working again. Fixes bug #25239. 2010-09-22 00:05:29 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00