diff --git a/lib/file-control-xhr.php b/lib/file-control-xhr.php index 6aff266..189c920 100644 --- a/lib/file-control-xhr.php +++ b/lib/file-control-xhr.php @@ -247,41 +247,59 @@ if (!$error && $_GET['action']=="save") { } // Save a version controlled backup source of the file - // Establish the base, host and date dir parts... - $backupDirBase = str_replace("\\","/",dirname(__FILE__))."/../backups/"; - $backupDirHost = isset($ftpSite) ? parse_url($ftpSite,PHP_URL_HOST) : "localhost"; - $backupDirDate = date("Y")."-".date("m")."-".date("d"); + if ($ICEcoder["backupsKept"]) { + $backupDirFormat = "Y-m-d"; - // Establish an array of dirs from base to our file location - $subDirsArray = explode("/",ltrim($fileLoc,"/")); - array_unshift($subDirsArray,$backupDirHost,$backupDirDate); - // Make any dirs that don't exist - if (!is_dir($backupDirBase.implode("/",$subDirsArray))) { - $pathIncr = ""; - for ($i=0; $i