Skip to content

Commit 96e9dfb

Browse files
Initial work for resolution of issue #5. Will resolve remaining issues in future releases
1 parent 71cd68f commit 96e9dfb

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Source/DnnDocuments/Document.ascx.vb

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'
2020
Imports DotNetNuke
2121
Imports System.Web.UI.WebControls
22+
Imports DotNetNuke.Entities.Modules
2223
Imports DotNetNuke.Services.FileSystem
2324

2425
Namespace DotNetNuke.Modules.Documents
@@ -306,7 +307,7 @@ Namespace DotNetNuke.Modules.Documents
306307
If IsReadComplete Then Exit Sub
307308

308309
' Only read from the cache if the users is not logged in
309-
strCacheKey = Me.CacheKey & ";anon-doclist"
310+
strCacheKey = TabModuleId & "dnnDocs;anon-doclist"
310311
If Not Request.IsAuthenticated Then
311312
mobjDocumentList = CType(DataCache.GetCache(strCacheKey), ArrayList)
312313
End If
@@ -322,9 +323,8 @@ Namespace DotNetNuke.Modules.Documents
322323
For intCount = mobjDocumentList.Count - 1 To 0 Step -1
323324
objDocument = CType(mobjDocumentList(intCount), DocumentInfo)
324325
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)))
328328

329329
If Not objFile Is Nothing AndAlso Not DotNetNuke.Security.PortalSecurity.IsInRoles(FileSystemUtils.GetRoles(objFile.Folder, PortalSettings.PortalId, "READ")) Then
330330
' remove document from the list

Source/DnnDocuments/EditDocs.ascx.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Namespace DotNetNuke.Modules.Documents
112112

113113
' Populate categories list
114114
With New DotNetNuke.Common.Lists.ListController
115-
lstCategory.DataSource = .GetListEntryInfoCollection(objDocumentsSettings.CategoriesListName)
115+
lstCategory.DataSource = .GetListEntryInfoItems(objDocumentsSettings.CategoriesListName)
116116
lstCategory.DataTextField = "Text"
117117
lstCategory.DataValueField = "Value"
118118

Source/DnnDocuments/EditDocumentsSettings.ascx.vb

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Imports System.IO
2222
Imports System.Web
2323
Imports DotNetNuke.Modules.Documents.DocumentController
24+
Imports DotNetNuke.Services.FileSystem
2425

2526
Namespace DotNetNuke.Modules.Documents
2627

@@ -161,8 +162,8 @@ Namespace DotNetNuke.Modules.Documents
161162

162163
Sub LoadFolders()
163164
cboDefaultFolder.Items.Clear()
164-
165-
For Each objFolder As DotNetNuke.Services.FileSystem.FolderInfo In FileSystemUtils.GetFoldersByUser(PortalId, True, True, "READ, WRITE")
165+
166+
For Each objFolder As DotNetNuke.Services.FileSystem.FolderInfo In FolderManager.Instance.GetFolders(PortalId, "READ, WRITE", UserId)
166167
Dim FolderItem As New Web.UI.WebControls.ListItem
167168

168169
If objFolder.FolderPath = Null.NullString Then

0 commit comments

Comments
 (0)