Skip to content

Commit d31c946

Browse files
committed
Fix board deletion
1 parent 3439869 commit d31c946

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

modules/qi_manage.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ public function __construct()
3636
{
3737
$current_item = $settings->get_boards_dir() . $item;
3838

39+
// First get config-file data for the board
40+
$cfg_file = $current_item . '/config.' . $phpEx;
41+
$dbhost = $dbport = $dbname = $dbuser = $dbpasswd = $dbms = '';
42+
if (file_exists($cfg_file))
43+
{
44+
include $cfg_file;
45+
}
46+
3947
// Attempt to delete the board from filesystem
4048
if (!file_exists($current_item) || !is_dir($current_item))
4149
{
@@ -58,13 +66,6 @@ public function __construct()
5866
}
5967

6068
// Attempt to delete the database
61-
$cfg_file = $current_item . '/config.' . $phpEx;
62-
$dbhost = $dbport = $dbname = $dbuser = $dbpasswd = $dbms = '';
63-
if (file_exists($cfg_file))
64-
{
65-
include $cfg_file;
66-
}
67-
6869
if (!empty($dbname) && !empty($dbhost) && !empty($dbms) && empty($error))
6970
{
7071
$dbms = (strpos($dbms, '\\') !== false) ? substr(strrchr($dbms, '\\'), 1) : $dbms;

0 commit comments

Comments
 (0)