mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Pretty print SQL
This commit is contained in:
parent
31a8bc2d6c
commit
26a24cdbe2
17 changed files with 316 additions and 82 deletions
|
@ -36,7 +36,12 @@ try{
|
|||
// Received when a user marks an email as spam
|
||||
$log->Write('Event type: spam complaint.');
|
||||
|
||||
Db::Query('DELETE ns.* from NewsletterSubscriptions ns inner join Users u using(UserId) where u.Email = ?', [$post->Email]);
|
||||
Db::Query('
|
||||
DELETE ns.*
|
||||
from NewsletterSubscriptions ns
|
||||
inner join Users u using(UserId)
|
||||
where u.Email = ?
|
||||
', [$post->Email]);
|
||||
}
|
||||
elseif($post->RecordType == 'SubscriptionChange' && $post->SuppressSending){
|
||||
// Received when a user clicks Postmark's "Unsubscribe" link in a newsletter email
|
||||
|
@ -45,7 +50,12 @@ try{
|
|||
$email = $post->Recipient;
|
||||
|
||||
// Remove the email from our newsletter list
|
||||
Db::Query('DELETE ns.* from NewsletterSubscriptions ns inner join Users u using(UserId) where u.Email = ?', [$email]);
|
||||
Db::Query('
|
||||
DELETE ns.*
|
||||
from NewsletterSubscriptions ns
|
||||
inner join Users u using(UserId)
|
||||
where u.Email = ?
|
||||
', [$email]);
|
||||
|
||||
// Remove the suppression from Postmark, since we deleted it from our own list we will never email them again anyway
|
||||
$handle = curl_init();
|
||||
|
|
|
@ -37,7 +37,12 @@ try{
|
|||
if(sizeof($matches) == 2){
|
||||
$transactionId = $matches[1];
|
||||
|
||||
Db::Query('INSERT into PendingPayments (Created, ChannelId, TransactionId) values (utc_timestamp(), ?, ?);', [PAYMENT_CHANNEL_FA, $transactionId]);
|
||||
Db::Query('
|
||||
INSERT into PendingPayments (Created, ChannelId, TransactionId)
|
||||
values (utc_timestamp(),
|
||||
?,
|
||||
?)
|
||||
', [PAYMENT_CHANNEL_FA, $transactionId]);
|
||||
|
||||
$log->Write('Donation ID: ' . $transactionId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue