From 1894283f5e75d280fa2b857a9ae1611fe4cfc7ba Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Thu, 9 Oct 2008 09:21:03 +0000 Subject: [PATCH] Merged in... --- lib/foldermanagement/folderutil.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/foldermanagement/folderutil.inc.php b/lib/foldermanagement/folderutil.inc.php index d6d0350..ca77c80 100644 --- a/lib/foldermanagement/folderutil.inc.php +++ b/lib/foldermanagement/folderutil.inc.php @@ -457,9 +457,9 @@ class KTFolderUtil { // Get source PO id and its parent PO id $iSrcPoId = $oSrcFolder->getPermissionObjectID(); $oSrcParent = Folder::get($oSrcFolder->getParentID()); - $iSrcParentPoId = $srcParent->getPermissionObjectID(); + $iSrcParentPoId = $oSrcParent->getPermissionObjectID(); - // If the folder defines its own permissions then we leave it + // If the folder defines its own permissions then we copy the permission object // If the source folder inherits permissions we must change it to inherit from the new parent folder $bInheritPermissions = false; if($iSrcPoId == $iSrcParentPoId){ @@ -609,11 +609,14 @@ class KTFolderUtil { } // If the folder inherits its permissions then we set it to inherit from the new parent folder and update permissions + // If it defines its own then copy the permission object over if($bInheritPermissions){ $aOptions = array( 'evenifnotowner' => true, // Inherit from parent folder, even though not permission owner ); KTPermissionUtil::inheritPermissionObject($oNewBaseFolder, $aOptions); + }else{ + KTPermissionUtil::copyPermissionObject($oNewBaseFolder); } // and store -- libgit2 0.21.4