log warning if one of the nodes could not be moved/copied
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 15 Mar 2016 09:13:58 +0000 (10:13 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 15 Mar 2016 09:59:41 +0000 (10:59 +0100)
Change-Id: I7086cf1d0c4a3c0f473f85948ecb4814e14fbcbe
Reviewed-on: http://gerrit.tine20.com/customers/2911
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Filemanager/Controller/Node.php

index 0283225..ac85e56 100644 (file)
@@ -848,7 +848,13 @@ class Filemanager_Controller_Node extends Tinebase_Controller_Record_Abstract
                 } else if ($_action === 'copy') {
                     $node = $this->_copyNode($sourcePathRecord, $destinationPathRecord, $_forceOverwrite);
                 }
-                $result->addRecord($node);
+
+                if ($node instanceof Tinebase_Record_Abstract) {
+                    $result->addRecord($node);
+                } else {
+                    if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__
+                        . ' Could not copy or move node to destination ' . $destinationPathRecord->flatpath);
+                }
             } catch (Filemanager_Exception_NodeExists $fene) {
                 $nodeExistsException = $this->_handleNodeExistsException($fene, $nodeExistsException);
             }