implement "moderate" flag on items
This commit is contained in:
@@ -650,7 +650,7 @@
|
||||
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
|
||||
FROM `item`, `contact`
|
||||
WHERE `item`.`uid` = %d
|
||||
AND `item`.`visible` = 1 AND `item`.`deleted` = 0
|
||||
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||
AND `contact`.`id` = `item`.`contact-id`
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
$sql_extra
|
||||
@@ -707,7 +707,7 @@
|
||||
FROM `item`, `contact`
|
||||
WHERE `item`.`uid` = %d
|
||||
AND `item`.`contact-id` = %d
|
||||
AND `item`.`visible` = 1 AND `item`.`deleted` = 0
|
||||
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||
AND `contact`.`id` = `item`.`contact-id`
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
$sql_extra
|
||||
@@ -761,7 +761,7 @@
|
||||
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
|
||||
FROM `item`, `contact`
|
||||
WHERE `item`.`uid` = %d
|
||||
AND `item`.`visible` = 1 AND `item`.`deleted` = 0
|
||||
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||
AND `item`.`starred` = 1
|
||||
AND `contact`.`id` = `item`.`contact-id`
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
|
||||
@@ -84,7 +84,7 @@ function delivery_run($argv, $argc){
|
||||
else {
|
||||
|
||||
// find ancestors
|
||||
$r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
|
||||
$r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1",
|
||||
intval($item_id)
|
||||
);
|
||||
|
||||
@@ -102,7 +102,7 @@ function delivery_run($argv, $argc){
|
||||
|
||||
|
||||
$items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
|
||||
FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d ORDER BY `id` ASC",
|
||||
FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC",
|
||||
intval($parent_id)
|
||||
);
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
||||
`sign`.`signed_text`, `sign`.`signature`, `sign`.`signer`
|
||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||
LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`
|
||||
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`parent` != 0
|
||||
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`parent` != 0
|
||||
AND `item`.`wall` = 1 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' )
|
||||
$sql_extra
|
||||
@@ -1414,7 +1414,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
||||
intval($item['uid'])
|
||||
);
|
||||
// who is the last child now?
|
||||
$r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `uid` = %d
|
||||
$r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `moderated` = 0 AND `uid` = %d
|
||||
ORDER BY `created` DESC LIMIT 1",
|
||||
dbesc($item['parent-uri']),
|
||||
intval($importer['uid'])
|
||||
|
||||
@@ -111,7 +111,7 @@ function notifier_run($argv, $argc){
|
||||
else {
|
||||
|
||||
// find ancestors
|
||||
$r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
|
||||
$r = q("SELECT * FROM `item` WHERE `id` = %d and visible = 1 and moderated = 0 LIMIT 1",
|
||||
intval($item_id)
|
||||
);
|
||||
|
||||
@@ -128,7 +128,7 @@ function notifier_run($argv, $argc){
|
||||
return;
|
||||
|
||||
$items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
|
||||
FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d ORDER BY `id` ASC",
|
||||
FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d and visible = 1 and moderated = 0 ORDER BY `id` ASC",
|
||||
intval($parent_id)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user