There is a problem in mactrack_devices.php (https://github.com/Cacti/plugin_mactrac ... evices.php), which exists also in mactrack 2.9. At line 244, there is a loop that goes other the selected devices to delete, but the json that is passed through the post parameters unserializes into an array that starts at index 1, and the loop does not work well.
The correct behavior can be achieved by the following :
Replacing the lines (244-250) :
Code: Select all
for ($i=0; $i<count($selected_items); $i++) {
/* ================= input validation ================= */
input_validate_input_number($selected_items[$i]);
/* ==================================================== */
api_mactrack_device_remove($selected_items[$i]);
}
Code: Select all
if( count($selected_items) > 0 ) {
foreach($selected_items as $item) {
/* ================= input validation ================= */
input_validate_input_number($item);
/* ==================================================== */
api_mactrack_device_remove($item);
}
}