Merge pull request #648 from mexon/mailstream-prerequisites
Mailstream prerequisites
This commit is contained in:
commit
3399b1ccf6
|
@ -643,7 +643,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
||||||
|
|
||||||
// fix any escaped ampersands that may have been converted into links
|
// fix any escaped ampersands that may have been converted into links
|
||||||
$Text = preg_replace("/\<([^>]*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
|
$Text = preg_replace("/\<([^>]*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
|
||||||
$Text = preg_replace("/\<([^>]*?)(src|href)=\"[^hfm](.*?)\>/ism",'<$1$2="">',$Text);
|
$Text = preg_replace("/\<([^>]*?)(src|href)=\"(?!http|ftp|mailto|cid)(.*?)\>/ism",'<$1$2="">',$Text);
|
||||||
|
|
||||||
if($saved_image)
|
if($saved_image)
|
||||||
$Text = bb_replace_images($Text, $saved_image);
|
$Text = bb_replace_images($Text, $saved_image);
|
||||||
|
|
|
@ -1149,7 +1149,6 @@ function item_store($arr,$force_parent = false) {
|
||||||
$arr['deny_gid'] = $deny_gid;
|
$arr['deny_gid'] = $deny_gid;
|
||||||
$arr['private'] = $private;
|
$arr['private'] = $private;
|
||||||
$arr['deleted'] = $parent_deleted;
|
$arr['deleted'] = $parent_deleted;
|
||||||
call_hooks('post_remote_end',$arr);
|
|
||||||
|
|
||||||
// update the commented timestamp on the parent
|
// update the commented timestamp on the parent
|
||||||
|
|
||||||
|
@ -1195,6 +1194,14 @@ function item_store($arr,$force_parent = false) {
|
||||||
logger('item_store: put item '.$current_post.' into cachefile '.$cachefile);
|
logger('item_store: put item '.$current_post.' into cachefile '.$cachefile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$r = q('SELECT * FROM `item` WHERE id = %d', intval($current_post));
|
||||||
|
if (count($r) == 1) {
|
||||||
|
call_hooks('post_remote_end', $r[0]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger('item_store: new item not found in DB, id ' . $current_post);
|
||||||
|
}
|
||||||
|
|
||||||
return $current_post;
|
return $current_post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue