diff --git a/emhttp/plugins/dynamix/include/Acknowledge.php b/emhttp/plugins/dynamix/include/Acknowledge.php index 236ec98e5..cdd84e48c 100644 --- a/emhttp/plugins/dynamix/include/Acknowledge.php +++ b/emhttp/plugins/dynamix/include/Acknowledge.php @@ -11,17 +11,24 @@ */ ?> $block) { - if ($block) $text .= "[$item]\n"; - foreach ($block as $key => $value) $text .= "$key=\"$value\"\n"; +if ($disk) { + $text = ""; + $saved = parse_ini_file($ram,true); + $saved["smart"]["$disk.ack"] = "true"; + + foreach ($saved as $item => $block) { + if ($block) $text .= "[$item]\n"; + foreach ($block as $key => $value) $text .= "$key=\"$value\"\n"; + } + + file_put_contents($ram, $text); + file_put_contents($rom, $text); + echo "200 OK"; +} else { + echo "404 ERROR"; } -file_put_contents($ram, $text); -file_put_contents($rom, $text); -echo "200 OK"; -?> \ No newline at end of file +?>