19
19
'
20
20
Imports DotNetNuke
21
21
Imports System.Web.UI.WebControls
22
+ Imports DotNetNuke.Entities.Modules
22
23
Imports DotNetNuke.Services.FileSystem
23
24
24
25
Namespace DotNetNuke.Modules.Documents
@@ -306,7 +307,7 @@ Namespace DotNetNuke.Modules.Documents
306
307
If IsReadComplete Then Exit Sub
307
308
308
309
' Only read from the cache if the users is not logged in
309
- strCacheKey = Me .CacheKey & ";anon-doclist"
310
+ strCacheKey = TabModuleId & "dnnDocs ;anon-doclist"
310
311
If Not Request.IsAuthenticated Then
311
312
mobjDocumentList = CType (DataCache.GetCache(strCacheKey), ArrayList)
312
313
End If
@@ -322,9 +323,8 @@ Namespace DotNetNuke.Modules.Documents
322
323
For intCount = mobjDocumentList.Count - 1 To 0 Step - 1
323
324
objDocument = CType (mobjDocumentList(intCount), DocumentInfo)
324
325
If objDocument.Url.ToLower.IndexOf( "fileid=" ) >= 0 Then
325
- ' document is a file, check security
326
- Dim objFiles As New FileController
327
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFiles.GetFileById( Integer .Parse(objDocument.Url.Split( Char .Parse( "=" ))( 1 )), PortalId)
326
+ ' document is a file, check security\
327
+ Dim objFile As IFileInfo = FileManager.Instance.GetFile( Integer .Parse(objDocument.Url.Split( Char .Parse( "=" ))( 1 )))
328
328
329
329
If Not objFile Is Nothing AndAlso Not DotNetNuke.Security.PortalSecurity.IsInRoles(FileSystemUtils.GetRoles(objFile.Folder, PortalSettings.PortalId, "READ" )) Then
330
330
' remove document from the list
0 commit comments