Commit 8f6e2a73e59aaa45783e9d06c8821aa5ae222f85
1 parent
532dedfd
KTS-1619
"Document checkin: Uploading file > PHP POST limit : incorrect error message" Verified and applied patch. Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6190 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
0 deletions
plugins/ktcore/KTDocumentActions.php
| ... | ... | @@ -404,6 +404,15 @@ class KTDocumentCheckInAction extends KTDocumentAction { |
| 404 | 404 | if ($res !== true) { |
| 405 | 405 | return $res; |
| 406 | 406 | } |
| 407 | + $postExpected = KTUtil::arrayGet($_REQUEST, "postExpected"); | |
| 408 | + $postReceived = KTUtil::arrayGet($_REQUEST, "postReceived"); | |
| 409 | + if (!empty($postExpected)) { | |
| 410 | + $aErrorOptions = array( | |
| 411 | + 'redirect_to' => array('main', sprintf('fDocumentId=%d', $this->oDocument->getId())), | |
| 412 | + 'message' => sprintf(_kt('Upload larger than maximum POST size: %s (post_max_size variable in .htaccess or php.ini)'), ini_get('post_max_size')), | |
| 413 | + ); | |
| 414 | + $this->oValidator->notEmpty($postReceived, $aErrorOptions); | |
| 415 | + } | |
| 407 | 416 | if (!$this->oDocument->getIsCheckedOut()) { |
| 408 | 417 | $_SESSION['KTErrorMessage'][] = _kt("This document is not checked out"); |
| 409 | 418 | controllerRedirect('viewDocument', 'fDocumentId=' . $this->oDocument->getId()); |
| ... | ... | @@ -423,6 +432,7 @@ class KTDocumentCheckInAction extends KTDocumentAction { |
| 423 | 432 | $oForm->setOptions(array( |
| 424 | 433 | 'label' => _kt("Checkin Document"), |
| 425 | 434 | 'action' => 'checkin', |
| 435 | + 'actionparams' => 'postExpected=1&fDocumentId='.$this->oDocument->getId(), | |
| 426 | 436 | 'fail_action' => 'main', |
| 427 | 437 | 'cancel_url' => KTBrowseUtil::getUrlForDocument($this->oDocument), |
| 428 | 438 | 'submit_label' => _kt("Checkin"), | ... | ... |