]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Merge commit 'upstream/master'
[friendica.git] / include / text.php
index f204e3f9b97dda32ef1da0a67433d362957eae6e..4ec59a66589c05ec8509d53da9e37ec46741fc79 100644 (file)
@@ -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';
@@ -225,6 +228,9 @@ if(! function_exists('paginate')) {
 function paginate(&$a) {
        $o = '';
        $stripped = preg_replace('/(&page=[0-9]*)/','',$a->query_string);
+
+//     $stripped = preg_replace('/&zrl=(.*?)([\?&]|$)/ism','',$stripped);
+
        $stripped = str_replace('q=','',$stripped);
        $stripped = trim($stripped,'/');
        $pagenum = $a->pager['page'];
@@ -725,6 +731,8 @@ function smilies($s, $sample = false) {
                '\\o/', 
                'o.O', 
                'O.o', 
+               'o_O', 
+               'O_o', 
                ":'(", 
                ":-!", 
                ":-/", 
@@ -759,6 +767,8 @@ function smilies($s, $sample = false) {
                '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
                '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
                '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
+               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />',
+               '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
                '<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
                '<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
                '<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
@@ -1496,3 +1506,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;
+}
\ No newline at end of file