Commit 95bf930f4555de2d4219ab3a4532a54ea188522a
Merge branch 'master' of github.com:ktgit/knowledgetree
Showing
1 changed file
with
1 additions
and
2 deletions
lib/permissions/permissionutil.inc.php
| @@ -490,7 +490,6 @@ class KTPermissionUtil { | @@ -490,7 +490,6 @@ class KTPermissionUtil { | ||
| 490 | * and so forth. | 490 | * and so forth. |
| 491 | */ | 491 | */ |
| 492 | function userHasPermissionOnItem($oUser, $oPermission, $oFolderOrDocument) { | 492 | function userHasPermissionOnItem($oUser, $oPermission, $oFolderOrDocument) { |
| 493 | - | ||
| 494 | if (is_string($oPermission)) { | 493 | if (is_string($oPermission)) { |
| 495 | $oPermission =& KTPermission::getByName($oPermission); | 494 | $oPermission =& KTPermission::getByName($oPermission); |
| 496 | } | 495 | } |
| @@ -506,7 +505,7 @@ class KTPermissionUtil { | @@ -506,7 +505,7 @@ class KTPermissionUtil { | ||
| 506 | $iPermId = $oPermission->getID(); | 505 | $iPermId = $oPermission->getID(); |
| 507 | $iDocId = $oFolderOrDocument->getID(); | 506 | $iDocId = $oFolderOrDocument->getID(); |
| 508 | $lookup = 'folders'; | 507 | $lookup = 'folders'; |
| 509 | - if(is_a($oEntity, 'Document') || is_a($oEntity, 'DocumentProxy')){ | 508 | + if(is_a($oFolderOrDocument, 'Document') || is_a($oFolderOrDocument, 'DocumentProxy')){ |
| 510 | $lookup = 'docs'; | 509 | $lookup = 'docs'; |
| 511 | } | 510 | } |
| 512 | // check if permission has been set | 511 | // check if permission has been set |