From f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be Mon Sep 17 00:00:00 2001
From: Patrick Anders <p.anders@timmehosting.de>
Date: Wed, 10 Dec 2014 08:44:26 -0500
Subject: [PATCH] add Spdy option - http://en.wikipedia.org/wiki/SPDY
---
server/lib/classes/aps_installer.inc.php | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php
index 2925c7a..089c7ab 100644
--- a/server/lib/classes/aps_installer.inc.php
+++ b/server/lib/classes/aps_installer.inc.php
@@ -277,7 +277,8 @@
if(substr($this->document_root, -1) != '/') $this->document_root .= '/';
// Attention: ISPConfig Special: web files are in subfolder 'web' -> append it:
- if($domain_res['type'] == 'vhostsubdomain') $this->document_root .= $domain_res['web_folder'] . '/';
+ if(($domain_res['type'] == 'vhostsubdomain') || ($domain_res['type'] == 'vhostalias'))
+ $this->document_root .= $domain_res['web_folder'] . '/';
else $this->document_root .= 'web/';
// If a subfolder is given, make sure it's path doesn't begin with / i.e. /phpbb
@@ -370,6 +371,21 @@
$tmp = $app->db->queryOneRecord("SELECT value FROM aps_instances_settings WHERE name = 'main_database_login' AND instance_id = '".$app->db->quote($task['instance_id'])."';");
$newdb_login = $tmp['value'];
+
+ /* Test if the new mysql connection is laready working to ensure that db servers in multiserver
+ setups get enough time to create the database */
+ if($this->handle_type == 'install') {
+ for($n = 1; $n < 15; $n++) {
+ $link = mysql_connect($newdb_host, $newdb_login, $newdb_pw);
+ if (!$link) {
+ unset($link);
+ sleep(5);
+ } else {
+ unset($link);
+ break;
+ }
+ }
+ }
$this->putenv[] = 'DB_'.$db_id.'_TYPE=mysql';
$this->putenv[] = 'DB_'.$db_id.'_NAME='.$newdb_name;
@@ -739,6 +755,10 @@
{
$app->db->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";');
$app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";');
+ if ($app->dbmaster != $app->db) {
+ $app->dbmaster->query('DELETE FROM aps_instances WHERE id = "'.$app->db->quote($task['instance_id']).'";');
+ $app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = "'.$app->db->quote($task['instance_id']).'";');
+ }
}
unset($sxe);
--
Gitblit v1.9.1