Skip to content

Commit

Permalink
Remaining obsoletes < DNN7
Browse files Browse the repository at this point in the history
  • Loading branch information
skamphuis committed Aug 13, 2018
1 parent b1bc838 commit df7ea0f
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Installs/NewsArticles.00.09.11/
2 changes: 1 addition & 1 deletion Controls/PostComment.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 13 additions & 11 deletions Controls/UploadFiles.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -409,16 +412,15 @@ 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

If (ctlFile.Url <> "") Then
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
Expand Down Expand Up @@ -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()

Expand Down
Binary file modified Installs/NewsArticles.00.09.11.zip
Binary file not shown.
10 changes: 5 additions & 5 deletions LatestCommentsOptions.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,22 +14,21 @@ 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
For Each pair As KeyValuePair(Of Integer, ModuleInfo) In objModules.GetTabModules(objTab.TabID)
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
Expand Down
9 changes: 5 additions & 4 deletions NewsSearchOptions.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,21 +15,21 @@ 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
For Each pair As KeyValuePair(Of Integer, ModuleInfo) In objModules.GetTabModules(objTab.TabID)
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
Expand Down
26 changes: 26 additions & 0 deletions Ventrian.NewsArticles.vbproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,31 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
4 changes: 3 additions & 1 deletion ViewArticle.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
19 changes: 7 additions & 12 deletions ViewCategory.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ucApproveArticles.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ucApproveComments.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ucImportFeed.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions ucViewOptions.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions ucViewOptions.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ Namespace Ventrian.NewsArticles
Partial Public Class ucViewOptions
Inherits NewsArticleModuleBase


'''<summary>
'''ctlWatermarkImage control.
'''</summary>
'''<remarks>
'''Auto-generated field.
'''To modify move field declaration from designer file to code-behind file.
'''</remarks>
Protected WithEvents ctlWatermarkImage As DotNetNuke.UI.UserControls.UrlControl

#Region " Private Methods "

Public Class ListItemComparer
Expand Down

0 comments on commit df7ea0f

Please sign in to comment.