X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FSmilies.php;h=d67b92d8b00f60a4e38ab0664510adb794b336ae;hb=94f3f0887b6962e54758ffae6829cf40dfed2d79;hp=74d87d1bd0e61c23bdcaf375bdc15f1f683899d0;hpb=951006dd10628151c8f108f82c3260f13846e557;p=friendica.git diff --git a/include/Smilies.php b/include/Smilies.php index 74d87d1bd0..d67b92d8b0 100644 --- a/include/Smilies.php +++ b/include/Smilies.php @@ -125,7 +125,7 @@ class Smilies { * @return string HML Output of the Smilie */ public static function replace($s, $sample = false) { - if (intval(get_config('system','no_smilies')) + if(intval(get_config('system','no_smilies')) || (local_user() && intval(get_pconfig(local_user(),'system','no_smilies')))) return $s; @@ -135,9 +135,9 @@ class Smilies { $params = self::get_list(); $params['string'] = $s; - if ($sample) { + if($sample) { $s = '
'; - for ($x = 0; $x < count($params['texts']); $x ++) { + for($x = 0; $x < count($params['texts']); $x ++) { $s .= '
' . $params['texts'][$x] . '
' . $params['icons'][$x] . '
'; } } @@ -170,13 +170,11 @@ class Smilies { * @todo: Rework because it doesn't work correctly */ private function preg_heart($x) { - if (strlen($x[1]) == 1) { + if(strlen($x[1]) == 1) return $x[0]; - } $t = ''; - for ($cnt = 0; $cnt < strlen($x[1]); $cnt ++) { + for($cnt = 0; $cnt < strlen($x[1]); $cnt ++) $t .= '<3'; - } $r = str_replace($x[0],$t,$x[0]); return $r; }