This commit is contained in:
Your Name
2018-10-29 21:41:43 +09:00
112 changed files with 1790 additions and 11620 deletions
-2
View File
@@ -379,8 +379,6 @@ function contact_remove($channel_id, $abook_id) {
intval($channel_id)
);
if($r) {
$r = fetch_post_tags($r,true);
foreach($r as $rr) {
$x = q("select uid from term where otype = %d and oid = %d and ttype = %d limit 1",
intval(TERM_OBJ_POST),
+1 -1
View File
@@ -484,4 +484,4 @@ function db_columns($table) {
}
return [];
}
}
-1
View File
@@ -168,7 +168,6 @@ function import_profiles($channel, $profiles) {
unset($profile['id']);
$profile['aid'] = get_account_id();
$profile['uid'] = $channel['channel_id'];
unset($profile['profile_vcard']);
convert_oldfields($profile,'name','fullname');
convert_oldfields($profile,'with','partner');
+15 -6
View File
@@ -2150,6 +2150,7 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) {
unset($arr['created']);
unset($arr['author_xchan']);
unset($arr['owner_xchan']);
unset($arr['source_xchan']);
unset($arr['thr_parent']);
unset($arr['llink']);
@@ -2514,7 +2515,7 @@ function tag_deliver($uid, $item_id) {
// Just start the second delivery chain to deliver the updated post
// after resetting ownership and permission bits
logger('updating edited tag_deliver post for ' . $u[0]['channel_address']);
start_delivery_chain($u[0], $item, $item_id, 0);
start_delivery_chain($u[0], $item, $item_id, 0, true);
return;
}
@@ -2941,7 +2942,7 @@ function tgroup_check($uid, $item) {
* @param int $item_id
* @param boolean $parent
*/
function start_delivery_chain($channel, $item, $item_id, $parent) {
function start_delivery_chain($channel, $item, $item_id, $parent, $edit = false) {
$sourced = check_item_source($channel['channel_id'],$item);
@@ -2950,7 +2951,7 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
intval($channel['channel_id']),
dbesc(($item['source_xchan']) ? $item['source_xchan'] : $item['owner_xchan'])
);
if($r) {
if($r && ! $edit) {
$t = trim($r[0]['src_tag']);
if($t) {
$tags = explode(',',$t);
@@ -3017,9 +3018,17 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
}
else {
$item_uplink = 1;
$r = q("update item set source_xchan = owner_xchan where id = %d",
intval($item_id)
);
// if this is an edit, item_store_update() will have already updated the item
// with the correct value for source_xchan (by ignoring it). We cannot set to owner_xchan
// in this case because owner_xchan will point to the parent of this chain
// and not the original sender.
if(! $edit) {
$r = q("update item set source_xchan = owner_xchan where id = %d",
intval($item_id)
);
}
}
$title = $item['title'];
-1
View File
@@ -224,7 +224,6 @@ function nav($template = 'default') {
//app bin
if($is_owner) {
//daily system apps import
if(get_pconfig(local_channel(), 'system','import_system_apps') !== datetime_convert('UTC','UTC','now','Y-m-d')) {
Apps::import_system_apps();
set_pconfig(local_channel(), 'system','import_system_apps', datetime_convert('UTC','UTC','now','Y-m-d'));
+1 -1
View File
@@ -4327,7 +4327,7 @@ function zotinfo($arr) {
if($role === 'forum' || $role === 'repository') {
$public_forum = true;
}
elseif($ztarget_hash) {
else {
// check if it has characteristics of a public forum based on custom permissions.
$m = \Zotlabs\Access\Permissions::FilledAutoperms($e['channel_id']);
if($m) {