aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_poll.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/dfrn_poll.php')
-rw-r--r--mod/dfrn_poll.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index fc663f797..84c249a58 100644
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -38,7 +38,7 @@ function dfrn_poll_init(&$a) {
$sql_extra = '';
switch($direction) {
case (-1):
- $sql_extra = sprintf(" AND `dfrn-id` = '%s' ", dbesc($dfrn_id));
+ $sql_extra = sprintf(" AND ( `dfrn-id` = '%s' OR `issued-id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id));
$my_id = $dfrn_id;
break;
case 0:
@@ -56,7 +56,10 @@ function dfrn_poll_init(&$a) {
$r = q("SELECT `contact`.*, `user`.`nickname`
FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
- WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 $sql_extra LIMIT 1");
+ WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ AND `user`.`nickname` = '%s' $sql_extra LIMIT 1",
+ dbesc($a->argv[1])
+ );
if(count($r)) {