Skip to content

Commit

Permalink
Merge pull request #1 from donker/mailprovider
Browse files Browse the repository at this point in the history
Deactivate the normal SMTP settings screen in the personabar
  • Loading branch information
meetmandeep authored Aug 20, 2020
2 parents 8e4a3e4 + da29b59 commit 132e5d9
Show file tree
Hide file tree
Showing 13 changed files with 422 additions and 292 deletions.
24 changes: 12 additions & 12 deletions DNN Platform/Library/Framework/Providers/Provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ namespace DotNetNuke.Framework.Providers

public class Provider
{
private readonly NameValueCollection _ProviderAttributes = new NameValueCollection();
private readonly string _ProviderName;
private readonly string _ProviderType;
private readonly NameValueCollection providerAttributes = new NameValueCollection();
private readonly string providerName;
private readonly string providerType;

public Provider(XmlAttributeCollection Attributes)
public Provider(XmlAttributeCollection attributes)
{
// Set the name of the provider
this._ProviderName = Attributes["name"].Value;
this.providerName = attributes["name"].Value;

// Set the type of the provider
this._ProviderType = Attributes["type"].Value;
this.providerType = attributes["type"].Value;

// Store all the attributes in the attributes bucket
foreach (XmlAttribute Attribute in Attributes)
foreach (XmlAttribute attribute in attributes)
{
if (Attribute.Name != "name" && Attribute.Name != "type")
if (attribute.Name != "name" && attribute.Name != "type")
{
this._ProviderAttributes.Add(Attribute.Name, Attribute.Value);
this.providerAttributes.Add(attribute.Name, attribute.Value);
}
}
}
Expand All @@ -34,23 +34,23 @@ public string Name
{
get
{
return this._ProviderName;
return this.providerName;
}
}

public string Type
{
get
{
return this._ProviderType;
return this.providerType;
}
}

public NameValueCollection Attributes
{
get
{
return this._ProviderAttributes;
return this.providerAttributes;
}
}
}
Expand Down
15 changes: 10 additions & 5 deletions DNN Platform/Library/Framework/Providers/ProviderConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,28 @@ namespace DotNetNuke.Framework.Providers

public class ProviderConfiguration
{
private readonly Hashtable _Providers = new Hashtable();
private string _DefaultProvider;
private readonly Hashtable providers = new Hashtable();
private string defaultProvider;

public string DefaultProvider
{
get
{
return this._DefaultProvider;
return this.defaultProvider;
}
}

public Hashtable Providers
{
get
{
return this._Providers;
return this.providers;
}
}

public Provider GetDefaultProvider()
{
return (Provider)this.providers[this.defaultProvider];
}

public static ProviderConfiguration GetProviderConfiguration(string strProvider)
Expand All @@ -39,7 +44,7 @@ internal void LoadValuesFromConfigurationXml(XmlNode node)
XmlAttributeCollection attributeCollection = node.Attributes;

// Get the default provider
this._DefaultProvider = attributeCollection["defaultProvider"].Value;
this.defaultProvider = attributeCollection["defaultProvider"].Value;

// Read child nodes
foreach (XmlNode child in node.ChildNodes)
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Tests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
<mail defaultProvider="CoreMailProvider">
<providers>
<clear />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" hideCoreSettings="False" />
</providers>
</mail>
</dotnetnuke>
Expand Down
48 changes: 48 additions & 0 deletions DNN Platform/Website/DotNetNuke.Website.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3162,6 +3162,54 @@
<None Include="controls\CountryListBox\Data\GeoIP.dat" />
<None Include="development.config" />
<None Include="Documentation\TELERIK_EULA.pdf" />
<Content Include="Install\Config\04.06.00.config" />
<Content Include="Install\Config\04.07.00.config" />
<Content Include="Install\Config\04.08.00.config" />
<Content Include="Install\Config\04.09.00.config" />
<Content Include="Install\Config\05.01.00.config" />
<Content Include="Install\Config\05.02.00.config" />
<Content Include="Install\Config\05.02.01.config" />
<Content Include="Install\Config\05.03.00.config" />
<Content Include="Install\Config\05.05.00.config" />
<Content Include="Install\Config\05.06.00.config" />
<Content Include="Install\Config\05.06.01.config" />
<Content Include="Install\Config\05.06.03.config" />
<Content Include="Install\Config\06.00.00.config" />
<Content Include="Install\Config\06.01.00.config" />
<Content Include="Install\Config\06.01.01.config" />
<Content Include="Install\Config\06.02.00.config" />
<Content Include="Install\Config\07.00.00.config" />
<Content Include="Install\Config\07.00.05.config" />
<Content Include="Install\Config\07.00.06.config" />
<Content Include="Install\Config\07.01.01.config" />
<Content Include="Install\Config\07.01.02.config" />
<Content Include="Install\Config\07.02.00.config" />
<Content Include="Install\Config\07.02.01.config" />
<Content Include="Install\Config\07.03.00.config" />
<Content Include="Install\Config\07.04.01.config" />
<Content Include="Install\Config\08.00.00.01.config" />
<Content Include="Install\Config\08.00.00.02.config" />
<Content Include="Install\Config\08.00.00.03.config" />
<Content Include="Install\Config\08.00.00.12.config" />
<Content Include="Install\Config\08.00.00.22.config" />
<Content Include="Install\Config\08.00.00.26.config" />
<Content Include="Install\Config\08.00.00.30.config" />
<Content Include="Install\Config\08.00.04.config" />
<Content Include="Install\Config\09.00.01.config" />
<Content Include="Install\Config\09.01.00.config" />
<Content Include="Install\Config\09.01.01.config" />
<Content Include="Install\Config\09.02.00.config" />
<Content Include="Install\Config\09.03.00.config" />
<Content Include="Install\Config\09.04.00.config" />
<Content Include="Install\Config\09.05.00.config" />
<Content Include="Install\Config\09.06.00.config" />
<Content Include="Install\Config\09.06.02.config" />
<Content Include="Install\Config\09.07.00.config" />
<Content Include="Install\Config\09.08.00.config" />
<Content Include="Install\Config\BindingRedirect.config" />
<Content Include="Install\Config\Net35.config" />
<Content Include="Install\Config\Net40.config" />
<Content Include="Install\Config\RemoveBindingRedirect.config" />
<None Include="Install\Template\UserProfile.page.template" />
<None Include="jquery.min.map" />
<None Include="js\ClientAPICaps.config" />
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Website/Install/Config/09.08.00.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<mail defaultProvider="CoreMailProvider">
<providers>
<clear />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" hideCoreSettings="False" />
</providers>
</mail>
</node>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Website/development.config
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
<mail defaultProvider="CoreMailProvider">
<providers>
<clear />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" hideCoreSettings="False" />
</providers>
</mail>
</dotnetnuke>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Website/release.config
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
<mail defaultProvider="CoreMailProvider">
<providers>
<clear />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" />
<add name="CoreMailProvider" type="DotNetNuke.Services.Mail.CoreMailProvider, DotNetNuke" hideCoreSettings="False" />
</providers>
</mail>
</dotnetnuke>
Expand Down
Loading

0 comments on commit 132e5d9

Please sign in to comment.