diff --git a/lib/classes/SmileyFormat.php b/lib/classes/SmileyFormat.php index e0a9034461bf2218bb0f56993c779c3d7b880be8..21c13603c4cd7342dc1dd0ae069d3cb237fb8aee 100644 --- a/lib/classes/SmileyFormat.php +++ b/lib/classes/SmileyFormat.php @@ -14,7 +14,7 @@ class SmileyFormat extends TextFormat { const REGEXP = '(\>|^|\s):([_a-zA-Z][_a-z0-9A-Z-]*):(?=$|\<|\s)'; - function __construct() + public function __construct() { $rules = []; @@ -38,20 +38,20 @@ class SmileyFormat extends TextFormat /** * Smiley notation defined by name (:name:) */ - static function smiley($markup, $matches) + public static function smiley($markup, $matches) { - return $matches[1] . Smiley::getByName($matches[2])->getImageTag() . $matches[3]; + return $matches[1] . Smiley::getByName($matches[2])->getImageTag(); } /** * Smiley short notation as defined in database */ - static function short($markup, $matches) + public static function short($markup, $matches) { $smileys = Smiley::getShort(); $name = $smileys[$matches[2]] ?? ''; return $name - ? $matches[1] . Smiley::getByName($name)->getImageTag() . ($matches[3] ?? '') + ? $matches[1] . Smiley::getByName($name)->getImageTag() : $matches[0]; } }