Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
942538fc
Commit
942538fc
authored
Mar 03, 2010
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved sys_datalog cleanup: FS#1089 - Clean sys_datalog
parent
ab614042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
server/cron_daily.php
server/cron_daily.php
+7
-5
No files found.
server/cron_daily.php
View file @
942538fc
...
...
@@ -225,17 +225,19 @@ if ($app->dbmaster == $app->db) {
/* Then delete server by server */
foreach
(
$records
as
$server
)
{
$sql
=
"DELETE FROM sys_datalog WHERE tstamp < "
.
$tstamp
.
" AND server_id != 0 "
.
// to be more secure!
" AND server_id = "
.
intval
(
$server
[
'server_id'
])
.
" AND datalog_id < "
.
intval
(
$server
[
'updated'
]);
$tmp_server_id
=
intval
(
$server
[
'server_id'
]);
if
(
$tmp_server_id
>
0
)
{
$sql
=
"DELETE FROM sys_datalog WHERE tstamp < "
.
$tstamp
.
" AND server_id = "
.
intval
(
$server
[
'server_id'
])
.
" AND datalog_id < "
.
intval
(
$server
[
'updated'
]);
}
// echo $sql . "\n";
$app
->
dbmaster
->
query
(
$sql
);
}
}
#######################################################################################################
// enforce traffic quota (only the "master-server")
// enforce traffic quota (
run
only
on
the "master-server")
#######################################################################################################
if
(
$app
->
dbmaster
==
$app
->
db
)
{
...
...
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