Commit b93b808265744afa19fea8e218b3894b8e605d97
1 parent
5459ccb7
UpdatePermissionLookup and friends change the object passed to them, and
thus should be passed by reference. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3572 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
lib/permissions/permissionutil.inc.php
| @@ -102,7 +102,7 @@ class KTPermissionUtil { | @@ -102,7 +102,7 @@ class KTPermissionUtil { | ||
| 102 | * | 102 | * |
| 103 | * To be used any time a folder permission object is changed. | 103 | * To be used any time a folder permission object is changed. |
| 104 | */ | 104 | */ |
| 105 | - function updatePermissionLookupRecursive($oDocumentOrFolder) { | 105 | + function updatePermissionLookupRecursive(&$oDocumentOrFolder) { |
| 106 | if (is_a($oDocumentOrFolder, 'Document')) { | 106 | if (is_a($oDocumentOrFolder, 'Document')) { |
| 107 | // XXX: metadata versions may need attention here | 107 | // XXX: metadata versions may need attention here |
| 108 | KTPermissionUtil::updatePermissionLookup($oDocumentOrFolder); | 108 | KTPermissionUtil::updatePermissionLookup($oDocumentOrFolder); |
| @@ -133,7 +133,7 @@ class KTPermissionUtil { | @@ -133,7 +133,7 @@ class KTPermissionUtil { | ||
| 133 | * Update's the permission lookup on one folder or document, | 133 | * Update's the permission lookup on one folder or document, |
| 134 | * non-recursively. | 134 | * non-recursively. |
| 135 | */ | 135 | */ |
| 136 | - function updatePermissionLookup($oFolderOrDocument) { | 136 | + function updatePermissionLookup(&$oFolderOrDocument) { |
| 137 | $oPO = KTPermissionObject::get($oFolderOrDocument->getPermissionObjectID()); | 137 | $oPO = KTPermissionObject::get($oFolderOrDocument->getPermissionObjectID()); |
| 138 | $aPAs = KTPermissionAssignment::getByObjectMulti($oPO); | 138 | $aPAs = KTPermissionAssignment::getByObjectMulti($oPO); |
| 139 | $aMapPermDesc = array(); | 139 | $aMapPermDesc = array(); |