Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | var $mTokenOk = false; |
59 | 59 | var $mTokenOkExceptSuffix = false; |
60 | 60 | var $mTriedSave = false; |
| 61 | + var $incompleteForm = false; |
61 | 62 | var $tooBig = false; |
62 | 63 | var $kblength = false; |
63 | 64 | var $missingComment = false; |
— | — | @@ -599,7 +600,17 @@ |
600 | 601 | |
601 | 602 | $this->scrolltop = $request->getIntOrNull( 'wpScrolltop' ); |
602 | 603 | |
603 | | - if ( is_null( $this->edittime ) ) { |
| 604 | + if ($this->textbox1 === '' && $request->getVal( 'wpTextbox1' ) === null) { |
| 605 | + // wpTextbox1 field is missing, possibly due to being "too big" |
| 606 | + // according to some filter rules such as Suhosin's setting for |
| 607 | + // suhosin.request.max_value_length (d'oh) |
| 608 | + $this->incompleteForm = true; |
| 609 | + } else { |
| 610 | + // edittime should be one of our last fields; if it's missing, |
| 611 | + // the submission probably broke somewhere in the middle. |
| 612 | + $this->incompleteForm = is_null( $this->edittime ); |
| 613 | + } |
| 614 | + if ( $this->incompleteForm ) { |
604 | 615 | # If the form is incomplete, force to preview. |
605 | 616 | wfDebug( __METHOD__ . ": Form data appears to be incomplete\n" ); |
606 | 617 | wfDebug( "POST DATA: " . var_export( $_POST, true ) . "\n" ); |
— | — | @@ -1921,6 +1932,8 @@ |
1922 | 1933 | } else { |
1923 | 1934 | $note = wfMsg( 'session_fail_preview' ); |
1924 | 1935 | } |
| 1936 | + } else if ( $this->incompleteForm ) { |
| 1937 | + $note = wfMsg( 'edit_form_incomplete' ); |
1925 | 1938 | } else { |
1926 | 1939 | $note = wfMsg( 'previewnote' ); |
1927 | 1940 | } |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1341,6 +1341,7 @@ |
1342 | 1342 | 'token_suffix_mismatch' => "'''Your edit has been rejected because your client mangled the punctuation characters in the edit token.''' |
1343 | 1343 | The edit has been rejected to prevent corruption of the page text. |
1344 | 1344 | This sometimes happens when you are using a buggy web-based anonymous proxy service.", |
| 1345 | +'edit_form_incomplete' => "'''Some parts of the edit form did not reach the server; double-check that your edits are intact and try again.'''", |
1345 | 1346 | 'editing' => 'Editing $1', |
1346 | 1347 | 'editingsection' => 'Editing $1 (section)', |
1347 | 1348 | 'editingcomment' => 'Editing $1 (new section)', |