From 47e0b84a98ebebe6e0a855c74628ca9cea3229ff Mon Sep 17 00:00:00 2001 From: Paul Barrett Date: Tue, 7 Apr 2009 15:04:14 +0200 Subject: [PATCH] KTS-4115. This change is only indirectly related to this issue. The canBeMoved function was modified in the original fix to contain an argument by reference for returning a PEAR error object for more user friendly error reporting. The call to canBeMoved in ktapi/KTAPIDocument.inc.php did not include this additional argument. It has now been added along with the check for returning the more detailed error should there be one, or the original more generic error in absence of a detailed error. --- ktapi/KTAPIDocument.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ktapi/KTAPIDocument.inc.php b/ktapi/KTAPIDocument.inc.php index dd2c39b..6e03f54 100644 --- a/ktapi/KTAPIDocument.inc.php +++ b/ktapi/KTAPIDocument.inc.php @@ -785,9 +785,16 @@ class KTAPI_Document extends KTAPI_FolderItem return $result; } - if (!KTDocumentUtil::canBeMoved($this->document)) + if (!KTDocumentUtil::canBeMoved($this->document, $error)) { - return new PEAR_Error('Document cannot be moved.'); + if (PEAR::isError($error)) + { + return $error; + } + else + { + return new PEAR_Error('Document cannot be moved.'); + } } $name = $this->document->getName(); -- libgit2 0.21.4