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

Remove member with case-sensitive naming conflict #4397

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Changes from all commits
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
38 changes: 19 additions & 19 deletions DNN Platform/Library/Entities/Portals/PortalInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.Entities.Portals
{
using System;
Expand All @@ -19,7 +18,7 @@ namespace DotNetNuke.Entities.Portals

/// <summary>
/// PortalInfo provides a base class for Portal information
/// This class inherites from the <c>BaseEntityInfo</c> and is <c>Hydratable</c>.
/// This class inherits from the <c>BaseEntityInfo</c> and is <c>Hydratable</c>.
/// </summary>
/// <remarks><seealso cref="IHydratable"/>
/// <example>This example shows how the <c>PortalInfo</c> class is used to get physical file names
Expand Down Expand Up @@ -61,7 +60,6 @@ public class PortalInfo : BaseEntityInfo, IHydratable, IPortalInfo

/// <summary>
/// Initializes a new instance of the <see cref="PortalInfo"/> class.
/// Create new Portalinfo instance.
/// </summary>
/// <remarks>
/// <example>This example illustrates the creation of a new <c>PortalInfo</c> object
Expand Down Expand Up @@ -150,7 +148,7 @@ public string HomeSystemDirectoryMapPath
public string CultureCode { get; set; }

/// <summary>
/// Gets or sets curreny format that is used in the portal.
/// Gets or sets currency format that is used in the portal.
/// </summary>
/// <value>Currency of the portal.</value>
[Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0.")]
Expand Down Expand Up @@ -219,23 +217,23 @@ public string HomeSystemDirectoryMapPath

/// <inheritdoc />
[XmlElement("portalid")]
public int PortalId { get; set; }
int IPortalInfo.PortalId { get; set; }

[Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalInfo.PortalId instead.")]
public int PortalID
{
get => this.PortalId;
set => this.PortalId = value;
get => this.ThisAsInterface.PortalId;
set => this.ThisAsInterface.PortalId = value;
}

/// <inheritdoc />
public int PortalGroupId { get; set; }
int IPortalInfo.PortalGroupId { get; set; }

[Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalAliasInfo.HttpAlias instead.")]
[Obsolete("Deprecated in 9.7.2. Scheduled for removal in v11.0.0, use DotNetNuke.Abstractions.Portals.IPortalInfo.PortalGroupId instead.")]
public int PortalGroupID
{
get => this.PortalGroupId;
set => this.PortalGroupId = value;
get => this.ThisAsInterface.PortalGroupId;
set => this.ThisAsInterface.PortalGroupId = value;
}

/// <inheritdoc />
Expand Down Expand Up @@ -324,7 +322,7 @@ public int Users
{
if (this._users < 0)
{
this._users = UserController.GetUserCountByPortal(this.PortalID);
this._users = UserController.GetUserCountByPortal(this.ThisAsInterface.PortalId);
}

return this._users;
Expand All @@ -350,7 +348,7 @@ public string AdministratorRoleName
if (this._administratorRoleName == Null.NullString && this.AdministratorRoleId > Null.NullInteger)
{
// Get Role Name
RoleInfo adminRole = RoleController.Instance.GetRole(this.PortalID, r => r.RoleID == this.AdministratorRoleId);
RoleInfo adminRole = RoleController.Instance.GetRole(this.ThisAsInterface.PortalId, r => r.RoleID == this.AdministratorRoleId);
if (adminRole != null)
{
this._administratorRoleName = adminRole.RoleName;
Expand Down Expand Up @@ -378,7 +376,7 @@ public int Pages
{
if (this._pages < 0)
{
this._pages = TabController.Instance.GetUserTabsByPortal(this.PortalID).Count;
this._pages = TabController.Instance.GetUserTabsByPortal(this.ThisAsInterface.PortalId).Count;
}

return this._pages;
Expand All @@ -399,7 +397,7 @@ public string RegisteredRoleName
if (this._registeredRoleName == Null.NullString && this.RegisteredRoleId > Null.NullInteger)
{
// Get Role Name
RoleInfo regUsersRole = RoleController.Instance.GetRole(this.PortalID, r => r.RoleID == this.RegisteredRoleId);
RoleInfo regUsersRole = RoleController.Instance.GetRole(this.ThisAsInterface.PortalId, r => r.RoleID == this.RegisteredRoleId);
if (regUsersRole != null)
{
this._registeredRoleName = regUsersRole.RoleName;
Expand All @@ -424,15 +422,17 @@ public int KeyID
{
get
{
return this.PortalID;
return this.ThisAsInterface.PortalId;
}

set
{
this.PortalID = value;
this.ThisAsInterface.PortalId = value;
}
}

private IPortalInfo ThisAsInterface => this;

/// <summary>
/// Fills a PortalInfo from a Data Reader.
/// </summary>
Expand All @@ -441,11 +441,11 @@ public int KeyID
/// <seealso cref="KeyID"></seealso></remarks>
public void Fill(IDataReader dr)
{
this.PortalId = Null.SetNullInteger(dr["PortalID"]);
this.ThisAsInterface.PortalId = Null.SetNullInteger(dr["PortalID"]);

try
{
this.PortalGroupId = Null.SetNullInteger(dr["PortalGroupID"]);
this.ThisAsInterface.PortalGroupId = Null.SetNullInteger(dr["PortalGroupID"]);
}
catch (IndexOutOfRangeException)
{
Expand Down