Skip to content

Commit

Permalink
Merge branch 'release/36.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Oct 1, 2024
2 parents fa7fb68 + e8c374d commit 291ef09
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 41 deletions.
32 changes: 16 additions & 16 deletions Classes/Utility/ConfigurationUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ConfigurationUtility
public static function getScoringCalculation(): string
{
$extensionConfig = self::getExtensionConfiguration();
$scoringCalculation = (string)$extensionConfig['scoringCalculation'];
$scoringCalculation = $extensionConfig['scoringCalculation'] ?? '';
if ($scoringCalculation === '') {
$scoringCalculation
= '(10 * numberOfSiteVisits) + (1 * numberOfPageVisits) + (20 * downloads) - (1 * lastVisitDaysAgo)';
Expand All @@ -36,7 +36,7 @@ public static function getScoringCalculation(): string
public static function getCategoryScoringAddPageVisit(): int
{
$extensionConfig = self::getExtensionConfiguration();
return (int)$extensionConfig['categoryScoringAddPageVisit'];
return (int)($extensionConfig['categoryScoringAddPageVisit'] ?? 10);
}

/**
Expand All @@ -47,7 +47,7 @@ public static function getCategoryScoringAddPageVisit(): int
public static function getCategoryScoringAddNewsVisit(): int
{
$extensionConfig = self::getExtensionConfiguration();
return (int)$extensionConfig['categoryScoringAddNewsVisit'];
return (int)($extensionConfig['categoryScoringAddNewsVisit'] ?? 10);
}

/**
Expand All @@ -58,7 +58,7 @@ public static function getCategoryScoringAddNewsVisit(): int
public static function getCategoryScoringAddDownload(): int
{
$extensionConfig = self::getExtensionConfiguration();
return (int)$extensionConfig['categoryScoringAddDownload'];
return (int)($extensionConfig['categoryScoringAddDownload'] ?? 20);
}

/**
Expand All @@ -69,7 +69,7 @@ public static function getCategoryScoringAddDownload(): int
public static function getCategoryScoringLinkListenerClick(): int
{
$extensionConfig = self::getExtensionConfiguration();
return (int)$extensionConfig['categoryScoringLinkListenerClick'];
return (int)($extensionConfig['categoryScoringLinkListenerClick'] ?? 20);
}

/**
Expand All @@ -80,7 +80,7 @@ public static function getCategoryScoringLinkListenerClick(): int
public static function isPageOverviewDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disablePageOverview'] === '1';
return ($extensionConfig['disablePageOverview'] ?? '0') === '1';
}

/**
Expand All @@ -95,7 +95,7 @@ public static function getPageOverviewView(): string
'analysis',
'leads',
];
if (in_array((string)$extensionConfig['pageOverviewView'], $allowed)) {
if (in_array(($extensionConfig['pageOverviewView'] ?? ''), $allowed)) {
return $extensionConfig['pageOverviewView'];
}
return $allowed[0];
Expand All @@ -120,7 +120,7 @@ public static function isCkEditorConfigurationNeeded(): bool
protected static function isCkEditorConfigurationDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disableCkEditorConfiguration'] === '1';
return ($extensionConfig['disableCkEditorConfiguration'] ?? '0') === '1';
}

/**
Expand All @@ -131,7 +131,7 @@ protected static function isCkEditorConfigurationDisabled(): bool
public static function isIpLoggingDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disableIpLogging'] === '1';
return ($extensionConfig['disableIpLogging'] ?? '0') === '1';
}

/**
Expand All @@ -142,7 +142,7 @@ public static function isIpLoggingDisabled(): bool
public static function isAnonymizeIpEnabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['anonymizeIp'] === '1';
return ($extensionConfig['anonymizeIp'] ?? '1') === '1';
}

/**
Expand All @@ -167,7 +167,7 @@ public static function getLeadImageFromExternalSourcesConfiguration(): string
public static function isShowRenderTimesEnabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['showRenderTimes'] === '1';
return ($extensionConfig['showRenderTimes'] ?? '0') === '1';
}

/**
Expand All @@ -178,7 +178,7 @@ public static function isShowRenderTimesEnabled(): bool
public static function isUseCacheLayerEnabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['useCacheLayer'] === '1';
return ($extensionConfig['useCacheLayer'] ?? '1') === '1';
}

/**
Expand All @@ -189,7 +189,7 @@ public static function isUseCacheLayerEnabled(): bool
public static function isLeadModuleDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disableLeadModule'] === '1';
return ($extensionConfig['disableLeadModule'] ?? '0') === '1';
}

/**
Expand All @@ -200,7 +200,7 @@ public static function isLeadModuleDisabled(): bool
public static function isAnalysisModuleDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disableAnalysisModule'] === '1';
return ($extensionConfig['disableAnalysisModule'] ?? '0') === '1';
}

/**
Expand All @@ -211,7 +211,7 @@ public static function isAnalysisModuleDisabled(): bool
public static function isExceptionLoggingActivated(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['enbaleExceptionLogging'] === '1';
return ($extensionConfig['enableExceptionLogging'] ?? '0') === '1';
}

/**
Expand All @@ -222,7 +222,7 @@ public static function isExceptionLoggingActivated(): bool
public static function isWorkflowModuleDisabled(): bool
{
$extensionConfig = self::getExtensionConfiguration();
return $extensionConfig['disableWorkflowModule'] === '1';
return ($extensionConfig['disableWorkflowModule'] ?? '0') === '1';
}

/**
Expand Down
Loading

0 comments on commit 291ef09

Please sign in to comment.