fix: sendunits.txt file could not be opened from Admin

This commit is contained in:
Martin Ambrus
2017-12-01 10:43:30 +01:00
parent 5354e185fa
commit 4db6ca52f9
+3 -3
View File
@@ -1206,7 +1206,7 @@ class Automation {
} }
$reload=false; $reload=false;
$ourFileHandle = fopen("GameEngine/Prevention/sendunits.txt", 'w'); $ourFileHandle = fopen($autoprefix."GameEngine/Prevention/sendunits.txt", 'w');
fclose($ourFileHandle); fclose($ourFileHandle);
$time = time(); $time = time();
$q = " $q = "
@@ -3138,8 +3138,8 @@ class Automation {
} }
} }
if(file_exists("GameEngine/Prevention/sendunits.txt")) { if(file_exists($autoprefix."GameEngine/Prevention/sendunits.txt")) {
unlink("GameEngine/Prevention/sendunits.txt"); unlink($autoprefix."GameEngine/Prevention/sendunits.txt");
} }
if ($reload) header("Location: ".$_SERVER['PHP_SELF']); if ($reload) header("Location: ".$_SERVER['PHP_SELF']);
} }