| File inc/log.inc.php changed (mode: 100644) (index 7a79135..cbaa979) |
| ... |
... |
function rg_log_cron() |
| 175 |
175 |
|
|
| 176 |
176 |
// Do not send less than 1 per 4 hours |
// Do not send less than 1 per 4 hours |
| 177 |
177 |
$last_ts = 0; |
$last_ts = 0; |
| 178 |
|
if (file_exists($rg_state_dir . "/log_cron_last")) |
|
| 179 |
|
$last_ts = @filemtime($rg_state_dir . "/log_cron_last"); |
|
|
178 |
|
if (file_exists($rg_state_dir . '/tmp/log_cron_last')) |
|
179 |
|
$last_ts = @filemtime($rg_state_dir . '/tmp/log_cron_last'); |
| 180 |
180 |
|
|
| 181 |
181 |
if ($last_ts + 4 * 3600 > time()) |
if ($last_ts + 4 * 3600 > time()) |
| 182 |
182 |
return 0; |
return 0; |
| |
| ... |
... |
function rg_log_cron() |
| 189 |
189 |
'Content-Type: text/plain;charset=UTF-8', |
'Content-Type: text/plain;charset=UTF-8', |
| 190 |
190 |
"-f $rg_admin_email"); |
"-f $rg_admin_email"); |
| 191 |
191 |
|
|
| 192 |
|
file_put_contents($rg_state_dir . "/log_cron_last", time()); |
|
|
192 |
|
file_put_contents($rg_state_dir . '/tmp/log_cron_last', time()); |
| 193 |
193 |
} |
} |
| 194 |
194 |
|
|
| 195 |
195 |
function rg_fatal($msg) |
function rg_fatal($msg) |