Skip to content

Commit

Permalink
Merge pull request #5808 from dnnsoftware/update-10.0.0-5808
Browse files Browse the repository at this point in the history
Updates `release/10.0.0` with latest changes on `develop`
  • Loading branch information
valadas authored Sep 12, 2023
2 parents c47ae13 + 65f0a55 commit e4e1576
Show file tree
Hide file tree
Showing 87 changed files with 5,498 additions and 1,764 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Compress Images
id: compress_images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/open-merged-pr-to-future.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: peterjgrainger/[email protected]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updateVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/') }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get the release branch version
uses: valadas/[email protected]
Expand Down
14 changes: 7 additions & 7 deletions Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.BuildSystems.Module" Version="4.2.0" />
<PackageReference Include="Cake.FileHelpers" Version="5.0.0" />
<PackageReference Include="Cake.Frosting" Version="2.3.0" />
<PackageReference Include="Cake.Git" Version="2.0.0" />
<PackageReference Include="Cake.Issues" Version="2.0.0" />
<PackageReference Include="Cake.Issues.MsBuild" Version="2.0.0" />
<PackageReference Include="Cake.BuildSystems.Module" Version="5.0.0" />
<PackageReference Include="Cake.FileHelpers" Version="6.1.3" />
<PackageReference Include="Cake.Frosting" Version="3.1.0" />
<PackageReference Include="Cake.Git" Version="3.0.0" />
<PackageReference Include="Cake.Issues" Version="3.0.0" />
<PackageReference Include="Cake.Issues.MsBuild" Version="3.0.0" />
<PackageReference Include="Cake.Json" Version="7.0.1" />
<PackageReference Include="Cake.XdtTransform" Version="2.0.0" />
<PackageReference Include="Cake.Yarn" Version="0.4.8" />
<PackageReference Include="Cake.Yarn" Version="2.0.0" />
<PackageReference Include="Dnn.CakeUtils" Version="2.0.2" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.820" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion Build/Lifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace DotNetNuke.Build
public sealed class Lifetime : FrostingLifetime<Context>
{
/// <inheritdoc/>
public override void Setup(Context context)
public override void Setup(Context context, ISetupContext setupContext)
{
context.IsRunningInCI = context.HasEnvironmentVariable("TF_BUILD");
context.Information("Is Running in CI : {0}", context.IsRunningInCI);
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/JavaScript Libraries/jQuery/jQuery.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="jQuery" type="JavaScript_Library" version="03.05.01" isSystem="true">
<package name="jQuery" type="JavaScript_Library" version="03.07.01" isSystem="true">
<friendlyName>jQuery JavaScript Library</friendlyName>
<description>jQuery is a JavaScript library that is used to manipulate the Document Object Model (DOM).</description>
<iconFile>Icons\Sigma\Extensions_32x32_Standard.png</iconFile>
Expand All @@ -19,7 +19,7 @@
<libraryName>jQuery</libraryName>
<fileName>jquery.js</fileName>
<objectName>jQuery</objectName>
<CDNPath>https://code.jquery.com/jquery-3.5.1.min.js</CDNPath>
<CDNPath>https://code.jquery.com/jquery-3.7.1.min.js</CDNPath>
</javaScriptLibrary>
</component>
<component type="JavaScriptFile">
Expand Down
4 changes: 2 additions & 2 deletions DNN Platform/JavaScript Libraries/jQuery/jquery.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="jQuery-Migrate" type="JavaScript_Library" version="03.04.00" isSystem="true">
<package name="jQuery-Migrate" type="JavaScript_Library" version="03.04.01" isSystem="true">
<friendlyName>jQuery Migrate JavaScript Library</friendlyName>
<description>A development tool to help migrate away from APIs and features that have been or will be removed from jQuery core</description>
<iconFile>Icons\Sigma\Extensions_32x32_Standard.png</iconFile>
Expand All @@ -21,7 +21,7 @@
<javaScriptLibrary>
<libraryName>jQuery-Migrate</libraryName>
<fileName>jquery-migrate.js</fileName>
<CDNPath>https://code.jquery.com/jquery-migrate-3.4.0.min.js</CDNPath>
<CDNPath>https://code.jquery.com/jquery-migrate-3.4.1.min.js</CDNPath>
</javaScriptLibrary>
</component>
<component type="JavaScriptFile">
Expand Down

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions DNN Platform/Library/DotNetNuke.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,11 @@
<Compile Include="Services\Mail\MailInfo.cs" />
<Compile Include="Services\Mail\MailAttachment.cs" />
<Compile Include="Services\Mail\MailProvider.cs" />
<Compile Include="Services\Mail\OAuth\IOAuth2SmtpClient.cs" />
<Compile Include="Services\Mail\OAuth\ISmtpOAuthProvider.cs" />
<Compile Include="Services\Mail\OAuth\ISmtpOAuthController.cs" />
<Compile Include="Services\Mail\OAuth\SmtpOAuthController.cs" />
<Compile Include="Services\Mail\OAuth\SmtpOAuthSetting.cs" />
<Compile Include="Services\Mail\SmtpInfo.cs" />
<Compile Include="Services\OutputCache\Providers\DatabaseProvider.cs" />
<Compile Include="Services\OutputCache\Providers\DatabaseResponseFilter.cs" />
Expand Down
21 changes: 21 additions & 0 deletions DNN Platform/Library/Entities/Host/Host.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,27 @@ public static bool EnableSMTPSSL
}
}

