Skip to content

Commit

Permalink
fix build issues after upgrading references to dnn8 beta 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ohine committed Jan 5, 2016
1 parent 14890ea commit 0adb5da
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 32 deletions.
3 changes: 2 additions & 1 deletion Components/Services/FeedbackRouteMapper.vb
Expand Up @@ -20,14 +20,15 @@
Option Strict On
Option Explicit On

Imports DotNetNuke.Web.Api
Imports DotNetNuke.Web.Services

Namespace Components.Services

Public Class FeedbackRouteMapper
Implements IServiceRouteMapper
Public Sub RegisterRoutes(mapRouteManager As IMapRoute) Implements IServiceRouteMapper.RegisterRoutes
mapRouteManager.MapRoute("Feedback", "{controller}.ashx/{action}", New String() {"DotNetNuke.Modules.Feedback"})
mapRouteManager.MapHttpRoute("Feedback", "default", "{controller}.ashx/{action}", New String() {"DotNetNuke.Modules.Feedback"})
End Sub
End Class

Expand Down
24 changes: 12 additions & 12 deletions Components/Services/NotificationServiceController.vb
Expand Up @@ -20,16 +20,16 @@
Option Strict On
Option Explicit On

Imports DotNetNuke.Web.Services
Imports System.Web.Mvc
Imports DotNetNuke.Services.Social.Notifications
Imports DotNetNuke.Services.Social
Imports DotNetNuke.Modules.Feedback
Imports DotNetNuke.Web.Api
Imports System.Net.Http

Namespace Components.Services

Public Class NotificationServiceController
Inherits DnnController
Inherits DnnApiController

#Region "Private Members"
Private _moduleId As Integer = -1
Expand All @@ -42,44 +42,44 @@ Namespace Components.Services
#End Region

<DnnAuthorize()> _
Public Function ApproveFeedback(notificationId As Integer) As ActionResult
Public Function ApproveFeedback(notificationId As Integer) As HttpResponseMessage
Return ChangeStatus(notificationId, FeedbackInfo.FeedbackStatusType.StatusPublic)
End Function

<DnnAuthorize()> _
Public Function PrivateFeedback(notificationId As Integer) As ActionResult
Public Function PrivateFeedback(notificationId As Integer) As HttpResponseMessage
Return ChangeStatus(notificationId, FeedbackInfo.FeedbackStatusType.StatusPrivate)
End Function

<DnnAuthorize()> _
Public Function ArchiveFeedback(notificationId As Integer) As ActionResult
Public Function ArchiveFeedback(notificationId As Integer) As HttpResponseMessage
Return ChangeStatus(notificationId, FeedbackInfo.FeedbackStatusType.StatusArchive)
End Function

<DnnAuthorize()> _
Public Function DeleteFeedback(notificationId As Integer) As ActionResult
Public Function DeleteFeedback(notificationId As Integer) As HttpResponseMessage
Return ChangeStatus(notificationId, FeedbackInfo.FeedbackStatusType.StatusDelete)
End Function


#Region "Private Methods"
Private Function ChangeStatus(ByVal notificationid As Integer, ByVal feedbackStatus As FeedbackInfo.FeedbackStatusType) As ActionResult
Private Function ChangeStatus(ByVal notificationid As Integer, ByVal feedbackStatus As FeedbackInfo.FeedbackStatusType) As HttpResponseMessage
Dim recipient As Messaging.MessageRecipient = Messaging.Internal.InternalMessagingController.Instance.GetMessageRecipient(notificationid, UserInfo.UserID)
If recipient Is Nothing Then
Return Json(New With {.Result = "error", .Message = String.Format(Localization.GetString("NotificationRecipientError", LocalResourceFile), UserInfo.DisplayName)})
Return Request.CreateResponse(System.Net.HttpStatusCode.Accepted, Json(New With {.Result = "error", .Message = String.Format(Localization.GetString("NotificationRecipientError", LocalResourceFile), UserInfo.DisplayName)}))
End If

Dim notify As Notification = NotificationsController.Instance.GetNotification(notificationid)
ParseApproveKey(notify.Context)

If Not IsModerator() Then
Return Json(New With {.Result = "error", .Message = String.Format(Localization.GetString("NotificationSecurityError", LocalResourceFile), UserInfo.DisplayName)})
Return Request.CreateResponse(System.Net.HttpStatusCode.Accepted, Json(New With {.Result = "error", .Message = String.Format(Localization.GetString("NotificationSecurityError", LocalResourceFile), UserInfo.DisplayName)}))
End If

Dim objFeedbackUpdateController As New FeedbackUpdateController(_moduleId, _moduleConfiguration, PortalSettings, LocalResourceFile, UserInfo.UserID)
objFeedbackUpdateController.FeedbackUpdateStatus(_moduleId, _feedbackId, FeedbackStatus, notificationid)
objFeedbackUpdateController.FeedbackUpdateStatus(_moduleId, _feedbackId, feedbackStatus, notificationid)

