mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 09:45:33 +00:00
fix updater and other things
This commit is contained in:
1 parent
3ff5e0d660
commit
0b92c0a84a
7 files changed
+42
-43
No files matched your search
@@ -7,8 +7,9 @@ if (isset($_POST) && !empty($_POST)){
|
||||
$sleepTime = 0;
|
||||
if (isset($_FILES['deviceFirmware']) && isset($_FILES['deviceFirmware']['tmp_name']) && $_FILES['deviceFirmware']['tmp_name'] != "") {
|
||||
$file = $_FILES['deviceFirmware'];
|
||||
$fileName = (isset ($_POST['deviceMac']) ? str_replace(":", "", $_POST['deviceMac']) . ".bin" : "");
|
||||
if (file_exists("./app/updater/" . $fileName)) {
|
||||
$deviceMac = DeviceManager::getDeviceById($deviceId)['mac'];
|
||||
$fileName = (isset ($deviceMac) && $deviceMac != "" ? str_replace(":", "", $deviceMac) . ".bin" : "");
|
||||
if ($fileName != "" && file_exists("./app/updater/" . $fileName)) {
|
||||
unlink("./app/updater/" . $fileName);
|
||||
}
|
||||
if ($fileName != "") {
|
||||
|
||||
Reference in new issue
Block a user