Reuse code from our classes, don't write own algorithms
This commit is contained in:
parent
e728e2aa81
commit
6b9a8b7b19
|
@ -697,11 +697,8 @@ function common_linkify_mention(array $mention)
|
||||||
*/
|
*/
|
||||||
function common_find_mentions($text, Notice $notice)
|
function common_find_mentions($text, Notice $notice)
|
||||||
{
|
{
|
||||||
try {
|
// The getProfile call throws NoProfileException on failure
|
||||||
$sender = Profile::getKV('id', $notice->profile_id);
|
$sender = $notice->getProfile();
|
||||||
} catch (NoProfileException $e) {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$mentions = array();
|
$mentions = array();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user