1

Topic: Register.php (this is not a "serious" bug)

Hello

In register.php at line 215 ( "$mail_message" ) to 219, str_replace is used 5 time.

        $mail_message = str_replace('<base_url>', $pun_config['o_base_url'].'/', $mail_message);
        $mail_message = str_replace('<username>', $username, $mail_message);
        $mail_message = str_replace('<password>', $password1, $mail_message);
        $mail_message = str_replace('<login_url>', $pun_config['o_base_url'].'/login.php', $mail_message);
        $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message);

But, with a little modification

    $replace = array('<base_url>', '<username>', '<password>', '<login_url>', '<board_mailer>');
    $replace1 = array($pun_config['o_base_url'].'/', $username, $password1, $pun_config['o_base_url'].'/login.php', $pun_config['o_board_title'].' '.$lang_common['Mailer']);
    $mail_message = str_replace($replace, $replace1, $mail_message);

no ?

(sorry, i'm french and i'm a big sh** in english tongue)

bye !

Re: Register.php (this is not a "serious" bug)

The speed gain is minimal, but I guess it could be fixed for 1.2. I do separate calls to str_replace to increase readability.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: Register.php (this is not a "serious" bug)

Rickard wrote:

The speed gain is minimal, but I guess it could be fixed for 1.2. I do separate calls to str_replace to increase readability.


OK smile

I think (speed gain minimal + speed gain minimal + speed gain minimal + speed gain minimal [...]) = much speed gained :-)

In all the case, this script is well, good luck for the continuation:)