Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows optionally removing rel from privacy and terms #5054

Merged
merged 8 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DNN Platform/Website/admin/Skins/Privacy.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public Privacy()

public string Text { get; set; }

public string CssClass { get; set; }
public string CssClass { get; set; }

public string Rel { get; set; }
Andy9999 marked this conversation as resolved.
Show resolved Hide resolved

protected override void OnInit(EventArgs e)
{
Expand Down Expand Up @@ -58,7 +60,6 @@ protected override void OnLoad(EventArgs e)
}

this.hypPrivacy.NavigateUrl = this.PortalSettings.PrivacyTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Privacy") : this._navigationManager.NavigateURL(this.PortalSettings.PrivacyTabId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.hypPrivacy.NavigateUrl = this.PortalSettings.PrivacyTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Privacy") : this._navigationManager.NavigateURL(this.PortalSettings.PrivacyTabId);
this.hypPrivacy.NavigateUrl = this.PortalSettings.PrivacyTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Privacy") : this._navigationManager.NavigateURL(this.PortalSettings.PrivacyTabId);
this.hypPrivacy.Attribute["rel"] = this.Rel;

this.hypPrivacy.Attributes["rel"] = "nofollow";
}
catch (Exception exc)
{
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/Website/admin/Skins/Terms.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public Terms()
public string Text { get; set; }

public string CssClass { get; set; }

public string Rel { get; set; }
Andy9999 marked this conversation as resolved.
Show resolved Hide resolved

protected override void OnInit(EventArgs e)
{
Expand Down Expand Up @@ -58,8 +60,6 @@ protected override void OnLoad(EventArgs e)
}

this.hypTerms.NavigateUrl = this.PortalSettings.TermsTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Terms") : this._navigationManager.NavigateURL(this.PortalSettings.TermsTabId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.hypTerms.NavigateUrl = this.PortalSettings.TermsTabId == Null.NullInteger ? this._navigationManager.NavigateURL(this.PortalSettings.ActiveTab.TabID, "Terms") : this._navigationManager.NavigateURL(this.PortalSettings.TermsTabId);
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;


this.hypTerms.Attributes["rel"] = "nofollow";
}
catch (Exception exc)
{
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Website/admin/Skins/privacy.ascx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Controls.Privacy" Codebehind="Privacy.ascx.cs" %>
<asp:hyperlink id="hypPrivacy" runat="server" cssclass="SkinObject" enableviewstate="False"></asp:hyperlink>
<asp:hyperlink id="hypPrivacy" runat="server" cssclass="SkinObject" enableviewstate="False" rel="nofollow"></asp:hyperlink>
Andy9999 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion DNN Platform/Website/admin/Skins/terms.ascx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<%@ Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Controls.Terms" Codebehind="Terms.ascx.cs" %>
<asp:hyperlink id="hypTerms" runat="server" cssclass="SkinObject" enableviewstate="False"></asp:hyperlink>
<asp:hyperlink id="hypTerms" runat="server" cssclass="SkinObject" enableviewstate="False" rel="nofollow"></asp:hyperlink>
Andy9999 marked this conversation as resolved.
Show resolved Hide resolved