Skip to content

Commit

Permalink
Distinguish between adding and updating a bill
Browse files Browse the repository at this point in the history
  • Loading branch information
waldoj committed Jan 15, 2024
1 parent 5446974 commit baa67d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cron/bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@
# Memcached.
$mc->delete('bill-' . $existing_bill['id']);

$operation_type = 'Updated';

}
else
{
$sql = 'INSERT INTO bills SET date_created=now(), ';
$operation_type = 'Added';
}

# Now create the code to insert the bill or update the bill, depending
Expand Down Expand Up @@ -171,7 +174,7 @@
else
{

$log->put('Added/Updated ' . strtoupper($bill['number']) . ': ' . $bill['catch_line']
$log->put($operation_type . ' ' . strtoupper($bill['number']) . ': ' . $bill['catch_line']
. ' (https://richmondsunlight.com/bill/' . SESSION_YEAR . '/' . $bill['number']
. '/)', 3);

Expand Down

0 comments on commit baa67d7

Please sign in to comment.