issues with delivery of edited posts to forums
This commit is contained in:
parent
cbcf389f50
commit
f83b7c2d52
@ -2464,7 +2464,7 @@ function tag_deliver($uid, $item_id) {
|
|||||||
// this is an update (edit) to a post which was already processed by us and has a second delivery chain
|
// this is an update (edit) to a post which was already processed by us and has a second delivery chain
|
||||||
// Just start the second delivery chain to deliver the updated post
|
// Just start the second delivery chain to deliver the updated post
|
||||||
// after resetting ownership and permission bits
|
// 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);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2767,6 +2767,16 @@ function tgroup_check($uid, $item) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// see if we already have this item. Maybe it is being updated.
|
||||||
|
|
||||||
|
$r = q("select id from item where mid = '%s' and uid = %d limit 1",
|
||||||
|
dbesc($item['mid']),
|
||||||
|
intval($uid)
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
return true;
|
||||||
|
|
||||||
if(! perm_is_allowed($uid,$item['author_xchan'],'tag_deliver'))
|
if(! perm_is_allowed($uid,$item['author_xchan'],'tag_deliver'))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2018,15 +2018,27 @@ function item_post_type($item) {
|
|||||||
return $post_type;
|
return $post_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This needs to be fixed to use quoted tag strings
|
||||||
|
|
||||||
function undo_post_tagging($s) {
|
function undo_post_tagging($s) {
|
||||||
|
|
||||||
$matches = null;
|
$matches = null;
|
||||||
|
// undo tags and mentions
|
||||||
$cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
$cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||||
if($cnt) {
|
if($cnt) {
|
||||||
foreach($matches as $mtch) {
|
foreach($matches as $mtch) {
|
||||||
$s = str_replace($mtch[0], $mtch[1] . $mtch[2] . str_replace(' ','_',$mtch[4]),$s);
|
$s = str_replace($mtch[0], $mtch[1] . $mtch[2] . str_replace(' ','_',$mtch[4]),$s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// undo forum tags
|
||||||
|
$cnt = preg_match_all('/\!\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||||
|
if($cnt) {
|
||||||
|
foreach($matches as $mtch) {
|
||||||
|
$s = str_replace($mtch[0], '!' . str_replace(' ','_',$mtch[2]),$s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user