CMXX - Changed history to equipment_history

This commit is contained in:
“VeLiTi”
2024-12-02 15:40:05 +01:00
parent 868d73c6b5
commit ad51669e32
17 changed files with 103 additions and 68 deletions

View File

@@ -67,7 +67,7 @@ $input_insert = substr($input_insert, 1); //Clean clause - remove first comma
//QUERY AND VERIFY ALLOWED
if ($command == 'update' && !isset($post_content['delete']) && isAllowed('history',$profile,$permission,'U') === 1){
$sql = 'UPDATE history SET '.$clause.' WHERE rowID = ?';
$sql = 'UPDATE equipment_history SET '.$clause.' WHERE rowID = ?';
$execute_input[] = $id;
$stmt = $pdo->prepare($sql);
$stmt->execute($execute_input);
@@ -78,7 +78,7 @@ elseif ($command == 'insert' && !isset($post_content['delete']) && isAllowed('hi
$stmt->execute($execute_input);
}
elseif ($command == 'delete' && isAllowed('history',$profile,$permission,'D') === 1){
$stmt = $pdo->prepare('DELETE FROM history WHERE rowID = ?');
$stmt = $pdo->prepare('DELETE FROM equipment_history WHERE rowID = ?');
$stmt->execute([ $id ]);
//Add deletion to changelog