aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot.php1
-rw-r--r--doc/de/main.bb11
-rw-r--r--include/ConversationObject.php20
-rw-r--r--include/ItemObject.php12
-rwxr-xr-xinclude/diaspora.php68
-rwxr-xr-xinclude/items.php3
-rw-r--r--include/message.php63
-rw-r--r--include/notifier.php4
-rw-r--r--include/text.php16
-rw-r--r--include/zot.php4
-rw-r--r--mod/network.php2
-rw-r--r--mod/viewsrc.php5
-rw-r--r--version.inc2
13 files changed, 157 insertions, 54 deletions
diff --git a/boot.php b/boot.php
index d412e82e4..dc94f202e 100755
--- a/boot.php
+++ b/boot.php
@@ -553,6 +553,7 @@ define ( 'ITEM_NOCOMMENT', 0x0800); // commenting/followups are disabled
define ( 'ITEM_OBSCURED', 0x1000); // bit-mangled to protect from casual browsing by site admin
define ( 'ITEM_VERIFIED', 0x2000); // Signature verification was successful
define ( 'ITEM_RETAINED', 0x4000); // We looked at this item once to decide whether or not to expire it, and decided not to.
+define ( 'ITEM_RSS', 0x8000); // Item comes from a feed. Use this to decide whether to link the title
// Don't make us evaluate this same item again.
/**
*
diff --git a/doc/de/main.bb b/doc/de/main.bb
index 7a4c8ebe2..fe90a075d 100644
--- a/doc/de/main.bb
+++ b/doc/de/main.bb
@@ -22,7 +22,7 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat
[zrl=[baseurl]/help/connecting_to_channels]Sich mit anderen Kanälen verbinden[/zrl]
[zrl=[baseurl]/help/permissions]Zugriffsrechte und Verschlüsselung: Du hast alles unter Kontrolle[/zrl]
[zrl=[baseurl]/help/cloud]Cloud-Speicher[/zrl]
-[zrl=[baseurl]/help/remove_account]Konto löschen[/zrl]
+[zrl=[baseurl]/help/remove_account]Einen Kanal oder das ganze Konto löschen[/zrl]
[size=large][b]Nutzung der Red-Matrix[/b][/size]
[zrl=[baseurl]/help/tags_and_mentions]Tags und Erwähnungen[/zrl]
@@ -33,6 +33,8 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat
[zrl=[baseurl]/help/AdvancedSearch]Fortgeschrittene Suche im Kanalverzeichnis[/zrl]
[zrl=[baseurl]/help/addons]Hilfe zu Addons[/zrl]
[zrl=[baseurl]/help/nomadic-identity]Got Zot? Nomadische Identität, Kanal-Klone und mehr[/zrl]
+[zrl=[baseurl]/help/diaspora_compat]Kompatibilität zum Diaspora-Protokoll (zur Kommunikation mit Kontakten aus Diaspora und Friendica)[/zrl]
+
[size=large][b]Häufig gestellte Fragen für Nutzer[/b][/size]
[zrl=[baseurl]/help/faq_users]FAQ für Nutzer[/zrl]
@@ -44,15 +46,18 @@ Zot ist das großartige neue Kommunikationsprotokoll, das extra für die Red-Mat
[zrl=[baseurl]/help/problems-following-an-update]Probleme nach einem Software-Update[/zrl]
[zrl=[baseurl]/help/troubleshooting]Troubleshooting-Tipps[/zrl]
-[size=large][b]Häufig gestellte Fragen für Sever-Admins[/b][/size]
+[size=large][b]Häufig gestellte Fragen für Hub-Admins[/b][/size]
[zrl=[baseurl]/help/faq_admins]FAQ für Admins[/zrl]
[size=large][b]Technische Dokumentation[/b][/size]
+[zrl=[baseurl]/help/Zot---A-High-Level-Overview]Zot – ein erster Überblick[/zrl]
+[zrl=[baseurl]/help/zot]Eine Einführung ins Zot-Protokoll[/zrl]
+[zrl=[baseurl]/help/zot_structures]Zot-Strukturen[/zrl]
[zrl=[baseurl]/help/comanche]Seitenbeschreibung in Comanche[/zrl]
[zrl=[baseurl]/help/Creating-Templates]Vorlagen erstellen mit Comanche[/zrl]
[zrl=[baseurl]/help/Widgets]Widgets, die Teil der Standardinstallation sind[/zrl]
[zrl=[baseurl]/help/plugins]Plugins[/zrl]
-[zrl=[baseurl]/help/DerivedTheme1]Ein Theme basierend auf einem anderen erstellen[/zrl]
+[zrl=[baseurl]/help/DerivedTheme1]Einen Theme basierend auf einem anderen erstellen[/zrl]
[zrl=[baseurl]/help/schema_development]Schemata[/zrl]
[zrl=[baseurl]/help/Translations]Übersetzungen[/zrl]
[zrl=[baseurl]/help/developers]Entwickler[/zrl]
diff --git a/include/ConversationObject.php b/include/ConversationObject.php
index 767ef7360..a02ba102f 100644
--- a/include/ConversationObject.php
+++ b/include/ConversationObject.php
@@ -52,14 +52,14 @@ class Conversation extends BaseObject {
switch($mode) {
case 'network':
- if(array_key_exists('firehose',$a->data) && intval($a->data['firehose'])) {
- $this->profile_owner = intval($a->data['firehose']);
- $this->writable = false;
- }
- else {
+// if(array_key_exists('firehose',$a->data) && intval($a->data['firehose'])) {
+// $this->profile_owner = intval($a->data['firehose']);
+// $this->writable = false;
+// }
+// else {
$this->profile_owner = local_user();
$this->writable = true;
- }
+// }
break;
case 'channel':
$this->profile_owner = $a->profile['profile_uid'];
@@ -177,11 +177,11 @@ class Conversation extends BaseObject {
}
}
require_once('include/identity.php');
- $sys = get_sys_channel();
+// $sys = get_sys_channel();
- if($sys && $item->get_data_value('uid') == $sys['channel_id']) {
- $item->set_commentable(false);
- }
+// if($sys && $item->get_data_value('uid') == $sys['channel_id']) {
+// $item->set_commentable(false);
+// }
$item->set_conversation($this);
$this->threads[] = $item;
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 96abe4df6..7c75e35bd 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -101,11 +101,19 @@ class Item extends BaseObject {
else
$edpost = false;
+
if($observer['xchan_hash'] == $this->get_data_value('author_xchan')
|| $observer['xchan_hash'] == $this->get_data_value('owner_xchan')
|| $this->get_data_value('uid') == local_user())
$dropping = true;
+
+ if(array_key_exists('real_uid',$item)) {
+ $edpost = false;
+ $dropping = false;
+ }
+
+
if($dropping) {
$drop = array(
'dropping' => $dropping,
@@ -119,7 +127,7 @@ class Item extends BaseObject {
);
}
- $filer = (($conv->get_profile_owner() == local_user()) ? t("Save to Folder") : false);
+ $filer = ((($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) ? t("Save to Folder") : false);
$profile_avatar = $item['author']['xchan_photo_m'];
$profile_link = chanlink_url($item['author']['xchan_url']);
@@ -163,7 +171,7 @@ class Item extends BaseObject {
if($this->is_toplevel()) {
// FIXME check this permission
- if($conv->get_profile_owner() == local_user()) {
+ if(($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) {
// FIXME we don't need all this stuff, some can be done in the template
diff --git a/include/diaspora.php b/include/diaspora.php
index 6f504b460..f9fd3b4ee 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1532,6 +1532,12 @@ function diaspora_conversation($importer,$xml,$msg) {
continue;
}
+ $key = get_config('system','pubkey');
+ if($subject)
+ $subject = json_encode(crypto_encapsulate($subject,$key));
+ if($body)
+ $body = json_encode(crypto_encapsulate($body,$key));
+
q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')",
intval($importer['channel_id']),
intval($conversation['id']),
@@ -1539,7 +1545,7 @@ function diaspora_conversation($importer,$xml,$msg) {
dbesc($importer['channel_hash']),
dbesc($subject),
dbesc($body),
- 0,
+ intval(MAIL_OBSCURED),
dbesc($msg_guid),
dbesc($parent_uri),
dbesc($msg_created_at)
@@ -1588,7 +1594,7 @@ function diaspora_message($importer,$xml,$msg) {
$msg_diaspora_handle = notags(unxmlify($xml->diaspora_handle));
$msg_conversation_guid = notags(unxmlify($xml->conversation_guid));
- $parent_uri = $diaspora_handle . ':' . $msg_parent_guid;
+ $parent_uri = $msg_parent_guid;
$contact = diaspora_get_contact_by_handle($importer['channel_id'],$msg_diaspora_handle);
if(! $contact) {
@@ -1607,7 +1613,7 @@ function diaspora_message($importer,$xml,$msg) {
intval($importer['channel_id']),
dbesc($msg_conversation_guid)
);
- if(count($c))
+ if($c)
$conversation = $c[0];
else {
logger('diaspora_message: conversation not available.');
@@ -1616,6 +1622,7 @@ function diaspora_message($importer,$xml,$msg) {
$reply = 0;
+ $subject = $conversation['subject'];
$body = diaspora2bb($msg_text);
$message_id = $msg_diaspora_handle . ':' . $msg_guid;
@@ -1625,8 +1632,8 @@ function diaspora_message($importer,$xml,$msg) {
$author_signature = base64_decode($msg_author_signature);
$person = find_diaspora_person_by_handle($msg_diaspora_handle);
- if(is_array($person) && x($person,'pubkey'))
- $key = $person['pubkey'];
+ if(is_array($person) && x($person,'xchan_pubkey'))
+ $key = $person['xchan_pubkey'];
else {
logger('diaspora_message: unable to find author details');
return;
@@ -1637,23 +1644,29 @@ function diaspora_message($importer,$xml,$msg) {
return;
}
- $r = q("select id from mail where `uri` = '%s' and uid = %d limit 1",
+ $r = q("select id from mail where mid = '%s' and channel_id = %d limit 1",
dbesc($message_id),
intval($importer['channel_id'])
);
- if(count($r)) {
+ if($r) {
logger('diaspora_message: duplicate message already delivered.', LOGGER_DEBUG);
return;
}
+ $key = get_config('system','pubkey');
+ if($subject)
+ $subject = json_encode(crypto_encapsulate($subject,$key));
+ if($body)
+ $body = json_encode(crypto_encapsulate($body,$key));
+
q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', '%d','%s','%s','%s')",
intval($importer['channel_id']),
intval($conversation['id']),
dbesc($person['xchan_hash']),
dbesc($importer['xchan_hash']),
- dbesc($conversation['subject']),
+ dbesc($subject),
dbesc($body),
- 0,
+ intval(MAIL_OBSCURED),
dbesc($msg_guid),
dbesc($parent_uri),
dbesc($msg_created_at)
@@ -2120,15 +2133,9 @@ function diaspora_profile($importer,$xml,$msg) {
$image_url = "http://" . $handle_parts[1] . $image_url;
}
-/* $r = q("SELECT DISTINCT ( `resource-id` ) FROM `photo` WHERE `uid` = %d AND `contact-id` = %d AND `album` = 'Contact Photos' ",
- intval($importer['channel_id']),
- intval($contact['id'])
- );
- $oldphotos = ((count($r)) ? $r : null);*/
-
- require_once('include/Photo.php');
+ require_once('include/photo/photo_driver.php');
- $images = import_profile_photo($image_url,$importer['channel_id'],$contact['id']);
+ $images = import_profile_photo($image_url,$contact['xchan_hash']);
// Generic birthday. We don't know the timezone. The year is irrelevant.
@@ -2145,7 +2152,7 @@ function diaspora_profile($importer,$xml,$msg) {
// TODO: update name on item['author-name'] if the name changed. See consume_feed()
// Not doing this currently because D* protocol is scheduled for revision soon.
- $r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d",
+/* $r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d",
dbesc($name),
dbesc(datetime_convert()),
dbesc($images[0]),
@@ -2156,7 +2163,7 @@ function diaspora_profile($importer,$xml,$msg) {
intval($contact['id']),
intval($importer['channel_id'])
);
-
+*/
/* if($r) {
if($oldphotos) {
foreach($oldphotos as $ph) {
@@ -2388,7 +2395,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
$a = get_app();
- $myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
+ $myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
$theiraddr = $contact['xchan_addr'];
// Diaspora doesn't support threaded comments, but some
@@ -2479,7 +2486,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$a = get_app();
- $myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
+ $myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
$text = bb2diaspora_itembody($item);
@@ -2621,7 +2628,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
$a = get_app();
- $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
+ $myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
// Check whether the retraction is for a top-level post or whether it's a relayable
if( $item['mid'] !== $item['parent_mid'] ) {
@@ -2652,11 +2659,11 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
function diaspora_send_mail($item,$owner,$contact) {
$a = get_app();
- $myaddr = $owner['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
+ $myaddr = $owner['channel_address'] . '@' . get_app()->get_hostname();
$r = q("select * from conv where id = %d and uid = %d limit 1",
intval($item['convid']),
- intval($item['uid'])
+ intval($item['channel_id'])
);
if(! count($r)) {
@@ -2673,16 +2680,25 @@ function diaspora_send_mail($item,$owner,$contact) {
'participant_handles' => xmlify($cnv['recips'])
);
+ if(array_key_exists('mail_flags',$item) && ($item['mail_flags'] & MAIL_OBSCURED)) {
+ $key = get_config('system','prvkey');
+// if($item['title'])
+// $item['title'] = crypto_unencapsulate(json_decode_plus($item['title']),$key);
+ if($item['body'])
+ $item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key);
+ }
+
+
$body = bb2diaspora($item['body']);
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
- $signed_text = $item['guid'] . ';' . $cnv['guid'] . ';' . $body . ';'
+ $signed_text = $item['mid'] . ';' . $cnv['guid'] . ';' . $body . ';'
. $created . ';' . $myaddr . ';' . $cnv['guid'];
$sig = base64_encode(rsa_sign($signed_text,$owner['channel_prvkey'],'sha256'));
$msg = array(
- 'guid' => xmlify($item['guid']),
+ 'guid' => xmlify($item['mid']),
'parent_guid' => xmlify($cnv['guid']),
'parent_author_signature' => (($item['reply']) ? null : xmlify($sig)),
'author_signature' => xmlify($sig),
diff --git a/include/items.php b/include/items.php
index 53a0b25a9..dbea5779c 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1428,6 +1428,8 @@ function get_atom_elements($feed,$item,&$author) {
$res['title'] = unxmlify($item->get_title());
$res['body'] = unxmlify($item->get_content());
$res['plink'] = unxmlify($item->get_link(0));
+ $res['item_flags'] = ITEM_RSS;
+
// removing the content of the title if its identically to the body
// This helps with auto generated titles e.g. from tumblr
@@ -3196,7 +3198,6 @@ function mail_store($arr) {
}
-
/**
*
* consume_feed - process atom feed and update anything/everything we might need to update
diff --git a/include/message.php b/include/message.php
index 96c3532c1..88cfb7ba2 100644
--- a/include/message.php
+++ b/include/message.php
@@ -27,6 +27,9 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
// else
// $expires = datetime_convert(date_default_timezone_get(),'UTC',$expires);
+
+
+
if($uid) {
$r = q("select * from channel where channel_id = %d limit 1",
intval($uid)
@@ -43,6 +46,59 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
return $ret;
}
+
+ // look for any existing conversation structure
+
+ if(strlen($replyto)) {
+ $r = q("select convid from mail where uid = %d and ( mid = '%s' or parent_mid = '%s' ) limit 1",
+ intval(local_user()),
+ dbesc($replyto),
+ dbesc($replyto)
+ );
+ if($r)
+ $convid = $r[0]['convid'];
+ }
+
+ if(! $convid) {
+
+ // create a new conversation
+
+ $conv_guid = random_string();
+
+ $recip = q("select * from xchan where xchan_hash = '%s' limit 1",
+ dbesc($recipient)
+ );
+ if($recip)
+ $recip_handle = $recip[0]['xchan_addr'];
+
+ $sender_handle = $channel['channel_address'] . '@' . get_app()->get_hostname();
+
+ $handles = $recip_handle . ';' . $sender_handle;
+
+ $r = q("insert into conv (uid,guid,creator,created,updated,subject,recips) values(%d, '%s', '%s', '%s', '%s', '%s', '%s') ",
+ intval(local_user()),
+ dbesc($conv_guid),
+ dbesc($sender_handle),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc($subject),
+ dbesc($handles)
+ );
+
+ $r = q("select * from conv where guid = '%s' and uid = %d limit 1",
+ dbesc($conv_guid),
+ intval(local_user())
+ );
+ if($r)
+ $convid = $r[0]['id'];
+ }
+
+ if(! $convid) {
+ $ret['message'] = 'conversation not found';
+ return $ret;
+ }
+
+
// generate a unique message_id
do {
@@ -115,9 +171,10 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
- $r = q("INSERT INTO mail ( account_id, mail_flags, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires )
- VALUES ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
+ $r = q("INSERT INTO mail ( account_id, convid, mail_flags, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created, expires )
+ VALUES ( %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($channel['channel_account_id']),
+ intval($convid),
intval(MAIL_OBSCURED),
intval($channel['channel_id']),
dbesc($channel['channel_hash']),
@@ -227,9 +284,7 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) {
$r[$k]['to'] = find_xchan_in_array($rr['to_xchan'],$c);
$r[$k]['seen'] = (($rr['mail_flags'] & MAIL_SEEN) ? 1 : 0);
if($r[$k]['mail_flags'] & MAIL_OBSCURED) {
- logger('unencrypting');
$key = get_config('system','prvkey');
-
if($r[$k]['title'])
$r[$k]['title'] = crypto_unencapsulate(json_decode_plus($r[$k]['title']),$key);
if($r[$k]['body'])
diff --git a/include/notifier.php b/include/notifier.php
index 0c7a15452..79a6886ad 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -158,7 +158,7 @@ function notifier_run($argv, $argc){
$message = q("SELECT * FROM `mail` WHERE `id` = %d LIMIT 1",
intval($item_id)
);
- if(! count($message)){
+ if(! $message) {
return;
}
xchan_mail_query($message[0]);
@@ -477,11 +477,13 @@ function notifier_run($argv, $argc){
where hubloc_hash in (" . implode(',',$recipients) . ") group by hubloc_sitekey order by hubloc_connected desc limit 1");
}
else {
+
$r = q("select hubloc_guid, hubloc_url, hubloc_sitekey, hubloc_network, hubloc_flags, hubloc_callback, hubloc_host from hubloc
where hubloc_hash in (" . implode(',',$recipients) . ") and not (hubloc_flags & %d) and not (hubloc_status & %d) group by hubloc_sitekey",
intval(HUBLOC_FLAGS_DELETED),
intval(HUBLOC_OFFLINE)
);
+
}
if(! $r) {
diff --git a/include/text.php b/include/text.php
index 599c5d445..22cf17866 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1183,7 +1183,11 @@ function theme_attachments(&$item) {
$title = t('unknown.???');
$title .= ' ' . $r['length'] . ' ' . t('bytes');
- $url = z_root() . '/magic?f=&hash=' . $item['author_xchan'] . '&dest=' . $r['href'] . '/' . $r['revision'];
+ require_once('include/identity.php');
+ if(is_foreigner($item['author_xchan']))
+ $url = $r['href'];
+ else
+ $url = z_root() . '/magic?f=&hash=' . $item['author_xchan'] . '&dest=' . $r['href'] . '/' . $r['revision'];
$s .= '<a href="' . $url . '" title="' . $title . '" class="attachlink" >' . $icon . '</a>';
$attaches[] = array('title' => $title, 'url' => $url, 'icon' => $icon );
@@ -1851,9 +1855,17 @@ function ids_to_querystr($arr,$idx = 'id') {
// author_xchan and owner_xchan. If $abook is true also include the abook info.
// This is needed in the API to save extra per item lookups there.
-function xchan_query(&$items,$abook = true) {
+function xchan_query(&$items,$abook = true,$effective_uid = 0) {
$arr = array();
if($items && count($items)) {
+
+ if($effective_uid) {
+ for($x = 0; $x < count($items); $x ++) {
+ $items[$x]['real_uid'] = $items[$x]['uid'];
+ $items[$x]['uid'] = $effective_uid;
+ }
+ }
+
foreach($items as $item) {
if($item['owner_xchan'] && (! in_array($item['owner_xchan'],$arr)))
$arr[] = "'" . dbesc($item['owner_xchan']) . "'";
diff --git a/include/zot.php b/include/zot.php
index b7ffe14e4..828194c3a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2399,7 +2399,7 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
);
if($r) {
// don't count yourself
- $total_friends = ((count($r) > 0) ? $count($r) - 1 : 0);
+ $total_friends = ((count($r) > 0) ? count($r) - 1 : 0);
foreach($r as $rr)
if($rr['abook_flags'] & ABOOK_FLAG_FEED)
$total_feeds ++;
@@ -2407,9 +2407,9 @@ function process_channel_sync_delivery($sender,$arr,$deliveries) {
$disallowed = array('abook_id','abook_account','abook_channel');
- $clean = array();
foreach($arr['abook'] as $abook) {
+ $clean = array();
if($abook['abook_xchan'] && $abook['entry_deleted']) {
logger('process_channel_sync_delivery: removing abook entry for ' . $abook['abook_xchan']);
require_once('include/Contact.php');
diff --git a/mod/network.php b/mod/network.php
index 97870a6a1..0bad366d4 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -403,7 +403,7 @@ function network_content(&$a, $update = 0, $load = false) {
dbesc($parents_str)
);
- xchan_query($items);
+ xchan_query($items,true,(($firehose) ? local_user() : 0));
$items = fetch_post_tags($items,true);
$items = conv_sort($items,$ordering);
}
diff --git a/mod/viewsrc.php b/mod/viewsrc.php
index ddf39535c..982d1c417 100644
--- a/mod/viewsrc.php
+++ b/mod/viewsrc.php
@@ -5,6 +5,8 @@ function viewsrc_content(&$a) {
$o = '';
+ $sys = get_sys_channel();
+
$item_id = ((argc() > 1) ? intval(argv(1)) : 0);
$json = ((argc() > 2 && argv(2) === 'json') ? true : false);
@@ -19,8 +21,9 @@ function viewsrc_content(&$a) {
}
if(local_user() && $item_id) {
- $r = q("select item_flags, body from item where item_restrict = 0 and uid = %d and id = %d limit 1",
+ $r = q("select item_flags, body from item where item_restrict = 0 and uid in (%d , %d) and id = %d limit 1",
intval(local_user()),
+ intval($sys['channel_id']),
intval($item_id)
);
diff --git a/version.inc b/version.inc
index f3afecf7d..05cba6305 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-09-22.806
+2014-09-23.807