Commit 171ff121 authored by Sébastien DAVOULT's avatar Sébastien DAVOULT
Browse files

Fixing DB structure

parent 2aad8c22
......@@ -49,6 +49,7 @@ case "$1" in
/bin/chown -R root:eyesofnetwork %{datadir}
ln -s /srv/eyesofnetwork/eonweb/themes/EONFlatDark/thruk/EONFlatDark/ /etc/thruk/themes/themes-enabled/EONFlatDark
ln -s /srv/eyesofnetwork/eonweb/themes/EONFlatLight/thruk/EONFlatLight/ /etc/thruk/themes/themes-enabled/EONFlatLight
/usr/bin/mysql -u root --password=root66 eonweb < %{eonconfdir}/updates/5.3.5.sql 2>/dev/null
systemctl restart httpd
;;
2)
......
ALTER TABLE users ADD theme VARCHAR(50);
INSERT ignore INTO configs VALUE ('theme', 'Classic-v5');
......@@ -1364,10 +1364,10 @@ function startSessionTheme(){
$theme_value = $result["theme"];
if($theme_value == "Default"){
$conn = connexionDB($database_eonweb);
$sql = "SELECT `theme` FROM configs";
$sql = "SELECT value FROM configs WHERE name = 'theme'";
$result = $conn->query($sql);
$data = $result->fetch();
$theme_value = $data["theme"];
$theme_value = $data["value"];
$conn = null;
$sql = null;
}
......@@ -1376,10 +1376,10 @@ function startSessionTheme(){
} else {
$conn = connexionDB($database_eonweb);
$sql = "SELECT `theme` FROM configs";
$sql = "SELECT value FROM configs WHERE name = 'theme'";
$result = $conn->query($sql);
$data = $result->fetch();
$theme_value = $data["theme"];
$theme_value = $data["value"];
$conn = null;
$sql = null;
$_SESSION["theme"] = $theme_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