Skip to content

Commit

Permalink
Replaced deprecated APIs usages, closes #33
Browse files Browse the repository at this point in the history
  • Loading branch information
valadas committed Sep 22, 2018
1 parent e021791 commit d71cdc5
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 16 deletions.
2 changes: 1 addition & 1 deletion AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:

<Assembly: AssemblyVersion("07.00.00.03")>
<Assembly: AssemblyVersion("07.00.00.12")>

<Assembly: AssemblyFileVersion("07.00.00.00")>
<Assembly: ComVisibleAttribute(False)>
12 changes: 7 additions & 5 deletions Components/Configuration.vb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
'


Imports DotNetNuke.Entities.Portals

Namespace DotNetNuke.Modules.Feedback

Public Class Configuration
Expand Down Expand Up @@ -460,7 +462,7 @@ Namespace DotNetNuke.Modules.Feedback
Return _duplicateSubmission
End Get
Set(ByVal value As Boolean)
_DuplicateSubmission = value
_duplicateSubmission = value
End Set
End Property

Expand Down Expand Up @@ -760,10 +762,10 @@ Namespace DotNetNuke.Modules.Feedback

Public Sub New(ByVal moduleId As Integer)
_moduleId = moduleId
_portalSettings = Entities.Portals.PortalController.GetCurrentPortalSettings()
_portalSettings = Entities.Portals.PortalController.Instance.GetCurrentPortalSettings()
_portalID = _portalSettings.PortalId
Dim mc As New Entities.Modules.ModuleController
Dim moduleSettings As Hashtable = mc.GetModuleSettings(_moduleId)
Dim moduleSettings As Hashtable = Entities.Modules.ModuleController.Instance.GetModule(moduleId, Null.NullInteger, False).ModuleSettings

'Merge the TabModuleSettings and ModuleSettings
_settings = New Hashtable
Expand All @@ -779,7 +781,7 @@ Namespace DotNetNuke.Modules.Feedback
_moduleId = moduleid
_portalID = portalid
Dim mc As New Entities.Modules.ModuleController
Dim moduleSettings As Hashtable = mc.GetModuleSettings(_moduleId)
Dim moduleSettings As Hashtable = Entities.Modules.ModuleController.Instance.GetModule(moduleid, Null.NullInteger, False).ModuleSettings
'Merge the TabModuleSettings and ModuleSettings
_settings = New Hashtable

Expand All @@ -792,7 +794,7 @@ Namespace DotNetNuke.Modules.Feedback

Public Sub New(ByVal moduleId As Integer, ByVal settings As Hashtable)
_moduleId = moduleId
_portalSettings = Entities.Portals.PortalController.GetCurrentPortalSettings()
_portalSettings = PortalController.Instance.GetCurrentPortalSettings()
_portalID = _portalSettings.PortalId
_settings = settings

Expand Down
5 changes: 3 additions & 2 deletions Components/ConfigurationView.vb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ Namespace DotNetNuke.Modules.Feedback
Public Sub New(ByVal moduleId As Integer, ByVal tabModuleID As Integer)
_moduleID = moduleId
_tabModuleID = TabModuleID
Dim mi As ModuleInfo = ModuleController.Instance.GetModule(moduleId, Null.NullInteger, True)
Dim mc As New ModuleController
_allsettings = mc.GetModuleSettings(_moduleID)
_allTabsettings = mc.GetTabModuleSettings(_tabModuleID)
_allsettings = mi.ModuleSettings
_allTabsettings = ModuleController.Instance.GetTabModule(tabModuleID).ModuleSettings

ReadValue(_allsettings, "Feedback_EnablePager", EnablePager)
ReadValue(_allsettings, "Feedback_DefaultPageSize", DefaultPageSize)
Expand Down
4 changes: 2 additions & 2 deletions Components/FeedbackEmail.vb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Namespace DotNetNuke.Modules.Feedback
End Property

Public Sub New()
_portalSettings = Entities.Portals.PortalController.GetCurrentPortalSettings()
_portalSettings = Entities.Portals.PortalController.Instance.GetCurrentPortalSettings()
_recipients = New Generic.List(Of String)
End Sub

Expand Down Expand Up @@ -219,7 +219,7 @@ Namespace DotNetNuke.Modules.Feedback
AddUserToRecipients(uid)
Else
Dim rc As New DotNetNuke.Security.Roles.RoleController
For Each user As UserInfo In rc.GetUsersByRoleName(_portalSettings.PortalId, roleName)
For Each user As UserInfo In DotNetNuke.Security.Roles.RoleController.Instance.GetUsersByRole(_portalSettings.PortalId, roleName)
AddUserToRecipients(user.UserID)
Next
End If
Expand Down
4 changes: 2 additions & 2 deletions Components/Utilities.vb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ Namespace DotNetNuke.Modules.Feedback

Try
'Get the portalTimeZone as a fallback
Dim portalTimeZone As TimeZoneInfo = PortalController.GetCurrentPortalSettings.TimeZone
Dim portalTimeZone As TimeZoneInfo = PortalController.Instance.GetCurrentPortalSettings().TimeZone

'Get the userTime based on user profile preference if user is authenticated
If System.Web.HttpContext.Current.Request.IsAuthenticated Then
Dim objUser As UserInfo = UserController.GetCurrentUserInfo
Dim objUser As UserInfo = UserController.Instance.GetCurrentUserInfo()
Dim userTimeZone As TimeZoneInfo = objUser.Profile.PreferredTimeZone
result = TimeZoneInfo.ConvertTimeFromUtc(value, userTimeZone)
Else
Expand Down
4 changes: 2 additions & 2 deletions Moderation.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Imports System.Text.RegularExpressions
Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Security
Imports DotNetNuke.UI.Skins

Imports DotNetNuke.Framework.JavaScriptLibraries

Namespace DotNetNuke.Modules.Feedback

Expand Down Expand Up @@ -221,7 +221,7 @@ Namespace DotNetNuke.Modules.Feedback
Localization.LocalizeDataGrid(dgPendingFeedback, Configuration.SharedResources)
Localization.LocalizeDataGrid(dgSpamFeedback, Configuration.SharedResources)

jQuery.RequestDnnPluginsRegistration()
JavaScript.RequestRegistration(CommonJs.DnnPlugins)

End Sub

Expand Down
2 changes: 1 addition & 1 deletion ViewComments.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Namespace DotNetNuke.Modules.Feedback
If .Controls(0).HasControls Then
Dim litControl As System.Web.UI.LiteralControl = CType(e.Item.Controls(0).Controls(0), System.Web.UI.LiteralControl)
Dim tr As New FeedbackTokenReplace(CType(e.Item.DataItem, FeedbackInfo), Configuration.SharedResources)
tr.AccessingUser = UserController.GetCurrentUserInfo
tr.AccessingUser = UserController.Instance.GetCurrentUserInfo()
tr.DebugMessages = Not (PortalSettings.UserMode = Entities.Portals.PortalSettings.Mode.View)
tr.ModuleId = ModuleId
litControl.Text = tr.ReplaceFeedbackTokens(litControl.Text)
Expand Down
2 changes: 1 addition & 1 deletion _buildfiles/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0.3
7.0.0.12
81 changes: 81 additions & 0 deletions bin/DotNetNuke.Modules.Feedback.xml

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

0 comments on commit d71cdc5

Please sign in to comment.