Skip to content

Commit

Permalink
DNN-18172: clean build warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhfish authored and tpluscode committed Mar 19, 2018
1 parent b27c005 commit 9fc41fe
Show file tree
Hide file tree
Showing 51 changed files with 243 additions and 42 deletions.
6 changes: 4 additions & 2 deletions Build/BuildScripts/Module.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild" DependsOnTargets="CopyBin;GetFiles;DebugProject;Package">
<Target Name="AfterBuild" DependsOnTargets="CopyBin;GetFiles;UpdateFiles;DebugProject;Package">
</Target>
<Target Name="GetFiles">
<ItemGroup>
Expand Down Expand Up @@ -52,5 +52,7 @@
<Copy SourceFiles="@(Views)" DestinationFolder="$(ModuleFolderName)/Views" />
<Copy SourceFiles="@(MVCViews)" DestinationFolder="$(ModuleFolderName)/Views/%(RecursiveDir)" />
<Copy SourceFiles="@(MVCConfig)" DestinationFolder="$(ModuleFolderName)/Views" />
</Target>
</Target>
<Target Name="UpdateFiles">
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
<ItemGroup>
<Content Include="App_LocalResources\Settings.ascx.resx" />
</ItemGroup>
<ItemGroup>
<Content Include="web.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Admin Modules/Dnn.Modules.Console/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Admin Modules/Dnn.Modules.Console/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@
<Content Include="Templates\C#\Module - Razor\_template.cshtml" />
<Content Include="Templates\VB\Module - Razor\_template.vbhtml" />
</ItemGroup>
<ItemGroup>
<Content Include="web.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@
@(Keys);@(Services);@(RootConfig);@(ConfigFiles);@(Templates);@(DataFiles);@(SharedScripts);@(Controls);@(Views);@(MVCViews); @(MVCConfig)" />
</ItemGroup>
</Target>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\ClientDependency.Core.XML</DocumentationFile>
<NoWarn>1591,1573</NoWarn>
<NoWarn>1591,1573,618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -40,7 +40,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\ClientDependency.Core.XML</DocumentationFile>
<NoWarn>1591,1573</NoWarn>
<NoWarn>1591,1573,618</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
4 changes: 3 additions & 1 deletion DNN Platform/Dnn.AuthServices.Jwt/Dnn.Jwt.dnn
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
</component>
<component type="Script">
<scripts>
<basePath>DesktopModules\AuthenticationServices\JWTAuth\Data\Scripts</basePath>
<basePath>DesktopModules\AuthenticationServices\JWTAuth</basePath>
<script type="Install">
<path>Data\Scripts</path>
<name>01.00.00.SqlDataProvider</name>
<version>01.00.00</version>
</script>
<script type="UnInstall">
<path>Data\Scripts</path>
<name>Uninstall.SqlDataProvider</name>
<version>01.00.00</version>
</script>
Expand Down
8 changes: 1 addition & 7 deletions DNN Platform/Dnn.AuthServices.Jwt/Library.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
<ModuleFolderName>$(WebsitePath)\DesktopModules\AuthenticationServices\JWTAuth</ModuleFolderName>
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Target Name="AfterBuild" DependsOnTargets="CopyBin;GetFiles;Package" />
<Target Name="GetFiles">
<CreateItem Include="**\*.sqldataprovider">
<Output TaskParameter="Include" ItemName="SqlDataProviderFiles" />
</CreateItem>
<Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
</Target>
<Target Name="AfterBuild" DependsOnTargets="CopyBin;Package" />
<Target Name="CopyBin">
<Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).dll" DestinationFolder="$(WebsitePath)/bin" />
<Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).pdb" DestinationFolder="$(WebsitePath)/bin" />
Expand Down
8 changes: 4 additions & 4 deletions DNN Platform/Library/Entities/Portals/PortalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,19 +1394,19 @@ private void ParsePortalSettings(XmlNode nodeSettings, int portalId)

if (!String.IsNullOrEmpty(XmlUtils.GetNodeValue(nodeSettings, "skinsrc", "")))
{
UpdatePortalSetting(portalId, "DefaultPortalSkin", XmlUtils.GetNodeValue(nodeSettings, "skinsrc", ""), currentCulture);
UpdatePortalSetting(portalId, "DefaultPortalSkin", XmlUtils.GetNodeValue(nodeSettings, "skinsrc", ""), true, currentCulture);
}
if (!String.IsNullOrEmpty(XmlUtils.GetNodeValue(nodeSettings, "skinsrcadmin", "")))
{
UpdatePortalSetting(portalId, "DefaultAdminSkin", XmlUtils.GetNodeValue(nodeSettings, "skinsrcadmin", ""), currentCulture);
UpdatePortalSetting(portalId, "DefaultAdminSkin", XmlUtils.GetNodeValue(nodeSettings, "skinsrcadmin", ""), true, currentCulture);
}
if (!String.IsNullOrEmpty(XmlUtils.GetNodeValue(nodeSettings, "containersrc", "")))
{
UpdatePortalSetting(portalId, "DefaultPortalContainer", XmlUtils.GetNodeValue(nodeSettings, "containersrc", ""), currentCulture);
UpdatePortalSetting(portalId, "DefaultPortalContainer", XmlUtils.GetNodeValue(nodeSettings, "containersrc", ""), true, currentCulture);
}
if (!String.IsNullOrEmpty(XmlUtils.GetNodeValue(nodeSettings, "containersrcadmin", "")))
{
UpdatePortalSetting(portalId, "DefaultAdminContainer", XmlUtils.GetNodeValue(nodeSettings, "containersrcadmin", ""), currentCulture);
UpdatePortalSetting(portalId, "DefaultAdminContainer", XmlUtils.GetNodeValue(nodeSettings, "containersrcadmin", ""), true, currentCulture);
}

