AB#5822 Clean up
This commit is contained in:
@@ -947,7 +947,9 @@ namespace Umbraco.Core
|
||||
/// <returns>The filtered string.</returns>
|
||||
public static string ReplaceFirst(this string text, string search, string replace)
|
||||
{
|
||||
var pos = text.IndexOf(search);
|
||||
if (text == null) throw new ArgumentNullException(nameof(text));
|
||||
|
||||
var pos = text.IndexOf(search, StringComparison.InvariantCulture);
|
||||
|
||||
if (pos < 0)
|
||||
return text;
|
||||
|
||||
@@ -28,18 +28,18 @@ namespace Umbraco.Infrastructure.Media
|
||||
|
||||
//Only put quality here, if we don't have a format specified.
|
||||
//Otherwise we need to put quality at the end to avoid it being overridden by the format.
|
||||
if (options.Quality != null && hasFormat == false) imageProcessorUrl.Append("&quality=").Append(options.Quality);
|
||||
if (options.HeightRatio != null) imageProcessorUrl.Append("&heightratio=").Append(options.HeightRatio.Value.ToString(CultureInfo.InvariantCulture));
|
||||
if (options.WidthRatio != null) imageProcessorUrl.Append("&widthratio=").Append(options.WidthRatio.Value.ToString(CultureInfo.InvariantCulture));
|
||||
if (options.Width != null) imageProcessorUrl.Append("&width=").Append(options.Width);
|
||||
if (options.Height != null) imageProcessorUrl.Append("&height=").Append(options.Height);
|
||||
if (options.Quality.HasValue && hasFormat == false) imageProcessorUrl.Append("&quality=").Append(options.Quality);
|
||||
if (options.HeightRatio.HasValue) imageProcessorUrl.Append("&heightratio=").Append(options.HeightRatio.Value.ToString(CultureInfo.InvariantCulture));
|
||||
if (options.WidthRatio.HasValue) imageProcessorUrl.Append("&widthratio=").Append(options.WidthRatio.Value.ToString(CultureInfo.InvariantCulture));
|
||||
if (options.Width.HasValue) imageProcessorUrl.Append("&width=").Append(options.Width);
|
||||
if (options.Height.HasValue) imageProcessorUrl.Append("&height=").Append(options.Height);
|
||||
if (options.UpScale == false) imageProcessorUrl.Append("&upscale=false");
|
||||
if (options.AnimationProcessMode != null) imageProcessorUrl.Append("&animationprocessmode=").Append(options.AnimationProcessMode);
|
||||
if (options.FurtherOptions != null) imageProcessorUrl.Append(options.FurtherOptions);
|
||||
if (!string.IsNullOrWhiteSpace(options.AnimationProcessMode)) imageProcessorUrl.Append("&animationprocessmode=").Append(options.AnimationProcessMode);
|
||||
if (!string.IsNullOrWhiteSpace(options.FurtherOptions)) imageProcessorUrl.Append(options.FurtherOptions);
|
||||
|
||||
//If furtherOptions contains a format, we need to put the quality after the format.
|
||||
if (options.Quality != null && hasFormat) imageProcessorUrl.Append("&quality=").Append(options.Quality);
|
||||
if (options.CacheBusterValue != null) imageProcessorUrl.Append("&rnd=").Append(options.CacheBusterValue);
|
||||
if (options.Quality.HasValue && hasFormat) imageProcessorUrl.Append("&quality=").Append(options.Quality);
|
||||
if (!string.IsNullOrWhiteSpace(options.CacheBusterValue)) imageProcessorUrl.Append("&rnd=").Append(options.CacheBusterValue);
|
||||
|
||||
return imageProcessorUrl.ToString();
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ using Umbraco.Web.Common.ActionResults;
|
||||
|
||||
namespace Umbraco.Web.BackOffice.Filters
|
||||
{
|
||||
public class MinifyJavaScriptResult : ActionFilterAttribute
|
||||
public class MinifyJavaScriptResultAttribute : ActionFilterAttribute
|
||||
{
|
||||
public override async Task OnResultExecutionAsync(ResultExecutingContext context, ResultExecutionDelegate next)
|
||||
{
|
||||
@@ -71,7 +71,6 @@ module.exports = {
|
||||
assets: "./src/assets/**"
|
||||
}
|
||||
},
|
||||
root: "../Umbraco.Web.UI.NetCore/wwwroot/",
|
||||
roots: ["../Umbraco.Web.UI/", "../Umbraco.Web.UI.NetCore/wwwroot/"],
|
||||
targets: {
|
||||
js: "Umbraco/js/",
|
||||
|
||||
Reference in New Issue
Block a user