issues with delivery of edited posts to forums
This commit is contained in:
@@ -2018,15 +2018,27 @@ function item_post_type($item) {
|
||||
return $post_type;
|
||||
}
|
||||
|
||||
// This needs to be fixed to use quoted tag strings
|
||||
|
||||
function undo_post_tagging($s) {
|
||||
|
||||
$matches = null;
|
||||
// undo tags and mentions
|
||||
$cnt = preg_match_all('/([@#])(\!*)\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||
if($cnt) {
|
||||
foreach($matches as $mtch) {
|
||||
$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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user