diff options
author | Olivier Migeot <olivier@migeot.org> | 2011-04-12 13:55:43 +0200 |
---|---|---|
committer | Olivier Migeot <olivier@migeot.org> | 2011-04-12 13:55:43 +0200 |
commit | 85f709320b588f3231875d097217bd9abd223c9f (patch) | |
tree | 988f92ae345657ece74dbcc9dd0d8f17d41f20a5 /include/items.php | |
parent | 294577a48b2d6356dd7695716ea0379bf3a087df (diff) | |
parent | 6da84027afa18633ac5d5dacce99bb244be2aa7b (diff) | |
download | volse-hubzilla-85f709320b588f3231875d097217bd9abd223c9f.tar.gz volse-hubzilla-85f709320b588f3231875d097217bd9abd223c9f.tar.bz2 volse-hubzilla-85f709320b588f3231875d097217bd9abd223c9f.zip |
Merge remote branch 'mike/master'
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 16 |
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), |