Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
c167f3cb
Commit
c167f3cb
authored
Oct 13, 2009
by
tbrehm
Browse files
Fixed a bug in updater that caused the updater to fail on multiserver setups.
parent
8baeb127
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/update.php
View file @
c167f3cb
...
...
@@ -153,10 +153,24 @@ else {
//* initialize the database
$inst
->
db
=
new
db
();
//* initialize the master DB, if we have a multiserver setup
if
(
$conf
[
'mysql'
][
'master_slave_setup'
]
==
'y'
)
{
$inst
->
dbmaster
=
new
db
();
if
(
$inst
->
dbmaster
->
linkId
)
$inst
->
dbmaster
->
closeConn
();
$inst
->
dbmaster
->
dbHost
=
$conf
[
'mysql'
][
"master_host"
];
$inst
->
dbmaster
->
dbName
=
$conf
[
'mysql'
][
"master_database"
];
$inst
->
dbmaster
->
dbUser
=
$conf
[
'mysql'
][
"master_admin_user"
];
$inst
->
dbmaster
->
dbPass
=
$conf
[
'mysql'
][
"master_admin_password"
];
}
else
{
$inst
->
dbmaster
=
$inst
->
db
;
}
//* Update $conf array with values from the server.ini that shall be preserved
$tmp
=
$inst
->
db
->
queryOneRecord
(
"SELECT * FROM "
.
$conf
[
"mysql"
][
"database"
]
.
".server WHERE server_id = "
.
$conf
[
'server_id'
]);
$ini_array
=
ini_to_array
(
stripslashes
(
$tmp
[
'config'
]));
if
(
count
(
$ini_array
)
==
0
)
die
(
'Unable to read server configuration from database.'
);
$conf
[
'services'
][
'mail'
]
=
(
$tmp
[
'mail_server'
]
==
1
)
?
true
:
false
;
$conf
[
'services'
][
'web'
]
=
(
$tmp
[
'web_server'
]
==
1
)
?
true
:
false
;
$conf
[
'services'
][
'dns'
]
=
(
$tmp
[
'dns_server'
]
==
1
)
?
true
:
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment