Loading...
 
Skip to main content

Features / Usability


Re: Re: Errors in share.tpl preventing "Share this page" from working?

Marc Laporte wrote:


Marc,

Further looking about in the templates leads me to think that changing the templates is the wrong way to fix this. Seems that there are many templates with lines that are just a single LF.

So I dug more and added a simple "replace all bare LFs with CRLF" the following to ../lib/messu/messulib.php:

$mail = str_replace("\r\n","\n",$mail); // textCRLF -> LF
$mail = str_replace("\r","\n",$mail); // CR -> LF
$mail = str_replace("\n","\r\n",$mail); // LF -> CRLF

This is my first ever PHP code, so I hope it isn't too messed up or ugly... time to start learning PHP.

These seems to work for all email functions, since I suspect messulib.php is used everywhere an email function os required.

Something I couldn't figure out... there is a setting in the General Settings -> Email page for setting the line endings to either "LF" or "CRLF". But this didn't solve my problem. I was hoping to find that variable and either use it or fix it.. Does anyone know what that variable is?

As I mentioned, I are not a PHP programmer. So I'm hoping this fix is correct. Obviously, no warranty expressed or implied. For all I know I have a broken mail server and this fix would be done at the mail server.


Best Regards!