Skip to content
GitLab
Menu
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
bc569728
Commit
bc569728
authored
Feb 10, 2010
by
tbrehm
Browse files
Improved error handling on decoding errors in the server part.
parent
d0fc019d
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/classes/modules.inc.php
View file @
bc569728
...
...
@@ -98,14 +98,12 @@ class modules {
$data
=
unserialize
(
$d
[
"data"
]);
}
//** Decode data back to locale
/*
foreach
(
$data
[
'old'
]
as
$key
=>
$val
)
{
$data
[
'old'
][
$key
]
=
utf8_decode
(
$val
);
}
foreach
(
$data
[
'new'
]
as
$key
=>
$val
)
{
$data
[
'new'
][
$key
]
=
utf8_decode
(
$val
);
}
*/
$replication_error
=
false
;
...
...
@@ -165,7 +163,12 @@ class modules {
if
(
$replication_error
==
false
)
{
$this
->
raiseTableHook
(
$d
[
"dbtable"
],
$d
[
"action"
],
$data
);
if
(
is_array
(
$data
[
'old'
])
||
is_array
(
$data
[
'new'
]))
{
$this
->
raiseTableHook
(
$d
[
"dbtable"
],
$d
[
"action"
],
$data
);
}
else
{
$app
->
log
(
"Data array was empty for datalog_id "
.
$d
[
"datalog_id"
],
LOGLEVEL_WARN
);
}
//$this->raiseTableHook($d["dbtable"],$d["action"],$data);
//$app->dbmaster->query("DELETE FROM sys_datalog WHERE datalog_id = ".$d["datalog_id"]);
//$app->log("Deleting sys_datalog ID ".$d["datalog_id"],LOGLEVEL_DEBUG);
$app
->
dbmaster
->
query
(
"UPDATE server SET updated = "
.
$d
[
"datalog_id"
]
.
" WHERE server_id = "
.
$conf
[
"server_id"
]);
...
...
@@ -194,17 +197,19 @@ class modules {
$data
=
unserialize
(
$d
[
"data"
]);
}
//** decode data back to current locale
/*
foreach
(
$data
[
'old'
]
as
$key
=>
$val
)
{
$data
[
'old'
][
$key
]
=
utf8_decode
(
$val
);
}
foreach
(
$data
[
'new'
]
as
$key
=>
$val
)
{
$data
[
'new'
][
$key
]
=
utf8_decode
(
$val
);
}
*/
$this
->
current_datalog_id
=
$d
[
"datalog_id"
];
$this
->
raiseTableHook
(
$d
[
"dbtable"
],
$d
[
"action"
],
$data
);
if
(
is_array
(
$data
[
'old'
])
||
is_array
(
$data
[
'new'
]))
{
$this
->
raiseTableHook
(
$d
[
"dbtable"
],
$d
[
"action"
],
$data
);
}
else
{
$app
->
log
(
"Data array was empty for datalog_id "
.
$d
[
"datalog_id"
],
LOGLEVEL_WARN
);
}
//$app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]);
//$app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG);
$app
->
db
->
query
(
"UPDATE server SET updated = "
.
$d
[
"datalog_id"
]
.
" WHERE server_id = "
.
$conf
[
"server_id"
]);
...
...
Write
Preview
Supports
Markdown
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