Skip to content

Commit 99ca0f7

Browse files
author
Till Brehm
committed
Fixed: FS#3261 - APS Deletes error folder
1 parent 5fbd574 commit 99ca0f7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

server/lib/classes/aps_installer.inc.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,16 @@ private function prepareDatabase($task, $sxe)
373373

374374
/* Test if the new mysql connection is laready working to ensure that db servers in multiserver
375375
setups get enough time to create the database */
376-
for($n = 1; $n < 15; $n++) {
377-
$mysqli = new mysqli($newdb_host, $newdb_login, $newdb_pw, $newdb_name);
378-
if ($mysqli->connect_error) {
379-
unset($mysqli);
380-
sleep(5);
381-
} else {
382-
unset($mysqli);
383-
break;
376+
if($this->handle_type == 'install') {
377+
for($n = 1; $n < 15; $n++) {
378+
$link = mysql_connect($newdb_host, $newdb_login, $newdb_pw);
379+
if (!$link) {
380+
unset($link);
381+
sleep(5);
382+
} else {
383+
unset($link);
384+
break;
385+
}
384386
}
385387
}
386388

0 commit comments

Comments
 (0)