fix: don't delete if we don't have any IDs

#313
This commit is contained in:
Martin Ambrus
2017-11-19 19:25:14 +01:00
parent 609a61fc3e
commit dc501d6984
+4 -2
View File
@@ -3795,8 +3795,10 @@ class Automation {
}
}
$q = "DELETE FROM ".TB_PREFIX."research where id IN(".implode(', ', $deleteIDs).")";
$database->query($q);
if (count($deleteIDs)) {
$q = "DELETE FROM " . TB_PREFIX . "research where id IN(" . implode( ', ', $deleteIDs ) . ")";
$database->query( $q );
}
if(file_exists("GameEngine/Prevention/research.txt")) {
unlink("GameEngine/Prevention/research.txt");