Page 1 of 1

an array in function serendipity_makeFilename

Posted: Mon Dec 04, 2006 8:46 am
by xutest

Code: Select all

function serendipity_makeFilename($str, $stripDots = false) {
    static $from = array(
                     ' ',

                     '?,
                     '?,

                     '?,
                     '?,

                     '?,
                     '?,

                     '?,

                     '?,
                     '?,
                     '?,

                     '?,
                     '?,
                     '?,

                     '?,
                     '?,
                     '?,
                     '?,

                     '?,
                     '?,
                     '?,
                     '?,

                     '?,
                     '?,
                     '?,

                     '?,
                     '?,

                     '?,

                     '?);

    static $to   = array(
                     '-',

                     'AE',
                     'ae',

                     'OE',
                     'oe',

                     'UE',
                     'ue',

                     'ss',

                     'e',
                     'e',
                     'e',

                     'i',
                     'i',
                     'i',

                     'a',
                     'a',
                     'a',
                     'a',

                     'o',
                     'o',
                     'o',
                     'o',

                     'u',
                     'u',
                     'u',

                     'c',
                     'C',

                     'n',

                     'y');
My english is poor,hope you can understand

I can't understand the array $from.

is it right in syntax?[/code]

Re: an array in function serendipity_makeFilename

Posted: Mon Dec 04, 2006 10:41 am
by garvinhicking
Hi!

Have a look at http://www.php.net/str_replace.

$from and $to are variables passed to that function.

Regards,
Garvin

Posted: Tue Dec 05, 2006 1:56 am
by xutest
look at the array $from carefully,i think you are wrong

version 1.0.3

regards!

Posted: Tue Dec 05, 2006 10:07 am
by garvinhicking
Hi!

Ah, you mean the various "?" chars in the $frmo array? Those are not there in the real version; maybe the editor you are using does not support ISO-8859-1 characters...?

In the official release files, the $frmo array is alright!

Regards,
Garvin