Correct the function that updates the lua scripts make sure it correctly updates scripts except for database_handle.lua.

This commit is contained in:
Mark Crane
2013-08-26 19:45:01 +00:00
parent e7271794da
commit c7a7f0b7ef
+11 -9
View File
@@ -60,24 +60,25 @@ include "root.php";
//set the exception default //set the exception default
$exception = false; $exception = false;
//set the exceptions //set the exceptions
if ($file == "database_handle.lua") { if ($file == "database_handle.lua") { $exception = true; }
$exception = true;
}
//check for exceptions //check for exceptions
if ($exception) { if ($exception) {
//write over files //file does not exist, save a copy in the destination directory
copy($src.'/'.$file, $dst.'/'.$file);
}
else {
//copy files that don't exist into the destination directory
if (!file_exists($dst.'/'.$file)) { if (!file_exists($dst.'/'.$file)) {
echo "68: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file); copy($src.'/'.$file, $dst.'/'.$file);
} }
} }
else {
//write over the file
echo "74: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file);
}
} }
else { else {
//copy files that don't exist into the destination directory //file does not exist, save a copy in the destination directory
if (!file_exists($dst.'/'.$file)) { if (!file_exists($dst.'/'.$file)) {
echo "81: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file); copy($src.'/'.$file, $dst.'/'.$file);
} }
} }
@@ -141,6 +142,7 @@ include "root.php";
if (is_readable($this->switch_scripts_dir)) { if (is_readable($this->switch_scripts_dir)) {
$this->recursive_copy($src_dir, $dst_dir); $this->recursive_copy($src_dir, $dst_dir);
unset($src_dir, $dst_dir); unset($src_dir, $dst_dir);
exit;
} }
} }