| File inc/admin.inc.php changed (mode: 100644) (index 4a59268..c789d85) |
| ... |
... |
function rg_init($db, $rg) |
| 266 |
266 |
function rg_admin_report1_suggestions($db, $from, $to) |
function rg_admin_report1_suggestions($db, $from, $to) |
| 267 |
267 |
{ |
{ |
| 268 |
268 |
$ret = array(); |
$ret = array(); |
| 269 |
|
$ret['yesterday'] = ""; |
|
|
269 |
|
$ret['yesterday'] = 0; |
|
270 |
|
$ret['yesterday_text'] = ''; |
|
271 |
|
$ret['total'] = 0; |
| 270 |
272 |
|
|
| 271 |
273 |
// Total |
// Total |
| 272 |
274 |
$sql = "SELECT COUNT(*) AS total FROM suggestions"; |
$sql = "SELECT COUNT(*) AS total FROM suggestions"; |
| 273 |
275 |
$res = rg_sql_query($db, $sql); |
$res = rg_sql_query($db, $sql); |
| 274 |
276 |
if ($res === FALSE) { |
if ($res === FALSE) { |
| 275 |
|
$ret['total'] = "ERR"; |
|
|
277 |
|
$ret['total'] = -1; |
| 276 |
278 |
} else { |
} else { |
| 277 |
279 |
$row = rg_sql_fetch_array($res); |
$row = rg_sql_fetch_array($res); |
| 278 |
280 |
$ret['total'] = $row['total']; |
$ret['total'] = $row['total']; |
| |
| ... |
... |
function rg_admin_report1_suggestions($db, $from, $to) |
| 295 |
297 |
$list .= sprintf("%8u %s\n", |
$list .= sprintf("%8u %s\n", |
| 296 |
298 |
$row['uid'], $row['suggestion']); |
$row['uid'], $row['suggestion']); |
| 297 |
299 |
} |
} |
|
300 |
|
$ret['yesterday'] = $count; |
| 298 |
301 |
if ($count) |
if ($count) |
| 299 |
|
$ret['yesterday'] = "\nYesterday suggestions" |
|
|
302 |
|
$ret['yesterday_text'] = "\nYesterday suggestions" |
| 300 |
303 |
. " (" . $count . "):\n" . $list; |
. " (" . $count . "):\n" . $list; |
| 301 |
304 |
} |
} |
| 302 |
305 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
| |
| ... |
... |
function rg_admin_report1($db, $rg) |
| 391 |
394 |
$rg['mail']['subject'] = 'RocketGit report' |
$rg['mail']['subject'] = 'RocketGit report' |
| 392 |
395 |
. ' [' . $users . '/' . $total_users . ']' |
. ' [' . $users . '/' . $total_users . ']' |
| 393 |
396 |
. ' [' . $repos . '/' . $total_repos . ']' |
. ' [' . $repos . '/' . $total_repos . ']' |
| 394 |
|
. $sug['yesterday'] . 's'; |
|
|
397 |
|
. ' ' . $sug['yesterday'] . 's'; |
| 395 |
398 |
$rg['mail']['body'] = $body; |
$rg['mail']['body'] = $body; |
| 396 |
399 |
rg_mail_template("mail/admin/report1", $rg); |
rg_mail_template("mail/admin/report1", $rg); |
| 397 |
400 |
} |
} |
| File inc/struct.inc.php changed (mode: 100644) (index 6d5654f..da058c3) |
| ... |
... |
$rg_sql_struct[33]['other'] = array( |
| 423 |
423 |
|
|
| 424 |
424 |
TODO: do not fill email in suggestions - we have the uid! |
TODO: do not fill email in suggestions - we have the uid! |
| 425 |
425 |
TODO: "suggestion_drop_email" => "ALTER TABLE suggestions DROP email" |
TODO: "suggestion_drop_email" => "ALTER TABLE suggestions DROP email" |
|
426 |
|
TODO: change report1 to activate yesterday suggestions! |
| 426 |
427 |
*/ |
*/ |
| 427 |
428 |
|
|
| 428 |
429 |
// This must be the last line |
// This must be the last line |