| File inc/admin.inc.php changed (mode: 100644) (index f8eb44b..de72feb) |
| ... |
... |
function rg_admin_report1_suggestions($db, $from, $to) |
| 408 |
408 |
*/ |
*/ |
| 409 |
409 |
function rg_admin_report1($db, $rg) |
function rg_admin_report1($db, $rg) |
| 410 |
410 |
{ |
{ |
| 411 |
|
global $rg_admin_email; |
|
|
411 |
|
global $rg_service_email; |
|
412 |
|
|
|
413 |
|
if (empty($rg_service_email)) { |
|
414 |
|
return; |
|
415 |
|
} |
| 412 |
416 |
|
|
| 413 |
417 |
$body = ''; |
$body = ''; |
| 414 |
418 |
|
|
| |
| ... |
... |
function rg_admin_report1($db, $rg) |
| 546 |
550 |
} |
} |
| 547 |
551 |
|
|
| 548 |
552 |
$rg['ui']['ignore_confirmed'] = 1; |
$rg['ui']['ignore_confirmed'] = 1; |
| 549 |
|
$rg['ui']['email'] = $rg_admin_email; |
|
|
553 |
|
$rg['ui']['email'] = $rg_service_email; |
| 550 |
554 |
$rg['mail'] = array(); |
$rg['mail'] = array(); |
| 551 |
555 |
$rg['mail']['subject'] = 'RocketGit report' |
$rg['mail']['subject'] = 'RocketGit report' |
| 552 |
556 |
. ' [' . $g['users']['yesterday'] . 'u]' |
. ' [' . $g['users']['yesterday'] . 'u]' |
| File inc/log.inc.php changed (mode: 100644) (index 615ff5a..8949a4b) |
| ... |
... |
function rg_error_core($msg) |
| 160 |
160 |
function rg_log_cron() |
function rg_log_cron() |
| 161 |
161 |
{ |
{ |
| 162 |
162 |
global $rg_log_dir; |
global $rg_log_dir; |
| 163 |
|
global $rg_admin_email; |
|
|
163 |
|
global $rg_service_email; |
| 164 |
164 |
global $rg_state_dir; |
global $rg_state_dir; |
| 165 |
165 |
|
|
|
166 |
|
if (empty($rg_service_email)) |
|
167 |
|
return; |
|
168 |
|
|
| 166 |
169 |
$nd = rg_dir_load_pattern($rg_log_dir, "err-.*"); |
$nd = rg_dir_load_pattern($rg_log_dir, "err-.*"); |
| 167 |
170 |
if ($nd === FALSE) |
if ($nd === FALSE) |
| 168 |
171 |
$ncount = "?"; |
$ncount = "?"; |
| |
| ... |
... |
function rg_log_cron() |
| 180 |
183 |
if ($last_ts + 4 * 3600 > time()) |
if ($last_ts + 4 * 3600 > time()) |
| 181 |
184 |
return 0; |
return 0; |
| 182 |
185 |
|
|
| 183 |
|
mail($rg_admin_email, |
|
|
186 |
|
mail($rg_service_email, |
| 184 |
187 |
$ncount . ' errors are waiting...', |
$ncount . ' errors are waiting...', |
| 185 |
188 |
'Please forward the content of /var/log/rocketgit/err-*' |
'Please forward the content of /var/log/rocketgit/err-*' |
| 186 |
189 |
. ' to RocketGit developers at rg-bugs@embedromix.ro.\n\n' |
. ' to RocketGit developers at rg-bugs@embedromix.ro.\n\n' |
| 187 |
190 |
. 'Thank you!\n\n', |
. 'Thank you!\n\n', |
| 188 |
191 |
'Content-Type: text/plain;charset=UTF-8', |
'Content-Type: text/plain;charset=UTF-8', |
| 189 |
|
"-f $rg_admin_email"); |
|
|
192 |
|
"-f $rg_service_email"); |
| 190 |
193 |
|
|
| 191 |
194 |
file_put_contents($rg_state_dir . '/tmp/log_cron_last', time()); |
file_put_contents($rg_state_dir . '/tmp/log_cron_last', time()); |
| 192 |
195 |
} |
} |
| File samples/config.php changed (mode: 100644) (index abd2770..bf7e71b) |
| ... |
... |
$rg_ssh_paras = "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty |
| 41 |
41 |
$rg_admin_name = "RocketGit Admin"; |
$rg_admin_name = "RocketGit Admin"; |
| 42 |
42 |
$rg_admin_email = ''; |
$rg_admin_email = ''; |
| 43 |
43 |
|
|
|
44 |
|
// When non-empty, address for sending daily statistics. |
|
45 |
|
$rg_service_email = ''; |
|
46 |
|
|
| 44 |
47 |
// Set to 1 to allow any visitor to create an account. |
// Set to 1 to allow any visitor to create an account. |
| 45 |
48 |
// Else, only the admin can create accounts. |
// Else, only the admin can create accounts. |
| 46 |
49 |
$rg_account_allow_creation = 1; |
$rg_account_allow_creation = 1; |