Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Massimiliano
ISPConfig 3
Commits
a2ce9dc7
Commit
a2ce9dc7
authored
Aug 14, 2018
by
Jesse Norell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove config variable name prefix
parent
94babc39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
28 deletions
+22
-28
interface/lib/classes/db_mysql.inc.php
interface/lib/classes/db_mysql.inc.php
+11
-14
server/lib/classes/db_mysql.inc.php
server/lib/classes/db_mysql.inc.php
+11
-14
No files found.
interface/lib/classes/db_mysql.inc.php
View file @
a2ce9dc7
...
...
@@ -43,8 +43,6 @@ class db
private
$_iQueryId
;
private
$_iConnId
;
private
$_Prefix
=
''
;
// config variable name prefix
private
$dbHost
=
''
;
// hostname of the MySQL server
private
$dbPort
=
''
;
// port of the MySQL server
private
$dbName
=
''
;
// logical database name on that server
...
...
@@ -74,18 +72,17 @@ class db
*/
// constructor
public
function
__construct
(
$host
=
NULL
,
$user
=
NULL
,
$pass
=
NULL
,
$database
=
NULL
,
$port
=
NULL
,
$flags
=
NULL
,
$confPrefix
=
''
)
{
public
function
__construct
(
$host
=
NULL
,
$user
=
NULL
,
$pass
=
NULL
,
$database
=
NULL
,
$port
=
NULL
,
$flags
=
NULL
)
{
global
$app
,
$conf
;
if
(
$confPrefix
!=
''
)
$this
->
_Prefix
=
$confPrefix
.
'_'
;
$this
->
dbHost
=
$host
?
$host
:
$conf
[
$this
->
_Prefix
.
'db_host'
];
$this
->
dbPort
=
$port
?
$port
:
$conf
[
$this
->
_Prefix
.
'db_port'
];
$this
->
dbName
=
$database
?
$database
:
$conf
[
$this
->
_Prefix
.
'db_database'
];
$this
->
dbUser
=
$user
?
$user
:
$conf
[
$this
->
_Prefix
.
'db_user'
];
$this
->
dbPass
=
$pass
?
$pass
:
$conf
[
$this
->
_Prefix
.
'db_password'
];
$this
->
dbCharset
=
$conf
[
$this
->
_Prefix
.
'db_charset'
];
$this
->
dbNewLink
=
$conf
[
$this
->
_Prefix
.
'db_new_link'
];
$this
->
dbClientFlags
=
$flags
?
$flags
:
$conf
[
$this
->
_Prefix
.
'db_client_flags'
];
$this
->
dbHost
=
$host
?
$host
:
$conf
[
'db_host'
];
$this
->
dbPort
=
$port
?
$port
:
$conf
[
'db_port'
];
$this
->
dbName
=
$database
?
$database
:
$conf
[
'db_database'
];
$this
->
dbUser
=
$user
?
$user
:
$conf
[
'db_user'
];
$this
->
dbPass
=
$pass
?
$pass
:
$conf
[
'db_password'
];
$this
->
dbCharset
=
$conf
[
'db_charset'
];
$this
->
dbNewLink
=
$conf
[
'db_new_link'
];
$this
->
dbClientFlags
=
$flags
?
$flags
:
$conf
[
'db_client_flags'
];
$this
->
_iConnId
=
mysqli_init
();
mysqli_real_connect
(
$this
->
_iConnId
,
$this
->
dbHost
,
$this
->
dbUser
,
$this
->
dbPass
,
''
,
(
int
)
$this
->
dbPort
,
NULL
,
$this
->
dbClientFlags
);
...
...
@@ -279,7 +276,7 @@ class db
}
if
(
$try
>
9
)
{
$this
->
_sqlerror
(
'
DB
::_query -> reconnect'
,
''
,
true
);
$this
->
_sqlerror
(
'
db
::_query -> reconnect'
,
''
,
true
);
return
false
;
}
else
{
sleep
((
$try
>
7
?
5
:
1
));
...
...
@@ -547,7 +544,7 @@ class db
//$sAddMsg .= getDebugBacktrace();
if
(
$this
->
show_error_messages
&&
$conf
[
$this
->
_Prefix
.
'demo_mode'
]
===
false
)
{
if
(
$this
->
show_error_messages
&&
$conf
[
'demo_mode'
]
===
false
)
{
echo
$sErrormsg
.
$sAddMsg
;
}
elseif
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
)
&&
$bNoLog
==
false
)
{
$app
->
log
(
$sErrormsg
.
$sAddMsg
.
' -> '
.
$mysql_errno
.
' ('
.
$mysql_error
.
')'
,
LOGLEVEL_WARN
,
false
);
...
...
server/lib/classes/db_mysql.inc.php
View file @
a2ce9dc7
...
...
@@ -43,8 +43,6 @@ class db
private
$_iQueryId
;
private
$_iConnId
;
private
$_Prefix
=
''
;
// config variable name prefix
private
$dbHost
=
''
;
// hostname of the MySQL server
private
$dbPort
=
''
;
// port of the MySQL server
private
$dbName
=
''
;
// logical database name on that server
...
...
@@ -74,18 +72,17 @@ class db
*/
// constructor
public
function
__construct
(
$host
=
NULL
,
$user
=
NULL
,
$pass
=
NULL
,
$database
=
NULL
,
$port
=
NULL
,
$flags
=
NULL
,
$confPrefix
=
''
)
{
public
function
__construct
(
$host
=
NULL
,
$user
=
NULL
,
$pass
=
NULL
,
$database
=
NULL
,
$port
=
NULL
,
$flags
=
NULL
)
{
global
$app
,
$conf
;
if
(
$confPrefix
!=
''
)
$this
->
_Prefix
=
$confPrefix
.
'_'
;
$this
->
dbHost
=
$host
?
$host
:
$conf
[
$this
->
_Prefix
.
'db_host'
];
$this
->
dbPort
=
$port
?
$port
:
$conf
[
$this
->
_Prefix
.
'db_port'
];
$this
->
dbName
=
$database
?
$database
:
$conf
[
$this
->
_Prefix
.
'db_database'
];
$this
->
dbUser
=
$user
?
$user
:
$conf
[
$this
->
_Prefix
.
'db_user'
];
$this
->
dbPass
=
$pass
?
$pass
:
$conf
[
$this
->
_Prefix
.
'db_password'
];
$this
->
dbCharset
=
$conf
[
$this
->
_Prefix
.
'db_charset'
];
$this
->
dbNewLink
=
$conf
[
$this
->
_Prefix
.
'db_new_link'
];
$this
->
dbClientFlags
=
$flags
?
$flags
:
$conf
[
$this
->
_Prefix
.
'db_client_flags'
];
$this
->
dbHost
=
$host
?
$host
:
$conf
[
'db_host'
];
$this
->
dbPort
=
$port
?
$port
:
$conf
[
'db_port'
];
$this
->
dbName
=
$database
?
$database
:
$conf
[
'db_database'
];
$this
->
dbUser
=
$user
?
$user
:
$conf
[
'db_user'
];
$this
->
dbPass
=
$pass
?
$pass
:
$conf
[
'db_password'
];
$this
->
dbCharset
=
$conf
[
'db_charset'
];
$this
->
dbNewLink
=
$conf
[
'db_new_link'
];
$this
->
dbClientFlags
=
$flags
?
$flags
:
$conf
[
'db_client_flags'
];
$this
->
_iConnId
=
mysqli_init
();
mysqli_real_connect
(
$this
->
_iConnId
,
$this
->
dbHost
,
$this
->
dbUser
,
$this
->
dbPass
,
''
,
(
int
)
$this
->
dbPort
,
NULL
,
$this
->
dbClientFlags
);
...
...
@@ -279,7 +276,7 @@ class db
}
if
(
$try
>
9
)
{
$this
->
_sqlerror
(
'
DB
::_query -> reconnect'
,
''
,
true
);
$this
->
_sqlerror
(
'
db
::_query -> reconnect'
,
''
,
true
);
return
false
;
}
else
{
sleep
((
$try
>
7
?
5
:
1
));
...
...
@@ -547,7 +544,7 @@ class db
//$sAddMsg .= getDebugBacktrace();
if
(
$this
->
show_error_messages
&&
$conf
[
$this
->
_Prefix
.
'demo_mode'
]
===
false
)
{
if
(
$this
->
show_error_messages
&&
$conf
[
'demo_mode'
]
===
false
)
{
echo
$sErrormsg
.
$sAddMsg
;
}
elseif
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
)
&&
$bNoLog
==
false
)
{
$app
->
log
(
$sErrormsg
.
$sAddMsg
.
' -> '
.
$mysql_errno
.
' ('
.
$mysql_error
.
')'
,
LOGLEVEL_WARN
,
false
);
...
...
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