convert ITEM_WALL from bitfield to standalone

This commit is contained in:
redmatrix
2015-05-06 21:03:33 -07:00
parent 75b8bfc07a
commit 25b599a4bd
29 changed files with 98 additions and 90 deletions

View File

@@ -228,10 +228,9 @@ function notifier_run($argv, $argc){
$normal_mode = false;
$expire = true;
$items = q("SELECT * FROM item WHERE uid = %d AND ( item_flags & %d )>0
$items = q("SELECT * FROM item WHERE uid = %d AND item_wall = 1
AND ( item_restrict & %d )>0 AND `changed` > %s - INTERVAL %s",
intval($item_id),
intval(ITEM_WALL),
intval(ITEM_DELETED),
db_utcnow(), db_quoteinterval('10 MINUTE')
);
@@ -457,7 +456,7 @@ function notifier_run($argv, $argc){
// don't send deletions onward for other people's stuff
// TODO verify this is needed - copied logic from same place in old code
if(($target_item['item_restrict'] & ITEM_DELETED) && (!($target_item['item_flags'] & ITEM_WALL))) {
if(($target_item['item_restrict'] & ITEM_DELETED) && (! intval($target_item['item_wall']))) {
logger('notifier: ignoring delete notification for non-wall item');
return;
}