commit
634edc183b
|
@ -48,7 +48,7 @@ class Processor
|
||||||
*
|
*
|
||||||
* @return string with replaced emojis
|
* @return string with replaced emojis
|
||||||
*/
|
*/
|
||||||
public static function replaceEmojis($body, array $emojis)
|
private static function replaceEmojis($body, array $emojis)
|
||||||
{
|
{
|
||||||
foreach ($emojis as $emoji) {
|
foreach ($emojis as $emoji) {
|
||||||
$replace = '[class=emoji mastodon][img=' . $emoji['href'] . ']' . $emoji['name'] . '[/img][/class]';
|
$replace = '[class=emoji mastodon][img=' . $emoji['href'] . ']' . $emoji['name'] . '[/img][/class]';
|
||||||
|
@ -263,7 +263,11 @@ class Processor
|
||||||
$item['body'] = $activity['source'];
|
$item['body'] = $activity['source'];
|
||||||
} else {
|
} else {
|
||||||
$content = HTML::toBBCode($activity['content']);
|
$content = HTML::toBBCode($activity['content']);
|
||||||
$content = self::replaceEmojis($content, $activity['emojis']);
|
|
||||||
|
if (!empty($activity['emojis'])) {
|
||||||
|
$content = self::replaceEmojis($content, $activity['emojis']);
|
||||||
|
}
|
||||||
|
|
||||||
$content = self::convertMentions($content);
|
$content = self::convertMentions($content);
|
||||||
|
|
||||||
if (($item['thr-parent'] != $item['uri']) && ($item['gravity'] == GRAVITY_COMMENT)) {
|
if (($item['thr-parent'] != $item['uri']) && ($item['gravity'] == GRAVITY_COMMENT)) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
|
||||||
$nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
|
$nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($nav_bg)) {
|
if (empty($nav_bg) || !is_string($nav_bg)) {
|
||||||
$nav_bg = "#708fa0";
|
$nav_bg = "#708fa0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue