forked from GNUsocial/gnu-social
duplicate confirmation to avoid where clause
darcs-hash:20080913164333-84dde-ef4f3363e045aabd52173ea9be34b2f59f64d084.gz
This commit is contained in:
parent
ed57778b92
commit
e84439d5c5
@ -66,15 +66,22 @@ class XmppConfirmHandler extends XmppQueueHandler {
|
||||
continue;
|
||||
} else {
|
||||
$this->log(LOG_INFO, 'Confirmation sent for ' . $confirm->address);
|
||||
# Mark confirmation sent
|
||||
$original = clone($confirm);
|
||||
$confirm->sent = $confirm->claimed;
|
||||
$result = $confirm->update($original);
|
||||
# Mark confirmation sent; need a dupe so we don't have the WHERE clause
|
||||
$dupe = Confirm_address::staticGet('code', $confirm->code);
|
||||
if (!$dupe) {
|
||||
common_log(LOG_WARNING, 'Could not refetch confirm', __FILE__);
|
||||
continue;
|
||||
}
|
||||
$orig = clone($dupe);
|
||||
$dupe->sent = $dupe->claimed;
|
||||
$result = $dupe->update($orig);
|
||||
if (!$result) {
|
||||
common_log_db_error($confirm, 'UPDATE', __FILE__);
|
||||
common_log_db_error($dupe, 'UPDATE', __FILE__);
|
||||
# Just let the claim age out; hopefully things work then
|
||||
continue;
|
||||
}
|
||||
$dupe->free();
|
||||
unset($dupe);
|
||||
}
|
||||
$user->free();
|
||||
unset($user);
|
||||
|
Loading…
Reference in New Issue
Block a user