don't include plus-sign in the stored term for imported mentions

This commit is contained in:
friendica 2014-09-10 01:27:52 -07:00
parent e45a9b1522
commit d891b09b22
2 changed files with 4 additions and 2 deletions

View File

@ -867,11 +867,13 @@ function diaspora_post($importer,$xml,$msg) {
$cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER); $cnt = preg_match_all('/@\[zrl=(.*?)\](.*?)\[\/zrl\]/ism',$body,$matches,PREG_SET_ORDER);
if($cnt) { if($cnt) {
foreach($matches as $mtch) { foreach($matches as $mtch) {
// don't include plustags in the term
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = array( $datarray['term'][] = array(
'uid' => $importer['channel_id'], 'uid' => $importer['channel_id'],
'type' => TERM_MENTION, 'type' => TERM_MENTION,
'otype' => TERM_OBJ_POST, 'otype' => TERM_OBJ_POST,
'term' => $mtch[2], 'term' => $term,
'url' => $mtch[1] 'url' => $mtch[1]
); );
} }

View File

@ -1 +1 @@
2014-09-09.793 2014-09-10.794