Skip to content
GitLab
Explore
Sign in
Register
Helmo
ISPConfig 3
Compare revisions
0b3a1849b93a1284f6b38a3ccea36bb28786eb2e to 99758371b59e988a5e33c917afc414570205ac0b
Commits on Source (3)
Revert "Add the LOGLEVEL_INFO constant to avoid Use of undefined constant warnings"
· ab25ad16
Helmo
authored
Feb 21, 2019
This reverts commit
0b3a1849
.
ab25ad16
Purge LOGLEVEL_INFO as it was not defined
· e6674bf8
Helmo
authored
Feb 21, 2019
e6674bf8
comment a debug line that tries to log an undefined variable.
· 99758371
Helmo
authored
Feb 21, 2019
99758371
Hide whitespace changes
Inline
Side-by-side
install/tpl/config.inc.php.master
View file @
99758371
...
...
@@ -173,7 +173,6 @@ $conf['start_session'] = true;
define
(
'LOGLEVEL_DEBUG'
,
0
);
define
(
'LOGLEVEL_WARN'
,
1
);
define
(
'LOGLEVEL_ERROR'
,
2
);
define
(
'LOGLEVEL_INFO'
,
3
);
//** include a local config-file if there is one
//** IMPORTANT!!!
...
...
interface/lib/classes/db_mysql.inc.php
View file @
99758371
...
...
@@ -514,16 +514,16 @@ class db
public
function
escape
(
$sString
)
{
global
$app
;
if
(
!
is_string
(
$sString
)
&&
!
is_numeric
(
$sString
))
{
$app
->
log
(
'NON-String given in escape function! ('
.
gettype
(
$sString
)
.
')'
,
LOGLEVEL_
INFO
);
$app
->
log
(
'NON-String given in escape function! ('
.
gettype
(
$sString
)
.
')'
,
LOGLEVEL_
DEBUG
);
//$sAddMsg = getDebugBacktrace();
$app
->
log
(
$sAddMsg
,
LOGLEVEL_DEBUG
);
//
$app->log($sAddMsg, LOGLEVEL_DEBUG);
$sString
=
''
;
}
$cur_encoding
=
mb_detect_encoding
(
$sString
);
if
(
$cur_encoding
!=
"UTF-8"
)
{
if
(
$cur_encoding
!=
'ASCII'
)
{
if
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
))
$app
->
log
(
'String '
.
substr
(
$sString
,
0
,
25
)
.
'... is '
.
$cur_encoding
.
'.'
,
LOGLEVEL_
INFO
);
if
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
))
$app
->
log
(
'String '
.
substr
(
$sString
,
0
,
25
)
.
'... is '
.
$cur_encoding
.
'.'
,
LOGLEVEL_
DEBUG
);
if
(
$cur_encoding
)
$sString
=
mb_convert_encoding
(
$sString
,
'UTF-8'
,
$cur_encoding
);
else
$sString
=
mb_convert_encoding
(
$sString
,
'UTF-8'
);
}
...
...
interface/lib/config.inc.php
View file @
99758371
...
...
@@ -162,6 +162,5 @@ $conf['start_session'] = true;
define
(
'LOGLEVEL_DEBUG'
,
0
);
define
(
'LOGLEVEL_WARN'
,
1
);
define
(
'LOGLEVEL_ERROR'
,
2
);
define
(
'LOGLEVEL_INFO'
,
3
);
?>
server/lib/classes/db_mysql.inc.php
View file @
99758371
...
...
@@ -514,16 +514,16 @@ class db
public
function
escape
(
$sString
)
{
global
$app
;
if
(
!
is_string
(
$sString
)
&&
!
is_numeric
(
$sString
))
{
$app
->
log
(
'NON-String given in escape function! ('
.
gettype
(
$sString
)
.
')'
,
LOGLEVEL_
INFO
);
$app
->
log
(
'NON-String given in escape function! ('
.
gettype
(
$sString
)
.
')'
,
LOGLEVEL_
DEBUG
);
//$sAddMsg = getDebugBacktrace();
$app
->
log
(
$sAddMsg
,
LOGLEVEL_DEBUG
);
//
$app->log($sAddMsg, LOGLEVEL_DEBUG);
$sString
=
''
;
}
$cur_encoding
=
mb_detect_encoding
(
$sString
);
if
(
$cur_encoding
!=
"UTF-8"
)
{
if
(
$cur_encoding
!=
'ASCII'
)
{
if
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
))
$app
->
log
(
'String '
.
substr
(
$sString
,
0
,
25
)
.
'... is '
.
$cur_encoding
.
'.'
,
LOGLEVEL_
INFO
);
if
(
is_object
(
$app
)
&&
method_exists
(
$app
,
'log'
))
$app
->
log
(
'String '
.
substr
(
$sString
,
0
,
25
)
.
'... is '
.
$cur_encoding
.
'.'
,
LOGLEVEL_
DEBUG
);
if
(
$cur_encoding
)
$sString
=
mb_convert_encoding
(
$sString
,
'UTF-8'
,
$cur_encoding
);
else
$sString
=
mb_convert_encoding
(
$sString
,
'UTF-8'
);
}
...
...