some formatting changes to make inblobs work
This commit is contained in:
parent
ed5e91d60d
commit
ac7a1387ba
@ -56,7 +56,7 @@ class Inbox extends Memcached_DataObject
|
|||||||
$inbox = new Inbox();
|
$inbox = new Inbox();
|
||||||
|
|
||||||
$inbox->query(sprintf('UPDATE inbox '.
|
$inbox->query(sprintf('UPDATE inbox '.
|
||||||
'set notice_ids = concat(cast(%08x as binary(4)), '.
|
'set notice_ids = concat(cast(0x%08x as binary(4)), '.
|
||||||
'substr(notice_ids, 1, 4092)) '.
|
'substr(notice_ids, 1, 4092)) '.
|
||||||
'WHERE user_id = %d',
|
'WHERE user_id = %d',
|
||||||
$notice_id, $user_id));
|
$notice_id, $user_id));
|
||||||
@ -77,7 +77,7 @@ class Inbox extends Memcached_DataObject
|
|||||||
$inbox = new Inbox();
|
$inbox = new Inbox();
|
||||||
|
|
||||||
$inbox->query(sprintf('UPDATE inbox '.
|
$inbox->query(sprintf('UPDATE inbox '.
|
||||||
'set notice_ids = concat(cast(%08x as binary(4)), '.
|
'set notice_ids = concat(cast(0x%08x as binary(4)), '.
|
||||||
'substr(notice_ids, 1, 4092)) '.
|
'substr(notice_ids, 1, 4092)) '.
|
||||||
'WHERE user_id in (%s)',
|
'WHERE user_id in (%s)',
|
||||||
$notice_id, implode(',', $boxcar)));
|
$notice_id, implode(',', $boxcar)));
|
||||||
@ -94,11 +94,13 @@ class Inbox extends Memcached_DataObject
|
|||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$ids = unpack('L*', $inbox->notice_ids);
|
$ids = unpack('N*', $inbox->notice_ids);
|
||||||
|
|
||||||
// XXX: handle since_id
|
// XXX: handle since_id
|
||||||
// XXX: handle max_id
|
// XXX: handle max_id
|
||||||
|
|
||||||
$ids = array_slice($ids, $offset, $limit);
|
$ids = array_slice($ids, $offset, $limit);
|
||||||
|
|
||||||
|
return $ids;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,6 +296,7 @@ class User extends Memcached_DataObject
|
|||||||
$inbox = new Inbox();
|
$inbox = new Inbox();
|
||||||
|
|
||||||
$inbox->user_id = $user->id;
|
$inbox->user_id = $user->id;
|
||||||
|
$inbox->notice_ids = '';
|
||||||
|
|
||||||
$result = $inbox->insert();
|
$result = $inbox->insert();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user