diff --git a/DNN Platform/Website/admin/Skins/Privacy.ascx.cs b/DNN Platform/Website/admin/Skins/Privacy.ascx.cs index 32d6f4a20d1..a1c5b9ddaa6 100644 --- a/DNN Platform/Website/admin/Skins/Privacy.ascx.cs +++ b/DNN Platform/Website/admin/Skins/Privacy.ascx.cs @@ -1,73 +1,75 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.Skins.Controls -{ - using System; +namespace DotNetNuke.UI.Skins.Controls +{ + using System; - using DotNetNuke.Abstractions; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; using Microsoft.Extensions.DependencyInjection; - /// ----------------------------------------------------------------------------- - /// - /// - /// - /// ----------------------------------------------------------------------------- - public partial class Privacy : SkinObjectBase - { - private const string MyFileName = "Privacy.ascx"; - private readonly INavigationManager _navigationManager; - - public Privacy() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public string Text { get; set; } - - public string CssClass { get; set; } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.InitializeComponent(); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - try - { - if (!string.IsNullOrEmpty(this.CssClass)) - { - this.hypPrivacy.CssClass = this.CssClass; - } - - if (!string.IsNullOrEmpty(this.Text)) - { - this.hypPrivacy.Text = this.Text; - } - else - { - this.hypPrivacy.Text = Localization.GetString("Privacy", Localization.GetResourceFile(this, MyFileName)); - } - - this.hypPrivacy.NavigateUrl = this.PortalSettings.PrivacyTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Privacy") : this._navigationManager.NavigateURL(this.PortalSettings.PrivacyTabId); - this.hypPrivacy.Attributes["rel"] = "nofollow"; - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - private void InitializeComponent() - { - } - } -} + /// ----------------------------------------------------------------------------- + /// + /// + /// + /// ----------------------------------------------------------------------------- + public partial class Privacy : SkinObjectBase + { + private const string MyFileName = "Privacy.ascx"; + private readonly INavigationManager _navigationManager; + + public Privacy() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public string Text { get; set; } + + public string CssClass { get; set; } + + public string Rel { get; set; } = "nofollow"; + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + try + { + if (!string.IsNullOrEmpty(this.CssClass)) + { + this.hypPrivacy.CssClass = this.CssClass; + } + + if (!string.IsNullOrEmpty(this.Text)) + { + this.hypPrivacy.Text = this.Text; + } + else + { + this.hypPrivacy.Text = Localization.GetString("Privacy", Localization.GetResourceFile(this, MyFileName)); + } + + this.hypPrivacy.NavigateUrl = this.PortalSettings.PrivacyTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Privacy") : this._navigationManager.NavigateURL(this.PortalSettings.PrivacyTabId); + this.hypPrivacy.Attributes["rel"] = this.Rel; + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + private void InitializeComponent() + { + } + } +} diff --git a/DNN Platform/Website/admin/Skins/Terms.ascx.cs b/DNN Platform/Website/admin/Skins/Terms.ascx.cs index 4203f569e18..338c86b305f 100644 --- a/DNN Platform/Website/admin/Skins/Terms.ascx.cs +++ b/DNN Platform/Website/admin/Skins/Terms.ascx.cs @@ -1,74 +1,75 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.UI.Skins.Controls -{ - using System; +namespace DotNetNuke.UI.Skins.Controls +{ + using System; - using DotNetNuke.Abstractions; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; + using DotNetNuke.Abstractions; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; using Microsoft.Extensions.DependencyInjection; - /// ----------------------------------------------------------------------------- - /// - /// - /// - /// ----------------------------------------------------------------------------- - public partial class Terms : SkinObjectBase - { - private const string MyFileName = "Terms.ascx"; - private readonly INavigationManager _navigationManager; - - public Terms() - { - this._navigationManager = Globals.DependencyProvider.GetRequiredService(); - } - - public string Text { get; set; } - - public string CssClass { get; set; } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.InitializeComponent(); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - try - { - if (!string.IsNullOrEmpty(this.CssClass)) - { - this.hypTerms.CssClass = this.CssClass; - } - - if (!string.IsNullOrEmpty(this.Text)) - { - this.hypTerms.Text = this.Text; - } - else - { - this.hypTerms.Text = Localization.GetString("Terms", Localization.GetResourceFile(this, MyFileName)); - } - - this.hypTerms.NavigateUrl = this.PortalSettings.TermsTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Terms") : this._navigationManager.NavigateURL(this.PortalSettings.TermsTabId); - - this.hypTerms.Attributes["rel"] = "nofollow"; - } - catch (Exception exc) - { - Exceptions.ProcessModuleLoadException(this, exc); - } - } - - private void InitializeComponent() - { - } - } -} + /// ----------------------------------------------------------------------------- + /// + /// + /// + /// ----------------------------------------------------------------------------- + public partial class Terms : SkinObjectBase + { + private const string MyFileName = "Terms.ascx"; + private readonly INavigationManager _navigationManager; + + public Terms() + { + this._navigationManager = Globals.DependencyProvider.GetRequiredService(); + } + + public string Text { get; set; } + + public string CssClass { get; set; } + + public string Rel { get; set; } = "nofollow"; + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + try + { + if (!string.IsNullOrEmpty(this.CssClass)) + { + this.hypTerms.CssClass = this.CssClass; + } + + if (!string.IsNullOrEmpty(this.Text)) + { + this.hypTerms.Text = this.Text; + } + else + { + this.hypTerms.Text = Localization.GetString("Terms", Localization.GetResourceFile(this, MyFileName)); + } + + this.hypTerms.NavigateUrl = this.PortalSettings.TermsTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Terms") : this._navigationManager.NavigateURL(this.PortalSettings.TermsTabId); + this.hypTerms.Attributes["rel"] = this.Rel; + } + catch (Exception exc) + { + Exceptions.ProcessModuleLoadException(this, exc); + } + } + + private void InitializeComponent() + { + } + } +}