diff --git a/lib/file-control-xhr.php b/lib/file-control-xhr.php index 1ff1783..fb93c82 100644 --- a/lib/file-control-xhr.php +++ b/lib/file-control-xhr.php @@ -4,15 +4,6 @@ include("settings.php"); include("ftp-control.php"); $t = $text['file-control']; -// Load the LZ String PHP libs and define using LZString -include(dirname(__FILE__)."/../LZCompressor/LZContext.php"); -include(dirname(__FILE__)."/../LZCompressor/LZData.php"); -include(dirname(__FILE__)."/../LZCompressor/LZReverseDictionary.php"); -include(dirname(__FILE__)."/../LZCompressor/LZString.php"); -include(dirname(__FILE__)."/../LZCompressor/LZUtil.php"); -include(dirname(__FILE__)."/../LZCompressor/LZUtil16.php"); -use LZCompressor\LZString as LZString; - // =============================== // SET OUR ERROR INFO TO A DEFAULT // =============================== @@ -42,14 +33,6 @@ if (isset($_POST['newFileName']) && $_POST['newFileName']!="") { $errorMsg = $t['Sorry, bad filename...']; }; -// If we have changes or whole content, we need to LZ decompress them -if (isset($_POST['changes'])) { - $_POST['changes'] = LZString::decompressFromBase64($_POST['changes']); -} -if (isset($_POST['contents'])) { - $_POST['contents'] = LZString::decompressFromBase64($_POST['contents']); -} - // If we have file(s) to work with... if (!$error) { // Replace pipes with slashes, after cleaning the chars @@ -245,7 +228,7 @@ if (!$error && $_GET['action']=="save") { /* console.log(\'Calling \'+saveURL+\' via XHR\'); */ xhr.open("POST",saveURL,true); xhr.setRequestHeader(\'Content-type\', \'application/x-www-form-urlencoded\'); - xhr.send(\'timeStart='.$_POST["timeStart"].'&file='.$fileURL.'&newFileName=\'+newFileName.replace(/\\\+/g,"%2B")+\'&contents=\'+encodeURIComponent(top.LZString.compressToBase64(top.ICEcoder.saveAsContent))); + xhr.send(\'timeStart='.$_POST["timeStart"].'&file='.$fileURL.'&newFileName=\'+newFileName.replace(/\\\+/g,"%2B")+\'&contents=\'+encodeURIComponent(top.ICEcoder.saveAsContent)); top.ICEcoder.serverMessage("'.$t['Saving'].'
" + "'.($finalAction == "Save" ? "newFileName" : "'".$fileName."'").'"); } } diff --git a/lib/file-control.php b/lib/file-control.php index b2ce612..f1fcd37 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -3,15 +3,6 @@ include("headers.php"); include("settings.php"); include("ftp-control.php"); $t = $text['file-control']; - -// Load the LZ String PHP libs and define using LZString -include(dirname(__FILE__)."/../LZCompressor/LZContext.php"); -include(dirname(__FILE__)."/../LZCompressor/LZData.php"); -include(dirname(__FILE__)."/../LZCompressor/LZReverseDictionary.php"); -include(dirname(__FILE__)."/../LZCompressor/LZString.php"); -include(dirname(__FILE__)."/../LZCompressor/LZUtil.php"); -include(dirname(__FILE__)."/../LZCompressor/LZUtil16.php"); -use LZCompressor\LZString as LZString; ?> @@ -111,7 +102,7 @@ if ($_GET['action']=="load") { $encoding=ini_get("default_charset"); if($encoding=="") $encoding="UTF-8"; - echo '