Bugfix DFRN and bookmark detection

This commit is contained in:
Michael Vogel 2016-04-24 17:00:19 +02:00 committed by Roland Haeder
commit e7c4d0bc50
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
4 changed files with 21 additions and 19 deletions

View file

@ -505,10 +505,11 @@ function item_post(&$a) {
}
}
// embedded bookmark in post? set bookmark flag
// embedded bookmark or attachment in post? set bookmark flag
$bookmark = 0;
if(preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",$body,$match,PREG_SET_ORDER)) {
$data = get_attachment_data($body);
if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) OR isset($data["type"])) {
$objecttype = ACTIVITY_OBJ_BOOKMARK;
$bookmark = 1;
}