dsadsa
This commit is contained in:
@@ -501,6 +501,18 @@ $renderField = function (array $field) use (&$current, $getNested, $driverOption
|
|||||||
<?php
|
<?php
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$hasDatabaseSection = array_key_exists('database', $setupSectionConfig)
|
||||||
|
? !empty($setupSectionConfig['database'])
|
||||||
|
: $dbGroups !== [];
|
||||||
|
$hasCustomSection = $customSetupFields !== [] || $customSectionActions !== [];
|
||||||
|
$allowedSetupSections = ['general', 'access', 'cron'];
|
||||||
|
if ($hasDatabaseSection) {
|
||||||
|
$allowedSetupSections[] = 'database';
|
||||||
|
}
|
||||||
|
if ($hasCustomSection) {
|
||||||
|
$allowedSetupSections[] = 'custom';
|
||||||
|
}
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
$isSchedulerAutosave = isset($_POST['scheduler_autosave']) && (string) $_POST['scheduler_autosave'] === '1';
|
$isSchedulerAutosave = isset($_POST['scheduler_autosave']) && (string) $_POST['scheduler_autosave'] === '1';
|
||||||
$isSchedulerTest = isset($_POST['scheduler_test']) && (string) $_POST['scheduler_test'] === '1';
|
$isSchedulerTest = isset($_POST['scheduler_test']) && (string) $_POST['scheduler_test'] === '1';
|
||||||
@@ -750,18 +762,7 @@ sort($knownGroups, SORT_NATURAL | SORT_FLAG_CASE);
|
|||||||
$knownUserValues = array_column($knownUsers, 'sub');
|
$knownUserValues = array_column($knownUsers, 'sub');
|
||||||
$manualUsers = array_values(array_filter($allowedUsers, fn (string $value): bool => !in_array($value, $knownUserValues, true)));
|
$manualUsers = array_values(array_filter($allowedUsers, fn (string $value): bool => !in_array($value, $knownUserValues, true)));
|
||||||
$manualGroups = array_values(array_filter($allowedGroups, fn (string $value): bool => !in_array($value, $knownGroups, true)));
|
$manualGroups = array_values(array_filter($allowedGroups, fn (string $value): bool => !in_array($value, $knownGroups, true)));
|
||||||
$hasDatabaseSection = array_key_exists('database', $setupSectionConfig)
|
|
||||||
? !empty($setupSectionConfig['database'])
|
|
||||||
: $dbGroups !== [];
|
|
||||||
$hasCustomSection = $customSetupFields !== [] || $customSectionActions !== [];
|
|
||||||
$showCustomDbConfig = !empty($current['use_separate_db']) && !in_array(strtolower(trim((string) ($current['use_separate_db'] ?? ''))), ['0', 'false', 'off', 'standard'], true);
|
$showCustomDbConfig = !empty($current['use_separate_db']) && !in_array(strtolower(trim((string) ($current['use_separate_db'] ?? ''))), ['0', 'false', 'off', 'standard'], true);
|
||||||
$allowedSetupSections = ['general', 'access', 'cron'];
|
|
||||||
if ($hasDatabaseSection) {
|
|
||||||
$allowedSetupSections[] = 'database';
|
|
||||||
}
|
|
||||||
if ($hasCustomSection) {
|
|
||||||
$allowedSetupSections[] = 'custom';
|
|
||||||
}
|
|
||||||
if (!in_array($currentSection, $allowedSetupSections, true)) {
|
if (!in_array($currentSection, $allowedSetupSections, true)) {
|
||||||
$currentSection = 'general';
|
$currentSection = 'general';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user