Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
5eafbcd5
Commit
5eafbcd5
authored
Apr 16, 2015
by
Marius Cramer
Browse files
- don't set connect params in constructor (too early)
parent
d7ad8f37
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/lib/mysql.lib.php
View file @
5eafbcd5
...
...
@@ -60,10 +60,14 @@ class db extends mysqli
////
*/
// constructor
public
function
__construct
(
$host
=
NULL
,
$user
=
NULL
,
$pass
=
NULL
,
$database
=
NULL
)
{
public
function
__destruct
()
{
if
(
$this
->
_iConnId
)
mysqli_close
(
$this
->
_iConnId
);
}
private
function
do_connect
()
{
global
$conf
;
if
(
$this
->
_iConnId
)
return
true
;
$this
->
dbHost
=
$conf
[
"mysql"
][
"host"
];
$this
->
dbName
=
''
;
$this
->
dbUser
=
$conf
[
"mysql"
][
"admin_user"
];
...
...
@@ -71,14 +75,6 @@ class db extends mysqli
$this
->
dbCharset
=
$conf
[
"mysql"
][
"charset"
];
$this
->
dbNewLink
=
false
;
$this
->
dbClientFlags
=
null
;
}
public
function
__destruct
()
{
if
(
$this
->
_iConnId
)
mysqli_close
(
$this
->
_iConnId
);
}
private
function
do_connect
()
{
if
(
$this
->
_iConnId
)
return
true
;
$this
->
_iConnId
=
mysqli_connect
(
$this
->
dbHost
,
$this
->
dbUser
,
$this
->
dbPass
);
$try
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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