mirror of
https://github.com/friendica/friendica
synced 2025-05-05 23:04:09 +02:00
Replace Javascript notification string formatting with Smarty templates
This commit is contained in:
parent
b7cee324b0
commit
5a12bd87f3
12 changed files with 107 additions and 140 deletions
|
@ -134,16 +134,6 @@ class Notify extends BaseEntity
|
|||
*/
|
||||
public static function formatMessage(string $name, string $message): string
|
||||
{
|
||||
if ($name != '') {
|
||||
$pos = strpos($message, $name);
|
||||
} else {
|
||||
$pos = false;
|
||||
}
|
||||
|
||||
if ($pos !== false) {
|
||||
$message = substr_replace($message, '{0}', $pos, strlen($name));
|
||||
}
|
||||
|
||||
return $message;
|
||||
return str_replace('{0}', '<span class="contactname">' . strip_tags(BBCode::convert($name)) . '</span>', $message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue