Commit 65ee9a9663ccc70e26a328a272c4e1627ac07b8b

Authored by Brad Shuttleworth
1 parent cecd3be2

fix for KTS-1179: cancel checkout should give useful error message.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5738 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTDocumentActions.php
... ... @@ -356,7 +356,11 @@ class KTDocumentCancelCheckOutAction extends KTDocumentAction {
356 356  
357 357 function do_checkin() {
358 358 $sReason = KTUtil::arrayGet($_REQUEST, 'reason');
359   - $sReason = $this->oValidator->notEmpty($sReason);
  359 + $aOptions = array(
  360 + 'redirect_to' => array('main',sprintf('fDocumentId=%d', $this->oDocument->getId())),
  361 + 'message' => _kt('Please give a reason for cancelling the check-out.'),
  362 + );
  363 + $sReason = $this->oValidator->notEmpty($sReason, $aOptions);
360 364  
361 365 global $default;
362 366  
... ...