Revert "don't insert the same notice twice into an inbox"
This reverts commit 650074c648d98f81674c6e2b0ebf052c473ada6e.
This commit is contained in:
parent
8b24ad8a9c
commit
a09b27ff41
@ -114,16 +114,6 @@ class Inbox extends Memcached_DataObject
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ids = unpack('N*', $inbox->notice_ids);
|
|
||||||
|
|
||||||
// bulk inserts sometimes fail and get restarted.
|
|
||||||
// Skip if this one has been inserted before.
|
|
||||||
|
|
||||||
if (in_array($notice_id, $ids)) {
|
|
||||||
// effectively successful
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $inbox->query(sprintf('UPDATE inbox '.
|
$result = $inbox->query(sprintf('UPDATE inbox '.
|
||||||
'set notice_ids = concat(cast(0x%08x as binary(4)), '.
|
'set notice_ids = concat(cast(0x%08x as binary(4)), '.
|
||||||
'substr(notice_ids, 1, %d)) '.
|
'substr(notice_ids, 1, %d)) '.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user