Supress saving error log info and showing message

Temp measure till we know UTF8 BOM issue is fixed
This commit is contained in:
Matt Pass
2016-04-26 09:15:38 +01:00
parent 5d23115c95
commit eabae9bed4

View File

@@ -356,13 +356,13 @@ if (!$error && $_GET['action']=="save") {
}
// Log info in a file should there be a difference in char counts
$docLines = explode("\n",$contents);
if (strlen($contents)-count($docLines)+1 != $_GET['charCount']) {
$doNext .= 'top.ICEcoder.message("Sorry, there was a size difference reported between what you see and what has been saved. Please check your file to see if the change has been applied properly.\\\n\\\nIf not, please send tmp/save-error-log.php to info@icecoder.net along. All files sent to us will be dealt with confidentially and deleted after analysis.");';
$fh = fopen(dirname(__FILE__)."/../tmp/save-error-log.php", 'a');
fwrite($fh, "<?php".PHP_EOL."/*".PHP_EOL.(strlen($contents)-count($docLines)+1)." vs ".intval($_GET['charCount'])." chars : ".$_POST['changes'].PHP_EOL.PHP_EOL."ORIGINAL:".PHP_EOL.$origContent.PHP_EOL.PHP_EOL."NOW:".PHP_EOL.$contents.PHP_EOL.PHP_EOL."*/".PHP_EOL."?>".PHP_EOL);
fclose($fh);
}
// $docLines = explode("\n",$contents);
// if (strlen($contents)-count($docLines)+1 != $_GET['charCount']) {
// $doNext .= 'top.ICEcoder.message("Sorry, there was a size difference reported between what you see and what has been saved. Please check your file to see if the change has been applied properly.\\\n\\\nIf not, please send tmp/save-error-log.php to info@icecoder.net along. All files sent to us will be dealt with confidentially and deleted after analysis.");';
// $fh = fopen(dirname(__FILE__)."/../tmp/save-error-log.php", 'a');
// fwrite($fh, "<?php".PHP_EOL."/*".PHP_EOL.(strlen($contents)-count($docLines)+1)." vs ".intval($_GET['charCount'])." chars : ".$_POST['changes'].PHP_EOL.PHP_EOL."ORIGINAL:".PHP_EOL.$origContent.PHP_EOL.PHP_EOL."NOW:".PHP_EOL.$contents.PHP_EOL.PHP_EOL."*/".PHP_EOL."?>".PHP_EOL);
// fclose($fh);
// }
// Save a version controlled backup source of the file
if ($ICEcoder["backupsKept"]) {