38676-vm/patch_handler_v2.php
Flatlogic Bot 12241ba85d Alpha V1.4
2026-02-26 08:28:54 +00:00

17 lines
613 B
PHP

<?php
$file = 'admin.php';
$content = file_get_contents($file);
$oldLogic = ' $orbital_dominance = $_POST[\'orbital_dominance\'] ?: null;
$terrestrial_dominance = $_POST[\'terrestrial_dominance\'] ?: null;';
$newLogic = <<<'EOD'
$orbital_dominance = isset($_POST['orbital_dominance']) ? implode(',', (array)$_POST['orbital_dominance']) : null;
$terrestrial_dominance = isset($_POST['terrestrial_dominance']) ? implode(',', (array)$_POST['terrestrial_dominance']) : null;
EOD;
$content = str_replace($oldLogic, $newLogic, $content);
file_put_contents($file, $content);
echo "Handler patched";
?>