Commit ba407a7b7d417eac30e92fb9dc6e293c06e3dc9b
1 parent
f5527693
Don't reference old iDocumentId or null document objects
SF tracker: 1066258 Submitted by: Adam Monsen (meonkeys) git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2981 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
4 deletions
lib/security/Permission.inc
| ... | ... | @@ -36,7 +36,7 @@ class Permission { |
| 36 | 36 | * o have write permission for the folder in which the document resides |
| 37 | 37 | * o be assigned a role which has write permission for the document |
| 38 | 38 | * |
| 39 | - * @param $iDocumentID Primary key of document to check | |
| 39 | + * @param $oDocument Document to check | |
| 40 | 40 | * |
| 41 | 41 | * @return boolean true if the current user has document write permission, false otherwise and set $_SESSION["errorMessage"] |
| 42 | 42 | */ |
| ... | ... | @@ -44,7 +44,7 @@ class Permission { |
| 44 | 44 | global $default; |
| 45 | 45 | |
| 46 | 46 | if ($oDocument == null) { |
| 47 | - $default->log->info("Failed to retrieve document with ID $iDocumentID from database"); | |
| 47 | + $default->log->info("Failed to retrieve document from database"); | |
| 48 | 48 | return false; |
| 49 | 49 | } |
| 50 | 50 | if (Permission::userHasFolderWritePermission(Folder::get($oDocument->getFolderID())) || |
| ... | ... | @@ -62,7 +62,7 @@ class Permission { |
| 62 | 62 | * o have read permission for the folder in which the document resides |
| 63 | 63 | * o be assigned a role which has read permission for the document |
| 64 | 64 | * |
| 65 | - * @param $iDocumentID Primary key of document to check | |
| 65 | + * @param $oDocument Document to check | |
| 66 | 66 | * |
| 67 | 67 | * @return boolean true if the current user has document read permission, false otherwise and set $_SESSION["errorMessage"] |
| 68 | 68 | */ |
| ... | ... | @@ -70,7 +70,7 @@ class Permission { |
| 70 | 70 | global $default; |
| 71 | 71 | |
| 72 | 72 | if ($oDocument == null) { |
| 73 | - $default->log->info("Failed to retrieve document with ID " . $oDocument->getID() . " from database"); | |
| 73 | + $default->log->info("Failed to retrieve document from database"); | |
| 74 | 74 | return false; |
| 75 | 75 | } |
| 76 | 76 | if (Permission::userHasWriteRoleForDocument($oDocument) || | ... | ... |