diff --git a/api/RestApi/Dashboard.php b/api/RestApi/Dashboard.php index 8ddc85e..947452e 100644 --- a/api/RestApi/Dashboard.php +++ b/api/RestApi/Dashboard.php @@ -327,7 +327,6 @@ public function postMenuDashboard($id, $param){ $table = "user_menu"; if($protect) { - $query = "SELECT id FROM user_menu WHERE active = 1 AND alias='?' limit 1"; $query = $db->makeQuery($query, $id); $data = $db->loadObjectArray($query); @@ -337,7 +336,7 @@ public function postMenuDashboard($id, $param){ $query = $db->makeQuery($query, $id); $db->executeQuery($query); - $query = "INSERT INTO ".$table." SET id='?', name='?', icon='?', weight=?, alias='?'"; + $query = "INSERT INTO ".$table." (id, name, icon, weight, alias) VALUES ('?','?','?',?,'?');"; $query = $db->makeQuery($query, $id, $name, $icon, $weight, $alias); } else {