Commit 9584e5b4b7d0050deaf5713f3e8b5a4c0ddc97f6

Authored by kevin_fourie
1 parent 699f2b9e

Merged in...

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/STABLE/branches/3.5.4-Release-Branch@9485 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