feat: persist display and experimental settings on the db

feat: small styles changed
This commit is contained in:
Miguel Ribeiro
2024-02-22 00:11:08 +01:00
committed by GitHub
parent 3e61711dd4
commit f0a6f1a2f1
15 changed files with 242 additions and 36 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
error_reporting(E_ERROR | E_PARSE);
require_once '../../includes/connect_endpoint.php';
require_once '../../includes/inputvalidation.php';
require_once '../../includes/getsettings.php';
session_start();
@@ -40,7 +41,7 @@
function saveLogo($imageData, $uploadFile, $name) {
$image = imagecreatefromstring($imageData);
$removeBackground = isset($_COOKIE['removeBackground']) && $_COOKIE['removeBackground'] === 'true';
$removeBackground = isset($settings['removeBackground']) && $settings['removeBackground'] === 'true';
if ($image !== false) {
$tempFile = tempnam(sys_get_temp_dir(), 'logo');
imagepng($image, $tempFile);