X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=8c8db66a9eee938f90be5b1b476d9b3503003ec2;hb=91d1ef36d8e2bd117160418cb82a39c7b2353c91;hp=5456b5ad3e5a1248d5b6572a3a2bf114b8dfbc0d;hpb=9cb3fc226a9246b36810338f0ee8a115738cc97b;p=friendica.git diff --git a/include/text.php b/include/text.php index 5456b5ad3e..8c8db66a9e 100644 --- a/include/text.php +++ b/include/text.php @@ -80,6 +80,9 @@ function escape_tags($string) { if(! function_exists('autoname')) { function autoname($len) { + if($len <= 0) + return ''; + $vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u'); if(mt_rand(0,5) == 4) $vowels[] = 'y'; @@ -1065,10 +1068,12 @@ function unamp($s) { if(! function_exists('lang_selector')) { function lang_selector() { global $lang; - $o = '
'; - $o .= ''; + + $tpl = get_markup_template("lang_selector.tpl"); + $o = replace_macros($tpl, array( + '$title' => t('Select an alternate language'), + '$langs' => array($lang_options, $selected), + + )); return $o; }} @@ -1503,3 +1513,8 @@ function undo_post_tagging($s) { return $s; } +function fix_mce_lf($s) { + $s = str_replace("\r\n","\n",$s); + $s = str_replace("\n\n","\n",$s); + return $s; +}