Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Commit 0437479

Browse files
committed
Added cron call to save campaign total progress.
1 parent 57f85e6 commit 0437479

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/modules/dosomething/dosomething_reportback/dosomething_reportback.cron.inc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ function dosomething_reportback_cron() {
2222
// Updated reportback counts accordingly.
2323
foreach ($results as $result) {
2424
dosomething_helpers_set_variable('node', $result->nid, 'sum_rb_quanity', (int) $result->total);
25+
26+
// Add a row to the reportback progress log table.
27+
db_insert('dosomething_reportback_progress_log')
28+
->fields(array(
29+
'nid' => $result->nid,
30+
'quantity' => $result->total,
31+
'timestamp' => REQUEST_TIME,
32+
))
33+
->execute();
2534
}
2635

2736
}

0 commit comments

Comments
 (0)