Skip to content

Commit

Permalink
analizators/U2U1100
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Jan 13, 2022
1 parent d1ce4c5 commit cacb889
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions common/ASC.Api.Core/Core/CustomHealthCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static IServiceCollection AddCustomHealthCheck(this IServiceCollection se

var connectionString = configurationExtension.GetConnectionStrings("default");

if (String.Compare(connectionString.ProviderName, "MySql.Data.MySqlClient") == 0)
if (string.Equals(connectionString.ProviderName, "MySql.Data.MySqlClient"))
{
hcBuilder.AddMySql(connectionString.ConnectionString,
name: "mysqldb",
tags: new string[] { "mysqldb" }
);
}

if (String.Compare(connectionString.ProviderName, "Npgsql") == 0)
if (string.Equals(connectionString.ProviderName, "Npgsql"))
{
hcBuilder.AddNpgSql(connectionString.ConnectionString,
name: "postgredb",
Expand Down
2 changes: 1 addition & 1 deletion common/ASC.Common/Web/MimeMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public static string GetExtention(string mimeMapping)
foreach (DictionaryEntry entry in extensionToMimeMappingTable)
{
var mime = (string)entry.Value;
if (mime == mimeMapping.ToLowerInvariant()) return (string)entry.Key;
if (mime.Equals(mimeMapping, StringComparison.OrdinalIgnoreCase)) return (string)entry.Key;
if (!mimeSynonyms.ContainsKey(mime)) continue;
if (mimeSynonyms[mime].Contains(mimeMapping.ToLowerInvariant())) return (string)entry.Key;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public bool IsEnabled()

public bool ValidateKeys()
{
if (TelegramBotToken == "")
if (TelegramBotToken.Length == 0)
{
TelegramHelper.DisableClient(TenantManager.GetCurrentTenant().TenantId);
return true;
Expand Down
4 changes: 2 additions & 2 deletions common/ASC.Notify.Textile/TextileStyler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private string GetLogoImg(NoticeMessage message, string imagePath)
if (string.IsNullOrEmpty(logoImg))
{
var logo = message.GetArgument("LetterLogo");
if (logo != null && (string)logo.Value != "")
if (logo != null && ((string)logo.Value).Length != 0)
{
logoImg = (string)logo.Value;
}
Expand All @@ -173,7 +173,7 @@ private string GetLogoText(NoticeMessage message)
if (string.IsNullOrEmpty(logoText))
{
var llt = message.GetArgument("LetterLogoText");
if (llt != null && (string)llt.Value != "")
if (llt != null && ((string)llt.Value).Length != 0)
{
logoText = (string)llt.Value;
}
Expand Down
2 changes: 1 addition & 1 deletion products/ASC.People/Server/Controllers/PeopleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ public ICollection<AccountInfo> GetAuthProviders(bool inviteView, bool settingsV

foreach (var provider in ProviderManager.AuthProviders.Where(provider => string.IsNullOrEmpty(fromOnly) || fromOnly == provider || (provider == "google" && fromOnly == "openid")))
{
if (inviteView && provider.ToLower() == "twitter") continue;
if (inviteView && provider.Equals("twitter", StringComparison.OrdinalIgnoreCase)) continue;

var loginProvider = ProviderManager.GetLoginProvider(provider);
if (loginProvider != null && loginProvider.IsEnabled)
Expand Down

0 comments on commit cacb889

Please sign in to comment.