From 53440ac2241f354d78323b653227f60193a6ed1c Mon Sep 17 00:00:00 2001 From: Conrad Vermeulen Date: Mon, 6 Oct 2008 15:06:00 +0000 Subject: [PATCH] KTS-3756 "Attempting to move a folder from the Search results to Root fails." Fixed. --- plugins/ktcore/KTBulkActions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/ktcore/KTBulkActions.php b/plugins/ktcore/KTBulkActions.php index 169e403..ac22fcf 100644 --- a/plugins/ktcore/KTBulkActions.php +++ b/plugins/ktcore/KTBulkActions.php @@ -282,6 +282,7 @@ class KTBulkMoveAction extends KTBulkAction { } function check_entity($oEntity) { + if(is_a($oEntity, 'Document')) { if(!KTDocumentUtil::canBeMoved($oEntity)) { return PEAR::raiseError(_kt('Document cannot be moved')); @@ -322,9 +323,11 @@ class KTBulkMoveAction extends KTBulkAction { exit(0); } - if($this->iTargetFolderId == $this->oFolder->getId()){ - $this->errorRedirectTo('collectinfo', _kt('Invalid target folder selected: Target folder is the same as the current folder.')); - exit(0); + if ($_REQUEST['fReturnAction'] != 'search2') { + if($this->iTargetFolderId == $this->oFolder->getId()){ + $this->errorRedirectTo('collectinfo', _kt('Invalid target folder selected: Target folder is the same as the current folder.')); + exit(0); + } } // does the user have write permission -- libgit2 0.21.4