increment copyright date to 2022, allow scheduled jobs to support weekly interval, improve dynamic image generation, add defensive logic to router

This commit is contained in:
Shaun Walker
2022-01-05 14:28:42 -05:00
parent eeff4af167
commit 6af5682548
13 changed files with 93 additions and 53 deletions

View File

@ -36,6 +36,7 @@
<option value="m">@Localizer["Minute(s)"]</option>
<option value="H">@Localizer["Hour(s)"]</option>
<option value="d">@Localizer["Day(s)"]</option>
<option value="w">@Localizer["Week(s)"]</option>
<option value="M">@Localizer["Month(s)"]</option>
</select>
</div>

View File

@ -95,6 +95,9 @@ else
case "d":
result += Localizer["Day"];
break;
case "w":
result += Localizer["Week"];
break;
case "M":
result += Localizer["Month"];
break;

View File

@ -12,7 +12,7 @@
@if (PageState.User != null && photo != null)
{
<img src="@ImageUrl(photofileid, 400, 400, "crop")" alt="@displayname" style="max-width: 400px" class="rounded-circle mx-auto d-block">
<img src="@ImageUrl(photofileid, 400, 400)" alt="@displayname" style="max-width: 400px" class="rounded-circle mx-auto d-block">
}
else
{

View File

@ -134,14 +134,19 @@ namespace Oqtane.Modules
return Utilities.ContentUrl(PageState.Alias, fileid, asAttachment);
}
public string ImageUrl(int fileid, int width, int height, string mode)
public string ImageUrl(int fileid, int width, int height)
{
return ImageUrl(fileid, width, height, mode, 0);
return ImageUrl(fileid, width, height, "");
}
public string ImageUrl(int fileid, int width, int height, string mode, int rotate)
public string ImageUrl(int fileid, int width, int height, string mode)
{
return Utilities.ImageUrl(PageState.Alias, fileid, width, height, mode, rotate);
return ImageUrl(fileid, width, height, mode, "", "", 0, false);
}
public string ImageUrl(int fileid, int width, int height, string mode, string position, string background, int rotate, bool recreate)
{
return Utilities.ImageUrl(PageState.Alias, fileid, width, height, mode, position, background, rotate, recreate);
}
public virtual Dictionary<string, string> GetUrlParameters(string parametersTemplate = "")