support "no_smilies"

This commit is contained in:
friendica 2012-03-19 03:18:39 -07:00
parent cf2edb5b9a
commit 2349852b4a

View file

@ -694,8 +694,13 @@ function linkify($s) {
if(! function_exists('smilies')) {
function smilies($s, $sample = false) {
$a = get_app();
if(intval(get_config('system','no_smilies'))
|| (local_user() && intval(get_pconfig(local_user(),'system','no_smilies'))))
return $s;
$s = preg_replace_callback('/<pre>(.*?)<\/pre>/ism','smile_encode',$s);
$s = preg_replace_callback('/<code>(.*?)<\/code>/ism','smile_encode',$s);