File inc/admin.inc.php changed (mode: 100644) (index 2396e8d..3defc63) |
... |
... |
function rg_admin_report1_suggestions($db, $from, $to) |
322 |
322 |
function rg_admin_report1($db, $rg) |
function rg_admin_report1($db, $rg) |
323 |
323 |
{ |
{ |
324 |
324 |
global $rg_admin_email; |
global $rg_admin_email; |
325 |
|
global $rg_web_url; |
|
326 |
325 |
|
|
327 |
326 |
$body = ''; |
$body = ''; |
328 |
327 |
|
|
|
328 |
|
$site = rg_base_url(); |
329 |
329 |
$y_start = gmmktime(0, 0, 0, gmdate("m"), gmdate("d") - 1); |
$y_start = gmmktime(0, 0, 0, gmdate("m"), gmdate("d") - 1); |
330 |
330 |
$y_end = gmmktime(0, 0, 0, gmdate("m"), gmdate("d")) - 1; |
$y_end = gmmktime(0, 0, 0, gmdate("m"), gmdate("d")) - 1; |
331 |
331 |
|
|
332 |
332 |
$body .= "Report between " . gmdate('Y-m-d H:i:s', $y_start) |
$body .= "Report between " . gmdate('Y-m-d H:i:s', $y_start) |
333 |
333 |
. " and " . gmdate('Y-m-d H:i:s', $y_end) . " UTC\n"; |
. " and " . gmdate('Y-m-d H:i:s', $y_end) . " UTC\n"; |
334 |
|
$body .= 'For site ' . $rg_web_url . "\n"; |
|
|
334 |
|
$body .= 'For site ' . $site . "\n"; |
335 |
335 |
|
|
336 |
336 |
$list = array( |
$list = array( |
337 |
337 |
'users' => 'users', |
'users' => 'users', |
|
... |
... |
function rg_admin_report1($db, $rg) |
433 |
433 |
$rg['mail']['subject'] = 'RocketGit report' |
$rg['mail']['subject'] = 'RocketGit report' |
434 |
434 |
. ' [' . $users . 'u]' |
. ' [' . $users . 'u]' |
435 |
435 |
. ' [' . $repos . 'r]' |
. ' [' . $repos . 'r]' |
436 |
|
. ' [' . $total_yesterday_changes . 'c]'; |
|
437 |
|
if (!empty($rg_web_url)) |
|
438 |
|
$rg['mail']['subject'] .= ' (' . $rg_web_url . ')'; |
|
|
436 |
|
. ' [' . $total_yesterday_changes . 'c]' |
|
437 |
|
. ' (' . $site . ')'; |
439 |
438 |
$rg['mail']['body'] = $body; |
$rg['mail']['body'] = $body; |
440 |
439 |
rg_mail_template("mail/admin/report1", $rg); |
rg_mail_template("mail/admin/report1", $rg); |
441 |
440 |
} |
} |