fix: reinforcements sent back do not hide the reinforcements table

This commit is contained in:
Martin Ambrus
2017-11-19 02:33:07 +01:00
parent 258ba60014
commit 07e5f322e2
4 changed files with 44 additions and 17 deletions
+10
View File
@@ -766,6 +766,7 @@ class MYSQLi_DB implements IDbConnection {
$q = "DELETE from " . TB_PREFIX . "enforcement where id = '$id'";
mysqli_query($this->dblink,$q);
self::clearReinforcementsCache();
}
function updateResource($vid, $what, $number) {
@@ -5604,6 +5605,15 @@ class MYSQLi_DB implements IDbConnection {
return self::$villageReinforcementsCache[$id.$mode];
}
public static function clearReinforcementsCache() {
self::$reinforcementsCache = [];
self::$villageReinforcementsCache = [];
self::$villageFromReinforcementsCache = [];
self::$oasisArrayReinforcementsCache = [];
self::$oasisReinforcementsCache = [];
self::$unitsCache = [];
}
// no need to cache this method
function getVillageMovement($id) {
list($id) = $this->escape_input($id);