From 6695b4a203ab03941c8b3305a3e55cc02b85a5ac Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 19 Jul 2010 06:58:03 -0700 Subject: more bugs --- mod/contacts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/contacts.php') diff --git a/mod/contacts.php b/mod/contacts.php index 585ac1423..4f48c1c3d 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -119,7 +119,7 @@ function contacts_content(&$a) { $p['id']); } } - if($intval($contact_id)) + if(intval($contact_id)) q("DELETE FROM `item` WHERE `contact-id` = %d LIMIT 1", intval($contact_id) ); @@ -184,7 +184,7 @@ function contacts_content(&$a) { return $o; } -dbg(2); + if(($a->argc == 2) && ($a->argv[1] == 'all')) $sql_extra = ''; else @@ -212,7 +212,7 @@ dbg(2); break; } - $r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra $sql_extra2 ", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); if(count($r)) { -- cgit v1.2.3