This commit is contained in:
Zel
2025-02-23 22:09:07 +08:00
parent f664c43d35
commit 4ceaabaf2c

View File

@@ -79,7 +79,7 @@ namespace ZelWiki.Repository
using var stream = assembly.GetManifestResourceStream(updateScriptName);
using var reader = new StreamReader(stream.EnsureNotNull());
var scriptText = reader.ReadToEnd();
var scriptNameParts = fullScriptName.Split('^');
var databaseName = scriptNameParts[1];
@@ -182,10 +182,10 @@ namespace ZelWiki.Repository
return false;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
/// <summary>
///
/// </summary>
/// <returns></returns>
public static bool GetCryptoCheck()
{
var value = ManagedDataStorage.Config.QueryFirstOrDefault<string>("GetCryptoCheck.sql") ?? string.Empty;
@@ -205,9 +205,9 @@ namespace ZelWiki.Repository
return false;
}
/// <summary>
///
/// </summary>
/// <summary>
///
/// </summary>
public static void SetCryptoCheck()
{
var param = new
@@ -229,7 +229,7 @@ namespace ZelWiki.Repository
ManagedDataStorage.Config.Execute("SaveConfigurationEntryValueByGroupAndEntry.sql", param);
ConfigurationRepository.ReloadEverything();
ReloadEverything();
}
public static List<ConfigurationNest> GetConfigurationNest()
@@ -447,10 +447,10 @@ namespace ZelWiki.Repository
var (Width, Height) = Utility.ScaleToMaxOf(img.Width, img.Height,
GlobalConfiguration.DefaultEmojiHeight);
Height = (int)(Height * (customScalePercent / 100.0));
Width = (int)(Width * (customScalePercent / 100.0));
if (Height < 16)
{
Height += 16 - Height;
@@ -462,7 +462,7 @@ namespace ZelWiki.Repository
Height += 16 - Width;
Width += 16 - Width;
}
var resized = Images.ResizeGifImage(decompressedImageBytes, Width, Height);
var itemCache = new ImageCacheItem(resized, "image/gif");
WikiCache.Put(scaledImageCacheKey, itemCache, new CacheItemPolicy());