Merge pull request #940 from annando/master
Bugfixes: 1. When posting shared feeds to Diaspora, the link vanished/2. The profile name detection had problems with feeds
This commit is contained in:
commit
b09f2f0a5d
1 changed files with 9 additions and 6 deletions
|
@ -55,8 +55,8 @@ function bb_cleanup_share($shared) {
|
||||||
if (strpos($shared[1],$title) !== false)
|
if (strpos($shared[1],$title) !== false)
|
||||||
$title = "";
|
$title = "";
|
||||||
|
|
||||||
if (strpos($shared[1],$link) !== false)
|
// if (strpos($shared[1],$link) !== false)
|
||||||
$link = "";
|
// $link = "";
|
||||||
|
|
||||||
$text = trim($shared[1]);
|
$text = trim($shared[1]);
|
||||||
|
|
||||||
|
@ -555,10 +555,13 @@ function GetProfileUsername($profile, $username) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// To-Do: Better check for pumpio
|
// pumpio (http://host.name/user)
|
||||||
$pumpio = preg_replace("=https?://([^/]*).*/(\w*)=ism", "$2@$1", $profile);
|
$rest = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "$3", $profile);
|
||||||
|
if ($rest == "") {
|
||||||
|
$pumpio = preg_replace("=https?://([\.\w]+)/([\.\w]+)(.*)=ism", "*$2@$1*", $profile);
|
||||||
if ($pumpio != $profile)
|
if ($pumpio != $profile)
|
||||||
return($username." (".$pumpio.")");
|
return($username." (".$pumpio.")");
|
||||||
|
}
|
||||||
|
|
||||||
return($username);
|
return($username);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue