diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-27 22:32:21 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-27 22:32:21 -0700 |
commit | fa154248dcd62677544aa9ac7d82ddcd3df92f6e (patch) | |
tree | 57e47aafd0faa2b462aeb7bea864b562577333d9 /mod/dfrn_notify.php | |
parent | 2e5fb9c37e76c20ea0c25e1215a549b561dc68a8 (diff) | |
download | volse-hubzilla-fa154248dcd62677544aa9ac7d82ddcd3df92f6e.tar.gz volse-hubzilla-fa154248dcd62677544aa9ac7d82ddcd3df92f6e.tar.bz2 volse-hubzilla-fa154248dcd62677544aa9ac7d82ddcd3df92f6e.zip |
working on readonly contact attribute
Diffstat (limited to 'mod/dfrn_notify.php')
-rw-r--r-- | mod/dfrn_notify.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index ecab9ea72..4d7346000 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -5,7 +5,7 @@ require_once('include/items.php'); function dfrn_notify_post(&$a) { - +dbg(3); $dfrn_id = notags(trim($_POST['dfrn_id'])); $challenge = notags(trim($_POST['challenge'])); $data = $_POST['data']; @@ -26,10 +26,19 @@ function dfrn_notify_post(&$a) { $r = q("SELECT `id`, `uid` FROM `contact` WHERE `issued-id` = '%s' LIMIT 1", dbesc($dfrn_id) ); - if(! count($r)) + if(! count($r)) { xml_status(3); + return; //NOTREACHED + } + // We aren't really interested in anything this person has to say. But be polite and make them + // think we're listening intently by acknowledging receipt of their communications - which we quietly ignore. + if($r[0]['readonly']) { + xml_status(0); + return; //NOTREACHED + } + $importer = $r[0]; $feed = new SimplePie(); @@ -60,7 +69,7 @@ function dfrn_notify_post(&$a) { if(count($r)) { if($r[0]['uri'] == $r[0]['parent-uri']) { $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s' - WHERE `parent-uri` = '%s'" + WHERE `parent-uri` = '%s'", dbesc($when), dbesc($r[0]['uri']) ); |