aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/items.php b/include/items.php
index 596946681..86579512e 100644
--- a/include/items.php
+++ b/include/items.php
@@ -867,14 +867,14 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if($dissolve)
$postvars['dissolve'] = '1';
- if(($contact['rel']) && ($contact['rel'] != REL_FAN) && (! $contact['blocked']) && (! $contact['readonly'])) {
- $postvars['data'] = $atom;
- }
- elseif($owner['page-flags'] == PAGE_COMMUNITY) {
+
+ if((($contact['rel']) && ($contact['rel'] != REL_FAN) && (! $contact['blocked'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) {
$postvars['data'] = $atom;
+ $postvars['perm'] = 'rw';
}
else {
$postvars['data'] = str_replace('<dfrn:comment-allow>1','<dfrn:comment-allow>0',$atom);
+ $postvars['perm'] = 'r';
}
if($rino && $rino_allowed && (! $dissolve)) {
@@ -916,7 +916,6 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
if((! $curl_stat) || (! strlen($xml)))
return(-1); // timed out
-
if(strpos($xml,'<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
@@ -925,8 +924,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
$res = parse_xml_string($xml);
- return $res->status;
-
+ return $res->status;
}
@@ -1369,8 +1367,8 @@ function new_follower($importer,$contact,$datarray,$item) {
// create contact record - set to readonly
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `name`, `nick`, `photo`, `network`, `rel`,
- `blocked`, `readonly`, `pending` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 1, 1 ) ",
+ `blocked`, `readonly`, `pending`, `writable` )
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 1, 1, 1 ) ",
intval($importer['uid']),
dbesc(datetime_convert()),
dbesc($url),