From 87571d657ebe70e783695bd84efe215b34339900 Mon Sep 17 00:00:00 2001 From: HugoFara Date: Fri, 29 Dec 2023 17:11:21 +0100 Subject: [PATCH] Fixes database wizard broken. --- database_wizard.php | 24 +++++++++++++----------- docs/CHANGELOG.md | 4 ++++ docs/info.html | 4 ++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/database_wizard.php b/database_wizard.php index 3a4c6cd0..94243fa8 100644 --- a/database_wizard.php +++ b/database_wizard.php @@ -140,16 +140,18 @@ function writeToFile($conn) function doOperation($op) { $message = null; - $dbname = null; - $passwd = null; $server = null; - $socket = null; $userid = null; + $passwd = null; + $dbname = null; + $socket = null; if ($op == "Autocomplete") { - $_SERVER['SERVER_ADDR']; - $_SERVER['SERVER_NAME']; + $server = (string) $_SERVER['SERVER_ADDR']; + $userid = ""; + $passwd = ""; + $dbname = (string) $_SERVER['SERVER_NAME']; + $socket = ""; } else if ($op == "Check") { - //require_once 'inc/database_connect.php'; $server = getreq("server"); $userid = getreq("userid"); $passwd = getreq("passwd"); @@ -183,11 +185,11 @@ function doOperation($op) } } } else if ($op == "Change") { - getreq("server"); - getreq("userid"); - getreq("passwd"); - getreq("dbname"); - getreq("socket"); + $server = getreq("server"); + $userid = getreq("userid"); + $passwd = getreq("passwd"); + $dbname = getreq("dbname"); + $socket = getreq("socket"); } $conn = new Database_Connection( $server, $userid, $passwd, $dbname, $socket diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f21de990..e259b993 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,6 +7,10 @@ ones are marked like "v1.0.0-fork". ## [Unreleased] +### Fixed + +* The database wizard was broken since 2.9.0. + ## 2.9.1-fork (December 29 2023) ### Added in 2.9.1-fork diff --git a/docs/info.html b/docs/info.html index 28a7b646..9524837f 100644 --- a/docs/info.html +++ b/docs/info.html @@ -2183,6 +2183,10 @@

▶ Changelog - [↑]

For git tags, official releases are marked like "v1.0.0", while unofficial ones are marked like "v1.0.0-fork".

[Unreleased]

+

Fixed

+

2.9.1-fork (December 29 2023)

Added in 2.9.1-fork