/// -----------------------------------------------------------------------------
/// <summary>
/// Gets the currently configured SMTP OAuth provider if existing, for the current portal if portal SMTP enabled, otherwise for the installation.
/// </summary>
/// <remarks>
/// Defaults to empty string.
/// </remarks>
/// -----------------------------------------------------------------------------
public static string SMTPAuthProvider
{
get
{
if (SMTPPortalEnabled)
{
return PortalController.GetPortalSetting("SMTPAuthProvider", PortalSettings.Current.PortalId, string.Empty);
}

return HostController.Instance.GetString("SMTPAuthProvider", string.Empty);
}
}

/// <summary> Gets a value indicating whether gets whether the Event Log Buffer is Enabled.</summary>
/// <remarks>
/// Defaults to False.
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Library/Framework/jQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public partial class jQuery
/// Using the hosted version increases the likelihood that the file is already
/// cached in the user's browser.
/// </remarks>
public const string DefaultHostedUrl = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js";
public const string DefaultHostedUrl = "https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js";

public const string DefaultUIHostedUrl = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js";
private const string JQueryDebugFile = "~/Resources/Shared/Scripts/jquery/jquery.js";
Expand Down
1 change: 1 addition & 0 deletions DNN Platform/Library/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Web")]
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Web.Mvc")]
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Urls")]
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Mail")]
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Utilities")]
[assembly: InternalsVisibleTo("DotNetNuke.Tests.Professional")]
[assembly: InternalsVisibleTo("DotNetNuke.SiteExportImport")]
Expand Down
1 change: 1 addition & 0 deletions DNN Platform/Library/Services/Mail/CoreMailProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ private static SmtpInfo GetDefaultSmtpInfo(SmtpInfo smtpInfo)
Username = Host.SMTPUsername,
Password = Host.SMTPPassword,
EnableSSL = Host.EnableSMTPSSL,
AuthProvider = Host.SMTPAuthProvider,
};
}

Expand Down
182 changes: 177 additions & 5 deletions DNN Platform/Library/Services/Mail/Mail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,30 @@ public static string SendMail(string mailFrom, string mailTo, string cc, string
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL);
smtpEnableSSL,
Host.SMTPAuthProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, string attachment, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
return SendMail(
mailFrom,
mailTo,
cc,
bcc,
mailFrom,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachment.Split('|'),
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
authProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL)
Expand All @@ -333,7 +356,30 @@ public static string SendMail(string mailFrom, string mailTo, string cc, string
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL);
smtpEnableSSL,
Host.SMTPAuthProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
return SendMail(
mailFrom,
mailTo,
cc,
bcc,
mailFrom,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachments,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
authProvider);
}