Return Json(New With {.Result = "success"})
Return Request.CreateResponse(System.Net.HttpStatusCode.Accepted, Json(New With {.Result = "success"}))
End Function

Private Function IsModerator() As Boolean
Expand Down
16 changes: 4 additions & 12 deletions DotNetNuke.Modules.Feedback.sln
@@ -1,19 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DotNetNuke.Modules.Feedback", "DotNetNuke.Modules.Feedback.vbproj", "{2991ED17-6084-4568-9EEB-6AF3A7C6AF1E}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 1
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs03
SccProjectUniqueName0 = DotNetNuke.Modules.Feedback.vbproj
SccProjectName0 = .
SccAuxPath0 = https://tfs.codeplex.com/tfs/tfs03
SccLocalPath0 = .
SccProvider0 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down
46 changes: 41 additions & 5 deletions DotNetNuke.Modules.Feedback.vbproj
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
Expand Down Expand Up @@ -48,7 +49,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
Expand All @@ -75,6 +76,7 @@
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
<DebugType>full</DebugType>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\</OutputPath>
Expand All @@ -95,6 +97,7 @@
<NoWarn>42016,42017,42018,42019,42032,42353,42354,42355</NoWarn>
<DebugType>None</DebugType>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DotNetNuke">
Expand All @@ -105,6 +108,10 @@
<HintPath>..\..\bin\DotNetNuke.Web.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Web.Deprecated">
<HintPath>..\..\bin\DotNetNuke.Web.Deprecated.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.WebUtility, Version=4.2.0.185, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\DotNetNuke.WebUtility.dll</HintPath>
Expand All @@ -115,6 +122,9 @@
<HintPath>..\..\bin\Microsoft.ApplicationBlocks.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
Expand All @@ -125,15 +135,28 @@
<Reference Include="System.Drawing">
<Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web">
<Name>System.Web</Name>
</Reference>
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
</Reference>
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
Expand Down Expand Up @@ -401,6 +424,14 @@
<None Include="Installation\05.00.01.SqlDataProvider" />
<None Include="Installation\05.00.02.SqlDataProvider" />
<None Include="Installation\Uninstall.SqlDataProvider" />
<Content Include="web.config" />
<Content Include="packages.config" />
<None Include="web.Debug.config">
<DependentUpon>web.config</DependentUpon>
</None>
<None Include="web.Release.config">
<DependentUpon>web.config</DependentUpon>
</None>
<None Include="_buildfiles\MSBuild.Community.Tasks.Targets" />
<None Include="_buildfiles\PackageModule.targets">
<SubType>Designer</SubType>
Expand All @@ -409,6 +440,10 @@
<ItemGroup>
<Folder Include="My Project\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<Import Project="$(MSBuildProjectDirectory)\_buildfiles\MSBuild.Community.Tasks.targets" />
<Import Project="$(MSBuildProjectDirectory)\_buildfiles\PackageModule.targets" />
Expand All @@ -427,5 +462,6 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
</Project>
5 changes: 3 additions & 2 deletions Feedback.ascx
@@ -1,12 +1,13 @@
<%@ Control Language="vb" AutoEventWireup="false" Explicit="True" Codebehind="Feedback.ascx.vb" Inherits="DotNetNuke.Modules.Feedback.Feedback" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web.Deprecated" Namespace="DotNetNuke.Web.UI.WebControls" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>

<div id="divFeedbackForm" runat="server">
<div id="divFeedbackFormContent" runat="server">
<asp:ValidationSummary ID="valSummary" runat="server" CssClass="dnnFormMessage dnnFormValidationSummary"
EnableClientScript="true" DisplayMode="List" />
<h2 id="h2ContactInfo" runat="server" class="dnnFormSectionHead"><%=LocalizeString("plContactInfo")%></h2>
<h2 id="h2ContactInfo" runat="server" class="dnnFormSectionHead"><%: LocalizeString("plContactInfo")%></h2>
<fieldset>
<div id="divEmail" runat="server" class="Feedback_Field">
<div class="dnnFormItem">
Expand Down Expand Up @@ -89,7 +90,7 @@
</div>
</div>
</fieldset>
<h2 id="h2Feedback" runat="server" class="dnnFormSectionHead"><%=LocalizeString("plFeedback")%></h2>
<h2 id="h2Feedback" runat="server" class="dnnFormSectionHead"><%: LocalizeString("plFeedback")%></h2>
<fieldset>
<div id="divCategory" runat="Server" class="Feedback_Field">
<div class="dnnFormItem">
Expand Down
9 changes: 9 additions & 0 deletions Feedback.ascx.vb
Expand Up @@ -61,6 +61,15 @@ Namespace DotNetNuke.Modules.Feedback
Return CType(_isAdministrator, Boolean)
End Get
End Property

#End Region

#Region "Public Methods"

Public Shadows Function LocalizeString(keyName As String) As String
Return MyBase.LocalizeString(keyName)
End Function

#End Region

#Region "Private Methods"
Expand Down
8 changes: 8 additions & 0 deletions packages.config
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net451" />
</packages>

0 comments on commit 0adb5da

Please sign in to comment.