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 8150aa7747
commit 21fcd4b606
1 changed files with 11 additions and 9 deletions

View File

@ -60,24 +60,25 @@ include "root.php";
//set the exception default
$exception = false;
//set the exceptions
if ($file == "database_handle.lua") {
$exception = true;
}
if ($file == "database_handle.lua") { $exception = true; }
//check for exceptions
if ($exception) {
//write over files
copy($src.'/'.$file, $dst.'/'.$file);
}
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)) {
echo "68: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file);
}
}
else {
//write over the file
echo "74: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file);
}
}
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)) {
echo "81: ". $dst.'/'.$file."<br />\n";
copy($src.'/'.$file, $dst.'/'.$file);
}
}
@ -141,6 +142,7 @@ include "root.php";
if (is_readable($this->switch_scripts_dir)) {
$this->recursive_copy($src_dir, $dst_dir);
unset($src_dir, $dst_dir);
exit;
}
}