aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-19 06:58:03 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-19 06:58:03 -0700
commit6695b4a203ab03941c8b3305a3e55cc02b85a5ac (patch)
tree47af4ee89d71b4c0584ae30da1883d5ae9e933a2 /include
parentbbe53699f26bfa4e4d17da097fd8f2fc14da47dd (diff)
downloadvolse-hubzilla-6695b4a203ab03941c8b3305a3e55cc02b85a5ac.tar.gz
volse-hubzilla-6695b4a203ab03941c8b3305a3e55cc02b85a5ac.tar.bz2
volse-hubzilla-6695b4a203ab03941c8b3305a3e55cc02b85a5ac.zip
more bugs
Diffstat (limited to 'include')
-rw-r--r--include/items.php4
-rw-r--r--include/notifier.php2
-rw-r--r--include/security.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index d583ffecc..937fc39fd 100644
--- a/include/items.php
+++ b/include/items.php
@@ -63,7 +63,7 @@ function get_feed_for(&$a,$dfrn_id,$owner_id,$last_update) {
`contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
- AND `item`.`type` != 'remote' AND `contact`.`blocked` = 0
+ AND `item`.`type` != 'remote' AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`edited` > '%s'
$sql_extra
ORDER BY `parent` ASC, `created` ASC LIMIT 0, 300",
@@ -114,7 +114,7 @@ function get_feed_for(&$a,$dfrn_id,$owner_id,$last_update) {
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
'$content' =>xmlify($item['body']),
- '$comment_allow' => (($item['last-child'] && strlen($contact['dfrn-id'] && (! $contact['blocked']))) ? 1 : 0)
+ '$comment_allow' => (($item['last-child'] && strlen($contact['dfrn-id'])) ? 1 : 0)
));
}
else {
diff --git a/include/notifier.php b/include/notifier.php
index b8eef3971..bd787dbfb 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -96,7 +96,7 @@ dbg(3);
$conversant_str = dbesc(implode(', ',$conversants));
}
- $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 ");
+ $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0");
if( ! count($r))
killme();
diff --git a/include/security.php b/include/security.php
index 8b3452534..a71391dba 100644
--- a/include/security.php
+++ b/include/security.php
@@ -6,7 +6,7 @@ function can_write_wall(&$a,$owner) {
if((local_user()) && ($_SESSION['uid'] == $owner))
return true;
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
intval($owner),
intval($_SESSION['visitor_id'])
);