//Enable Skin Widgets Setting
Expand Down
1 change: 0 additions & 1 deletion DNN Platform/Library/Entities/Urls/RewriteController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ internal static string GetTabFromDictionary(string url, NameValueCollection quer
int maxTabPathDepth;
int minAliasPathDepth;
int minTabPathDepth;
bool triedFixingSubdomain = false;
int curAliasPathDepth = 0;

var tabDict = TabIndexController.FetchTabDictionary(result.PortalId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public string IPAddress
{
get
{
return GetIPAddress();
var controller = UserRequestIPAddressController.Instance;
var request = new HttpRequestWrapper(HttpContext.Current.Request);
return controller.GetUserRequestIPAddress(request); ;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public bool Validate(Stream fileContent)

return PortalSecurity.Instance.ValidateInput(svgContent, PortalSecurity.FilterFlag.NoScripting);
}
catch (Exception ex)
catch (Exception)
{
//when there have exception occur, just return false as not validated, no need log the error.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using DotNetNuke.Entities.Portals;
using DotNetNuke.Services.GeneratedImage.ImageQuantization;
using DotNetNuke.Services.Log.EventLog;
using DotNetNuke.Services.UserRequest;

namespace DotNetNuke.Services.GeneratedImage
{
Expand Down Expand Up @@ -144,7 +145,7 @@ public void HandleImageRequest(HttpContextBase context, Func<NameValueCollection
{
context.Response.Clear();

string ipAddress = IPCount.GetVisitorIPAddress(context);
string ipAddress = UserRequestIPAddressController.Instance.GetUserRequestIPAddress(context.Request);

// Check if allowed standalone
if (!AllowStandalone && context.Request.UrlReferrer == null && !context.Request.IsLocal)
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Library/Services/Installer/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ public static bool TryToCreateAndExecute(string path, Action<FileStream> action,
break;
}
}
catch (IOException ex)
catch (IOException)
{
// Init only once and only if needed. Prevent against many instantiation in case of multhreaded
// file access concurrency (if file is frequently accessed by someone else). Better memory usage.
Expand Down
8 changes: 4 additions & 4 deletions DNN Platform/Library/UI/Skins/SkinController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public static void SetSkin(string skinRoot, int portalId, SkinType skinType, str
}
else
{
PortalController.UpdatePortalSetting(portalId, "DefaultAdminSkin", skinSrc, selectedCultureCode);
PortalController.UpdatePortalSetting(portalId, "DefaultAdminSkin", skinSrc, true, selectedCultureCode);
}
}
else
Expand All @@ -389,7 +389,7 @@ public static void SetSkin(string skinRoot, int portalId, SkinType skinType, str
}
else
{
PortalController.UpdatePortalSetting(portalId, "DefaultPortalSkin", skinSrc, selectedCultureCode);
PortalController.UpdatePortalSetting(portalId, "DefaultPortalSkin", skinSrc, true, selectedCultureCode);
}
}
break;
Expand All @@ -402,7 +402,7 @@ public static void SetSkin(string skinRoot, int portalId, SkinType skinType, str
}
else
{
PortalController.UpdatePortalSetting(portalId, "DefaultAdminContainer", skinSrc, selectedCultureCode);
PortalController.UpdatePortalSetting(portalId, "DefaultAdminContainer", skinSrc, true, selectedCultureCode);
}
}
else
Expand All @@ -413,7 +413,7 @@ public static void SetSkin(string skinRoot, int portalId, SkinType skinType, str
}
else
{
PortalController.UpdatePortalSetting(portalId, "DefaultPortalContainer", skinSrc, selectedCultureCode);
PortalController.UpdatePortalSetting(portalId, "DefaultPortalContainer", skinSrc, true, selectedCultureCode);
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
</None>
<Content Include="Module.build" />
<Content Include="packages.config" />
<Content Include="web.config" />
</ItemGroup>
<ItemGroup>
<Content Include="ie-messages.css" />
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Modules/CoreMessaging/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Modules/CoreMessaging/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="web.config" />
</ItemGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Modules/DigitalAssets/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Modules/DigitalAssets/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
<None Include="module.css" />
<None Include="ReleaseNotes.txt" />
<None Include="License.txt" />
<Content Include="web.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Create.ascx" />
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Modules/Groups/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Modules/Groups/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
1 change: 1 addition & 0 deletions DNN Platform/Modules/HTML/DotNetNuke.Modules.Html.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
<None Include="Providers\DataProviders\SqlDataProvider\06.01.00.SqlDataProvider" />
<None Include="Providers\DataProviders\SqlDataProvider\Uninstall.SqlDataProvider" />
<None Include="Providers\DataProviders\SqlDataProvider\Upgrade.SqlDataProvider" />
<Content Include="web.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DotNetNuke.Web\DotNetNuke.Web.csproj">
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Modules/HTML/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions DNN Platform/Modules/HTML/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<Content Include="Images\HtmlEditorManager_Standard_16x16.png" />
<Content Include="packages.config" />
<Content Include="Module.build" />
<Content Include="web.config" />
</ItemGroup>
<ItemGroup>
<Content Include="license.txt" />
Expand Down
5 changes: 5 additions & 0 deletions DNN Platform/Modules/HtmlEditorManager/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</PropertyGroup>
<Import Project="$(BuildScriptsPath)\Package.Targets" />
<Import Project="$(BuildScriptsPath)\Module.Build"/>
<Target Name="UpdateFiles">
<ItemGroup>
<Resources Remove="web.config" />
</ItemGroup>
</Target>
</Project>
Loading

0 comments on commit 9fc41fe

Please sign in to comment.