Commit 18d0e512 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: branding insert needs group_name (NOT NULL column in platform_theme)

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 03a75d37
...@@ -56,7 +56,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save_theme'])) { ...@@ -56,7 +56,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save_theme'])) {
if (strpos($key, 'anim_') === 0 || strpos($key, 'btn_') === 0) $cat = 'animation'; if (strpos($key, 'anim_') === 0 || strpos($key, 'btn_') === 0) $cat = 'animation';
if (strpos($key, 'ludo_') === 0 || strpos($key, 'board_') === 0) $cat = 'game'; if (strpos($key, 'ludo_') === 0 || strpos($key, 'board_') === 0) $cat = 'game';
if (strpos($key, 'juice_') === 0) $cat = 'juice'; if (strpos($key, 'juice_') === 0) $cat = 'juice';
$sdb->insert('platform_theme', ['id' => $key, 'category' => $cat, 'label' => $key, 'value' => $value, 'default_value' => $value, 'value_type' => (strpos($value, '#') === 0) ? 'hex' : 'string']); $sdb->insert('platform_theme', ['id' => $key, 'category' => $cat, 'group_name' => 'player_app', 'label' => $key, 'value' => $value, 'default_value' => $value, 'value_type' => (strpos($value, '#') === 0) ? 'hex' : 'string']);
} }
} }
} }
......
...@@ -61,6 +61,7 @@ if ($method === 'POST') { ...@@ -61,6 +61,7 @@ if ($method === 'POST') {
$sdb->insert('platform_theme', [ $sdb->insert('platform_theme', [
'id' => $key, 'id' => $key,
'category' => categorizeKey($key), 'category' => categorizeKey($key),
'group_name' => 'player_app',
'label' => $key, 'label' => $key,
'value' => $value, 'value' => $value,
'default_value' => $value, 'default_value' => $value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment