Commit 53440ac2241f354d78323b653227f60193a6ed1c

Authored by Conrad Vermeulen
1 parent e9cda933

KTS-3756

"Attempting to move a folder from the Search results to Root fails."
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Megan Watson

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9483 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktcore/KTBulkActions.php
@@ -282,6 +282,7 @@ class KTBulkMoveAction extends KTBulkAction { @@ -282,6 +282,7 @@ class KTBulkMoveAction extends KTBulkAction {
282 } 282 }
283 283
284 function check_entity($oEntity) { 284 function check_entity($oEntity) {
  285 +
285 if(is_a($oEntity, 'Document')) { 286 if(is_a($oEntity, 'Document')) {
286 if(!KTDocumentUtil::canBeMoved($oEntity)) { 287 if(!KTDocumentUtil::canBeMoved($oEntity)) {
287 return PEAR::raiseError(_kt('Document cannot be moved')); 288 return PEAR::raiseError(_kt('Document cannot be moved'));
@@ -322,9 +323,11 @@ class KTBulkMoveAction extends KTBulkAction { @@ -322,9 +323,11 @@ class KTBulkMoveAction extends KTBulkAction {
322 exit(0); 323 exit(0);
323 } 324 }
324 325
325 - if($this->iTargetFolderId == $this->oFolder->getId()){  
326 - $this->errorRedirectTo('collectinfo', _kt('Invalid target folder selected: Target folder is the same as the current folder.'));  
327 - exit(0); 326 + if ($_REQUEST['fReturnAction'] != 'search2') {
  327 + if($this->iTargetFolderId == $this->oFolder->getId()){
  328 + $this->errorRedirectTo('collectinfo', _kt('Invalid target folder selected: Target folder is the same as the current folder.'));
  329 + exit(0);
  330 + }
328 } 331 }
329 332
330 // does the user have write permission 333 // does the user have write permission