diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d1364d6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+Installs/NewsArticles.00.09.11/
diff --git a/Controls/PostComment.ascx.vb b/Controls/PostComment.ascx.vb
index 3bb13c5..1603f4d 100755
--- a/Controls/PostComment.ascx.vb
+++ b/Controls/PostComment.ascx.vb
@@ -13,7 +13,7 @@ Namespace Ventrian.NewsArticles.Controls
#Region " Private Properties "
- Private ReadOnly Property ArticleModuleBase() As NewsArticleModuleBase
+ Private Overloads ReadOnly Property ArticleModuleBase() As NewsArticleModuleBase
Get
If (TypeOf Parent.Parent Is NewsArticleModuleBase) Then
Return CType(Parent.Parent, NewsArticleModuleBase)
diff --git a/Controls/UploadFiles.ascx.vb b/Controls/UploadFiles.ascx.vb
index 139502e..4630c3a 100755
--- a/Controls/UploadFiles.ascx.vb
+++ b/Controls/UploadFiles.ascx.vb
@@ -4,6 +4,8 @@ Imports DotNetNuke.Security
Imports Ventrian.NewsArticles.Base
Imports DotNetNuke.Entities.Portals
+Imports DotNetNuke.Security.Permissions
+Imports DotNetNuke.Services.FileSystem
Namespace Ventrian.NewsArticles.Controls
@@ -21,7 +23,7 @@ Namespace Ventrian.NewsArticles.Controls
#Region " Private Properties "
- Private ReadOnly Property ArticleModuleBase() As NewsArticleModuleBase
+ Private Overloads ReadOnly Property ArticleModuleBase() As NewsArticleModuleBase
Get
Return CType(Parent.Parent.Parent.Parent.Parent, NewsArticleModuleBase)
End Get
@@ -91,18 +93,19 @@ Namespace Ventrian.NewsArticles.Controls
drpUploadFilesFolder.Items.Clear()
- Dim folders As ArrayList = FileSystemUtils.GetFolders(ArticleModuleBase.PortalId)
+ Dim folders As IEnumerable(Of FolderInfo) = FolderManager.Instance.GetFolders(ArticleModuleBase.PortalId)
For Each folder As DotNetNuke.Services.FileSystem.FolderInfo In folders
If Not folder.IsProtected Then
+ Dim folderPermissions as FolderPermissionCollection = FolderPermissionController.GetFolderPermissionsCollectionByFolder(ArticleModuleBase.PortalId,folder.FolderPath)
Dim FolderItem As New ListItem()
If folder.FolderPath = Null.NullString Then
FolderItem.Text = ArticleModuleBase.GetSharedResource("Root")
- ReadRoles = FileSystemUtils.GetRoles("", ArticleModuleBase.PortalId, "READ")
- WriteRoles = FileSystemUtils.GetRoles("", ArticleModuleBase.PortalId, "WRITE")
+ ReadRoles = folderPermissions.ToString("READ")
+ WriteRoles = folderPermissions.ToString("WRITE")
Else
FolderItem.Text = folder.FolderPath
- ReadRoles = FileSystemUtils.GetRoles(FolderItem.Text, ArticleModuleBase.PortalId, "READ")
- WriteRoles = FileSystemUtils.GetRoles(FolderItem.Text, ArticleModuleBase.PortalId, "WRITE")
+ ReadRoles = folderPermissions.ToString("READ")
+ WriteRoles = folderPermissions.ToString("WRITE")
End If
FolderItem.Value = folder.FolderID
@@ -242,7 +245,7 @@ Namespace Ventrian.NewsArticles.Controls
End Sub
- Protected Sub cmdRefreshPhotos_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRefreshFiles.Click
+ Protected Sub cmdRefreshPhotos_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdRefreshFiles.Click
Try
@@ -409,7 +412,7 @@ Namespace Ventrian.NewsArticles.Controls
End Sub
- Protected Sub cmdAddExistingFile_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdAddExistingFile.Click
+ Protected Sub cmdAddExistingFile_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAddExistingFile.Click
Try
@@ -417,8 +420,7 @@ Namespace Ventrian.NewsArticles.Controls
If (ctlFile.Url.ToLower().StartsWith("fileid=")) Then
If (IsNumeric(ctlFile.Url.ToLower().Replace("fileid=", ""))) Then
Dim fileID As Integer = Convert.ToInt32(ctlFile.Url.ToLower().Replace("fileid=", ""))
- Dim objDnnFileController As New DotNetNuke.Services.FileSystem.FileController
- Dim objDnnFile As DotNetNuke.Services.FileSystem.FileInfo = objDnnFileController.GetFileById(fileID, ArticleModuleBase.PortalId)
+ Dim objDnnFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(fileID)
If (objDnnFile IsNot Nothing) Then
Dim objFileController As New FileController
@@ -455,7 +457,7 @@ Namespace Ventrian.NewsArticles.Controls
End Sub
- Protected Sub btUpload_Click(sender As Object, e As EventArgs)
+ Protected Sub btUpload_Click(sender As Object, e As System.EventArgs)
Dim objFileController As New FileController
Dim objPortalController As New PortalController()
diff --git a/Installs/NewsArticles.00.09.11.zip b/Installs/NewsArticles.00.09.11.zip
index a973135..57053e6 100755
Binary files a/Installs/NewsArticles.00.09.11.zip and b/Installs/NewsArticles.00.09.11.zip differ
diff --git a/LatestCommentsOptions.ascx.vb b/LatestCommentsOptions.ascx.vb
index b891ae2..c55ff23 100755
--- a/LatestCommentsOptions.ascx.vb
+++ b/LatestCommentsOptions.ascx.vb
@@ -2,6 +2,7 @@
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Security
+Imports DotNetNuke.Security.Permissions
Imports DotNetNuke.Services.Exceptions
Namespace Ventrian.NewsArticles
@@ -13,14 +14,13 @@ Namespace Ventrian.NewsArticles
Private Sub BindModules()
- Dim objDesktopModuleController As New DesktopModuleController
- Dim objDesktopModuleInfo As DesktopModuleInfo = objDesktopModuleController.GetDesktopModuleByModuleName("DnnForge - NewsArticles")
+ Dim objDesktopModuleInfo As DesktopModuleInfo = DesktopModuleController.GetDesktopModuleByModuleName("DnnForge - NewsArticles", PortalId)
If Not (objDesktopModuleInfo Is Nothing) Then
Dim objTabController As New TabController()
- Dim objTabs As ArrayList = objTabController.GetTabs(PortalId)
- For Each objTab As DotNetNuke.Entities.Tabs.TabInfo In objTabs
+ Dim objTabs As TabCollection = TabController.Instance.GetTabsByPortal(PortalId)
+ For Each objTab As DotNetNuke.Entities.Tabs.TabInfo In objTabs.Values
If Not (objTab Is Nothing) Then
If (objTab.IsDeleted = False) Then
Dim objModules As New ModuleController
@@ -28,7 +28,7 @@ Namespace Ventrian.NewsArticles
Dim objModule As ModuleInfo = pair.Value
If (objModule.IsDeleted = False) Then
If (objModule.DesktopModuleID = objDesktopModuleInfo.DesktopModuleID) Then
- If PortalSecurity.IsInRoles(objModule.AuthorizedEditRoles) = True And objModule.IsDeleted = False Then
+ If ModulePermissionController.CanEditModuleContent(objModule) = True And objModule.IsDeleted = False Then
Dim strPath As String = objTab.TabName
Dim objTabSelected As DotNetNuke.Entities.Tabs.TabInfo = objTab
While objTabSelected.ParentId <> Null.NullInteger
diff --git a/NewsSearchOptions.ascx.vb b/NewsSearchOptions.ascx.vb
index d72d729..a861d01 100755
--- a/NewsSearchOptions.ascx.vb
+++ b/NewsSearchOptions.ascx.vb
@@ -2,6 +2,7 @@
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Security
+Imports DotNetNuke.Security.Permissions
Imports DotNetNuke.Services.Exceptions
Namespace Ventrian.NewsArticles
@@ -14,13 +15,13 @@ Namespace Ventrian.NewsArticles
Private Sub BindModules()
Dim objDesktopModuleController As New DesktopModuleController
- Dim objDesktopModuleInfo As DesktopModuleInfo = objDesktopModuleController.GetDesktopModuleByModuleName("DnnForge - NewsArticles")
+ Dim objDesktopModuleInfo As DesktopModuleInfo = DesktopModuleController.GetDesktopModuleByModuleName("DnnForge - NewsArticles", PortalId)
If Not (objDesktopModuleInfo Is Nothing) Then
Dim objTabController As New TabController()
- Dim objTabs As ArrayList = objTabController.GetTabs(PortalId)
- For Each objTab As DotNetNuke.Entities.Tabs.TabInfo In objTabs
+ Dim objTabs As TabCollection = TabController.Instance.GetTabsByPortal(PortalId)
+ For Each objTab As TabInfo In objTabs.Values
If Not (objTab Is Nothing) Then
If (objTab.IsDeleted = False) Then
Dim objModules As New ModuleController
@@ -28,7 +29,7 @@ Namespace Ventrian.NewsArticles
Dim objModule As ModuleInfo = pair.Value
If (objModule.IsDeleted = False) Then
If (objModule.DesktopModuleID = objDesktopModuleInfo.DesktopModuleID) Then
- If PortalSecurity.IsInRoles(objModule.AuthorizedEditRoles) = True And objModule.IsDeleted = False Then
+ If ModulePermissionController.CanEditModuleContent(objModule) = True And objModule.IsDeleted = False Then
Dim strPath As String = objTab.TabName
Dim objTabSelected As TabInfo = objTab
While objTabSelected.ParentId <> Null.NullInteger
diff --git a/Ventrian.NewsArticles.vbproj.user b/Ventrian.NewsArticles.vbproj.user
index 42f45b9..8c01210 100755
--- a/Ventrian.NewsArticles.vbproj.user
+++ b/Ventrian.NewsArticles.vbproj.user
@@ -2,5 +2,31 @@
Debug|Any CPU
+ ShowAllFiles
+
+
+
+
+
+
+ CurrentPage
+ True
+ False
+ False
+ False
+
+
+
+
+
+
+
+
+ True
+ True
+
+
+
+
\ No newline at end of file
diff --git a/ViewArticle.ascx.vb b/ViewArticle.ascx.vb
index ed706e2..e59bfb4 100755
--- a/ViewArticle.ascx.vb
+++ b/ViewArticle.ascx.vb
@@ -8,6 +8,7 @@ Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Services.Localization
Imports System.Text
+Imports DotNetNuke.Security.Permissions
Imports Ventrian.NewsArticles.Base
Namespace Ventrian.NewsArticles
@@ -184,7 +185,8 @@ Namespace Ventrian.NewsArticles
Dim objModule As ModuleInfo = objModuleController.GetModule(objArticle.ModuleID, Me.TabId)
If Not (objModule Is Nothing) Then
- If (DotNetNuke.Security.PortalSecurity.IsInRoles(objModule.AuthorizedViewRoles) = False) Then
+ If (ModulePermissionController.CanViewModule(objModule) = False) Then
+ 'If (DotNetNuke.Security.PortalSecurity.IsInRoles(objModule.AuthorizedViewRoles) = False) Then
Response.Redirect(NavigateURL(Me.TabId), True)
End If
End If
diff --git a/ViewCategory.ascx.vb b/ViewCategory.ascx.vb
index cd8a775..f32745a 100755
--- a/ViewCategory.ascx.vb
+++ b/ViewCategory.ascx.vb
@@ -9,6 +9,7 @@ Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Services.Localization
Imports DotNetNuke.Security
+Imports DotNetNuke.Services.FileSystem
Imports Ventrian.NewsArticles.Base
@@ -138,8 +139,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
Dim objImage As New Image
@@ -158,8 +158,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
Dim objLiteral As New Literal
@@ -281,8 +280,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
@@ -582,8 +580,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
Dim objImage As New Image
@@ -602,8 +599,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
Dim objLiteral As New Literal
@@ -779,8 +775,7 @@ Namespace Ventrian.NewsArticles
If (objCategory.Image.Split("="c).Length = 2) Then
If (IsNumeric(objCategory.Image.Split("="c)(1))) Then
- Dim objFileController As New DotNetNuke.Services.FileSystem.FileController()
- Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = objFileController.GetFileById(Convert.ToInt32(objCategory.Image.Split("="c)(1)), PortalId)
+ Dim objFile As DotNetNuke.Services.FileSystem.FileInfo = FileManager.Instance.GetFile(Convert.ToInt32(objCategory.Image.Split("="c)(1)))
If (objFile IsNot Nothing) Then
diff --git a/ucApproveArticles.ascx.vb b/ucApproveArticles.ascx.vb
index eb8ed17..6674a96 100755
--- a/ucApproveArticles.ascx.vb
+++ b/ucApproveArticles.ascx.vb
@@ -116,7 +116,7 @@ Namespace Ventrian.NewsArticles
Dim objEmailTemplateController As New EmailTemplateController
If Not (objUser Is Nothing) Then
- objEmailTemplateController.SendFormattedEmail(Me.ModuleId, Common.GetArticleLink(objArticle, PortalSettings.ActiveTab, ArticleSettings, False), objArticle, EmailTemplateType.ArticleApproved, objUser.Membership.Email, ArticleSettings)
+ objEmailTemplateController.SendFormattedEmail(Me.ModuleId, Common.GetArticleLink(objArticle, PortalSettings.ActiveTab, ArticleSettings, False), objArticle, EmailTemplateType.ArticleApproved, objUser.Email, ArticleSettings)
End If
End If
diff --git a/ucApproveComments.ascx.vb b/ucApproveComments.ascx.vb
index 68527a8..24fed38 100755
--- a/ucApproveComments.ascx.vb
+++ b/ucApproveComments.ascx.vb
@@ -59,7 +59,7 @@ Namespace Ventrian.NewsArticles
Dim sendTo As String = ""
If Not (objUser Is Nothing) Then
- sendTo = objUser.Membership.Email
+ sendTo = objUser.Email
End If
objEventLog.AddLog("News Articles Email Failure", "Failure to send [Author Comment] to '" & sendTo & "' from '" & Me.PortalSettings.Email, PortalSettings, -1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)
End Try
diff --git a/ucImportFeed.ascx.vb b/ucImportFeed.ascx.vb
index e4ad273..c4c0c81 100755
--- a/ucImportFeed.ascx.vb
+++ b/ucImportFeed.ascx.vb
@@ -83,7 +83,7 @@ Namespace Ventrian.NewsArticles
End If
drpAutoExpire.SelectedValue = Convert.ToInt32(objFeed.AutoExpireUnit).ToString()
- Dim objUser As UserInfo = UserController.GetUser(PortalId, objFeed.UserID, True)
+ Dim objUser As UserInfo = UserController.Instance.GetUser(PortalId, objFeed.UserID)
If (objUser IsNot Nothing) Then
lblAuthor.Text = objUser.Username
Else
diff --git a/ucViewOptions.ascx.designer.vb b/ucViewOptions.ascx.designer.vb
index c81df54..4ab0bef 100755
--- a/ucViewOptions.ascx.designer.vb
+++ b/ucViewOptions.ascx.designer.vb
@@ -1859,15 +1859,6 @@ Namespace Ventrian.NewsArticles
'''
Protected WithEvents plWatermarkImage As Global.System.Web.UI.UserControl
- '''
- '''ctlWatermarkImage control.
- '''
- '''
- '''Auto-generated field.
- '''To modify move field declaration from designer file to code-behind file.
- '''
- Protected WithEvents ctlWatermarkImage As Global.System.Web.UI.UserControl
-
'''
'''plWatermarkPosition control.
'''
diff --git a/ucViewOptions.ascx.vb b/ucViewOptions.ascx.vb
index 5c296ff..eee81b6 100755
--- a/ucViewOptions.ascx.vb
+++ b/ucViewOptions.ascx.vb
@@ -25,6 +25,16 @@ Namespace Ventrian.NewsArticles
Partial Public Class ucViewOptions
Inherits NewsArticleModuleBase
+
+ '''
+ '''ctlWatermarkImage control.
+ '''
+ '''
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''
+ Protected WithEvents ctlWatermarkImage As DotNetNuke.UI.UserControls.UrlControl
+
#Region " Private Methods "
Public Class ListItemComparer