Search per tab, style, db update
This commit is contained in:
1 parent
80ddd17d45
commit
9b43c28ee3
10 files changed
+148
-58
No files matched your search
+13
-1
@@ -23,7 +23,8 @@ try {
|
||||
'background_saturation' => 'INTEGER DEFAULT 100',
|
||||
'theme' => 'TEXT DEFAULT NULL',
|
||||
'theme_transparency' => 'INTEGER DEFAULT NULL',
|
||||
'login_token' => 'VARCHAR(255)'
|
||||
'login_token' => 'VARCHAR(255)',
|
||||
'show_search_bar' => 'INTEGER DEFAULT 1'
|
||||
];
|
||||
|
||||
$columns_added = false;
|
||||
@@ -77,6 +78,17 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
// --- Check settings table for show_search_bar setting ---
|
||||
$settings_check = $pdo->prepare("SELECT value FROM settings WHERE key = 'show_search_bar'");
|
||||
$settings_check->execute();
|
||||
if (!$settings_check->fetch()) {
|
||||
$pdo->prepare("INSERT INTO settings (key, value) VALUES (?, ?)")->execute(['show_search_bar', '1']);
|
||||
$messages[] = "Added 'show_search_bar' setting to settings table.";
|
||||
$columns_added = true;
|
||||
} else {
|
||||
$messages[] = "Setting 'show_search_bar' already exists in settings table.";
|
||||
}
|
||||
|
||||
if ($columns_added) {
|
||||
echo json_encode(['success' => true, 'message' => 'Database updated successfully!', 'details' => $messages]);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user