/// <summary>Sends an email based on params.</summary>
Expand Down Expand Up @@ -394,7 +440,35 @@ public static string SendMail(string mailFrom, string mailTo, string cc, string
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL);
smtpEnableSSL,
Host.SMTPAuthProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, string[] attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
var attachmentList = (from attachment in attachments
where !string.IsNullOrEmpty(attachment)
select new Attachment(attachment))
.ToList();

return SendMail(
mailFrom,
mailTo,
cc,
bcc,
replyTo,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachmentList,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
authProvider);
}

[DnnDeprecated(9, 8, 0, "Please use SendEmail() with ICollection<MailAttachment>")]
Expand All @@ -417,7 +491,32 @@ public static partial string SendMail(string mailFrom, string mailTo, string cc,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL);
smtpEnableSSL,
Host.SMTPAuthProvider);
}

[Obsolete("This method has been deprecated. Please use SendEmail() with ICollection<MailAttachment> Scheduled removal in v11.0.0.")]
public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, List<Attachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
return SendMail(
mailFrom,
string.Empty,
mailTo,
cc,
bcc,
replyTo,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachments,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
authProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, ICollection<MailAttachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL)
Expand All @@ -439,11 +538,59 @@ public static string SendMail(string mailFrom, string mailTo, string cc, string
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL);
smtpEnableSSL,
Host.SMTPAuthProvider);
}

public static string SendMail(string mailFrom, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, ICollection<MailAttachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
return SendMail(
mailFrom,
string.Empty,
mailTo,
cc,
bcc,
replyTo,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachments,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
authProvider);
}

[DnnDeprecated(9, 8, 0, "Please use SendEmail() with ICollection<MailAttachment>")]
public static partial string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, List<Attachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL)
{
return SendMail(
mailFrom,
mailSender,
mailTo,
cc,
bcc,
replyTo,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachments,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
Host.SMTPAuthProvider);
}

[Obsolete("This method has been deprecated. Please use SendEmail() with ICollection<MailAttachment> Scheduled removal in v11.0.0.")]
public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, List<Attachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
var smtpInfo = new SmtpInfo
{
Expand All @@ -452,6 +599,7 @@ public static partial string SendMail(string mailFrom, string mailSender, string
Username = smtpUsername,
Password = smtpPassword,
EnableSSL = smtpEnableSSL,
AuthProvider = authProvider,
};

var mailInfo = new MailInfo
Expand Down Expand Up @@ -479,6 +627,29 @@ public static partial string SendMail(string mailFrom, string mailSender, string
}

public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, ICollection<MailAttachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL)
{
return SendMail(
mailFrom,
mailSender,
mailTo,
cc,
bcc,
replyTo,
priority,
subject,
bodyFormat,
bodyEncoding,
body,
attachments,
smtpServer,
smtpAuthentication,
smtpUsername,
smtpPassword,
smtpEnableSSL,
Host.SMTPAuthProvider);
}

public static string SendMail(string mailFrom, string mailSender, string mailTo, string cc, string bcc, string replyTo, MailPriority priority, string subject, MailFormat bodyFormat, Encoding bodyEncoding, string body, ICollection<MailAttachment> attachments, string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL, string authProvider)
{
var smtpInfo = new SmtpInfo
{
Expand All @@ -487,6 +658,7 @@ public static string SendMail(string mailFrom, string mailSender, string mailTo,
Username = smtpUsername,
Password = smtpPassword,
EnableSSL = smtpEnableSSL,
AuthProvider = authProvider,
};

var mailInfo = new MailInfo
Expand Down
Loading

0 comments on commit e4e1576

Please sign in to comment.