Commit 95bf930f4555de2d4219ab3a4532a54ea188522a

Authored by Kevin G Fourie
2 parents 8f884970 5625bfc6

Merge branch 'master' of github.com:ktgit/knowledgetree

lib/permissions/permissionutil.inc.php
... ... @@ -490,7 +490,6 @@ class KTPermissionUtil {
490 490 * and so forth.
491 491 */
492 492 function userHasPermissionOnItem($oUser, $oPermission, $oFolderOrDocument) {
493   -
494 493 if (is_string($oPermission)) {
495 494 $oPermission =& KTPermission::getByName($oPermission);
496 495 }
... ... @@ -506,7 +505,7 @@ class KTPermissionUtil {
506 505 $iPermId = $oPermission->getID();
507 506 $iDocId = $oFolderOrDocument->getID();
508 507 $lookup = 'folders';
509   - if(is_a($oEntity, 'Document') || is_a($oEntity, 'DocumentProxy')){
  508 + if(is_a($oFolderOrDocument, 'Document') || is_a($oFolderOrDocument, 'DocumentProxy')){
510 509 $lookup = 'docs';
511 510 }
512 511 // check if permission has been set
... ...