aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-23 19:05:48 -0700
committerfriendica <info@friendica.com>2014-04-23 19:05:48 -0700
commit1e55bef3d11af5e0fd09557671af71b40acc67e0 (patch)
tree6eae70844f2bc0c75feb362074c0f75253812bdd /include
parent8b3ccc65dfd75fd322a36757c9cb94f4b28913c0 (diff)
downloadvolse-hubzilla-1e55bef3d11af5e0fd09557671af71b40acc67e0.tar.gz
volse-hubzilla-1e55bef3d11af5e0fd09557671af71b40acc67e0.tar.bz2
volse-hubzilla-1e55bef3d11af5e0fd09557671af71b40acc67e0.zip
ability to unset a layout and subthread is probably close to working again.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/items.php b/include/items.php
index 487666e36..bbb90f742 100755
--- a/include/items.php
+++ b/include/items.php
@@ -9,13 +9,6 @@ require_once('include/permissions.php');
function collect_recipients($item,&$private) {
-// FIXME - this needs a revision to handle public scope (this site, this network, etc.)
-// We'll be changing this to return an array of
-// - recipients
-// - private
-// - scope if message is public ('global', 'network: red', 'site: $sitename', 'connections')
-// The receiving site will need to check the scope before creating a list of local recipients
-
require_once('include/group.php');
$private = ((intval($item['item_private'])) ? true : false);
@@ -113,6 +106,7 @@ function collect_recipients($item,&$private) {
* If it is, you should be able to use perm_is_allowed( ... 'post_comments'), and if it isn't you need to call
* can_comment_on_post()
*/
+
function can_comment_on_post($observer_xchan,$item) {
// logger('can_comment_on_post: comment_policy: ' . $item['comment_policy'], LOGGER_DEBUG);
@@ -153,6 +147,21 @@ function can_comment_on_post($observer_xchan,$item) {
return false;
}
+/**
+ * @function add_source_route($iid,$hash)
+ * Adds $hash to the item source route specified by $iid
+ * @param integer $iid
+ * item['id'] of target item
+ * @param string $hash
+ * xchan_hash of the channel that sent the item
+ * Modifies item pointed to by $iid
+ *
+ * $item['route'] contains a comma-separated list of xchans that sent the current message,
+ * somewhat analogous to the * Received: header line in email. We can use this to perform
+ * loop detection and to avoid sending a particular item to any "upstream" sender (they
+ * already have a copy because they sent it to us).
+ *
+ */
function add_source_route($iid,$hash) {
// logger('add_source_route ' . $iid . ' ' . $hash, LOGGER_DEBUG);
@@ -352,6 +361,10 @@ function post_activity_item($arr) {
}
+/**
+ * @function get_public_feed($channel,$params)
+ * generate an Atom feed
+ */
function get_public_feed($channel,$params) {
@@ -388,6 +401,9 @@ function get_public_feed($channel,$params) {
return get_feed_for($channel,get_observer_hash(),$params);
}
+
+
+
function get_feed_for($channel, $observer_hash, $params) {
if(! channel)
@@ -2100,7 +2116,7 @@ function item_store_update($arr,$allow_exec = false) {
// $arr['item_flags'] = ((x($arr,'item_flags')) ? intval($arr['item_flags']) : $orig[0]['item_flags'] );
$arr['sig'] = ((x($arr,'sig')) ? $arr['sig'] : '');
- $arr['layout_mid'] = ((x($arr,'layout_mid')) ? dbesc($arr['layout_mid']) : $orig[0]['layout_mid'] );
+ $arr['layout_mid'] = ((array_key_exists('layout_mid',$arr)) ? dbesc($arr['layout_mid']) : $orig[0]['layout_mid'] );
call_hooks('post_remote_update',$arr);