include diaspora mentions in personal (requires adding a Diaspora profile url because they don't use ours)

This commit is contained in:
friendica
2011-12-06 15:24:01 -08:00
parent f6f151433c
commit 0c24784f5e
4 changed files with 24 additions and 6 deletions

View File

@@ -373,9 +373,11 @@ function network_content(&$a, $update = 0) {
$myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
$myurl = substr($myurl,strpos($myurl,'://')+3);
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' )) ",
$diasp_url = str_replace('/profile/','/u/',$myurl);
$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' or tag regexp '%s' )) ",
dbesc($myurl . '$'),
dbesc($myurl . '\\]')
dbesc($myurl . '\\]'),
dbesc($diasp_url . '\\]')
);
}