diff --git a/front/js/db_methods.js b/front/js/db_methods.js index 9938e55a..98885527 100755 --- a/front/js/db_methods.js +++ b/front/js/db_methods.js @@ -27,7 +27,7 @@ function checkDbLock() { type: 'GET', success: function(response) { - // console.log(response); + console.log(response); if (response == 0) { // console.log('Database is not locked'); $(".header-status-locked-db").hide() diff --git a/front/php/components/logs_defaults.json b/front/php/components/logs_defaults.json index 882ce209..825c5fe6 100755 --- a/front/php/components/logs_defaults.json +++ b/front/php/components/logs_defaults.json @@ -66,6 +66,13 @@ "filePath": "/app/front/log/app_front.log", "textAreaCssClass": "logs logs-small" }, + { + "buttons": [ + ], + "fileName": "db_is_locked.log", + "filePath": "/app/front/log/db_is_locked.log", + "textAreaCssClass": "logs logs-small" + }, { "buttons": [ { diff --git a/front/php/server/devices.php b/front/php/server/devices.php index 2bdcfd92..82022a48 100755 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -901,18 +901,11 @@ function copyFromDevice() { $MAC_FROM = $_REQUEST['macFrom']; $MAC_TO = $_REQUEST['macTo']; - - if ((false === filter_var($MAC_FROM , FILTER_VALIDATE_MAC) && $MAC_FROM != "Internet" && $MAC_FROM != "") ) { - throw new Exception('Invalid mac address'); - } - if ((false === filter_var($MAC_TO , FILTER_VALIDATE_MAC) && $MAC_TO != "Internet" && $MAC_TO != "") ) { - throw new Exception('Invalid mac address'); - } global $db; // clean-up temporary table - $sql = "DROP TABLE temp_devices "; + $sql = "DROP TABLE IF EXISTS temp_devices "; $result = $db->query($sql); // create temporary table with the source data