File scripts/cron.php changed (mode: 100644) (index c03d79a..6aaa8fb) |
... |
... |
if (gmdate("Hi") == "0105") { |
140 |
140 |
. " WHERE uid = " . $row['uid'] |
. " WHERE uid = " . $row['uid'] |
141 |
141 |
. " AND disk_used_mb != " . $row['disk_used_mb']; |
. " AND disk_used_mb != " . $row['disk_used_mb']; |
142 |
142 |
$res2 = rg_sql_query($db, $sql); |
$res2 = rg_sql_query($db, $sql); |
143 |
|
rg_sql_free_result($res2); |
|
|
143 |
|
if ($res2 !== FALSE) |
|
144 |
|
rg_sql_free_result($res2); |
144 |
145 |
} |
} |
145 |
146 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
146 |
147 |
break; |
break; |
|
... |
... |
if (gmdate("Hi") == "0105") { |
150 |
151 |
if (gmdate("Hi") == "0300") { |
if (gmdate("Hi") == "0300") { |
151 |
152 |
rg_log_enter("Clean old forget_pass entries..."); |
rg_log_enter("Clean old forget_pass entries..."); |
152 |
153 |
$sql = "DELETE FROM forgot_pass WHERE expire < $now"; |
$sql = "DELETE FROM forgot_pass WHERE expire < $now"; |
153 |
|
$res = rg_sql_query($db, $sql); |
|
|
154 |
|
if ($res !== FALSE) |
|
155 |
|
$res = rg_sql_query($db, $sql); |
154 |
156 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
155 |
157 |
rg_log_exit(); |
rg_log_exit(); |
156 |
158 |
} |
} |
|
... |
... |
if (gmdate("i") == "30") { |
159 |
161 |
rg_log_enter("Clean old tokens..."); |
rg_log_enter("Clean old tokens..."); |
160 |
162 |
$sql = "DELETE FROM tokens WHERE expire < $now"; |
$sql = "DELETE FROM tokens WHERE expire < $now"; |
161 |
163 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
162 |
|
rg_sql_free_result($res); |
|
|
164 |
|
if ($res !== FALSE) |
|
165 |
|
rg_sql_free_result($res); |
163 |
166 |
rg_log_exit(); |
rg_log_exit(); |
164 |
167 |
} |
} |
165 |
168 |
|
|
|
... |
... |
if (gmdate("i") == "01") { |
167 |
170 |
rg_log_enter("Clean old sess entries..."); |
rg_log_enter("Clean old sess entries..."); |
168 |
171 |
$sql = "DELETE FROM sess WHERE expire < $now"; |
$sql = "DELETE FROM sess WHERE expire < $now"; |
169 |
172 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
170 |
|
rg_sql_free_result($res); |
|
|
173 |
|
if ($res !== FALSE) |
|
174 |
|
rg_sql_free_result($res); |
171 |
175 |
rg_log_exit(); |
rg_log_exit(); |
172 |
176 |
} |
} |
173 |
177 |
|
|
|
... |
... |
if (gmdate("Hi") == "0605") { |
175 |
179 |
rg_log_enter("Clean old login_tokens_ip entries..."); |
rg_log_enter("Clean old login_tokens_ip entries..."); |
176 |
180 |
$sql = "DELETE FROM login_tokens_ip WHERE expire < $now"; |
$sql = "DELETE FROM login_tokens_ip WHERE expire < $now"; |
177 |
181 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
178 |
|
rg_sql_free_result($res); |
|
|
182 |
|
if ($res !== FALSE) |
|
183 |
|
rg_sql_free_result($res); |
179 |
184 |
rg_log_exit(); |
rg_log_exit(); |
180 |
185 |
} |
} |
181 |
186 |
|
|