Mercurial > hg > mlmmj
comparison contrib/web/php-admin/htdocs/save.php @ 766:75fb7729c6e8
Remove \r more aggressively in php-admin (Franky Van Liedekerke)
author | Ben Schmidt |
---|---|
date | Thu, 21 Oct 2010 09:22:07 +1100 |
parents | dbb144f085a5 |
children | fc5892d87716 |
comparison
equal
deleted
inserted
replaced
765:e08598db1be1 | 766:75fb7729c6e8 |
---|---|
60 if(!empty($HTTP_POST_VARS[$name])) | 60 if(!empty($HTTP_POST_VARS[$name])) |
61 { | 61 { |
62 if (!$fp = fopen($file, "w")) | 62 if (!$fp = fopen($file, "w")) |
63 die("Couldn't open ".$file." for writing"); | 63 die("Couldn't open ".$file." for writing"); |
64 | 64 |
65 fwrite($fp, preg_replace('/\\r\\n/',"\n",$HTTP_POST_VARS[$name])); | 65 fwrite($fp, preg_replace('/\\r/',"",$HTTP_POST_VARS[$name])); |
66 fclose($fp); | 66 fclose($fp); |
67 | 67 |
68 if (!chmod($file, 0644)) | 68 if (!chmod($file, 0644)) |
69 die("Couldn't chmod ".$file); | 69 die("Couldn't chmod ".$file); |
70 } | 70 } |