fix: Automation::updateStore() shouldn't be called twice

This commit is contained in:
Martin Ambrus
2017-11-15 22:00:18 +01:00
parent 33ab908744
commit a8b8664e07
2 changed files with 117 additions and 116 deletions
+3 -2
View File
@@ -192,7 +192,8 @@ class Automation {
{ {
$this->demolitionComplete(); $this->demolitionComplete();
} }
$this->updateStore(); // TODO: check if commenting-out this next line affected anything (it shouldn't) and should improve performance
//$this->updateStore();
$this->delTradeRoute(); $this->delTradeRoute();
$this->TradeRoute(); $this->TradeRoute();
if(!file_exists("GameEngine/Prevention/market.txt") or time()-filemtime("GameEngine/Prevention/market.txt")>50) { if(!file_exists("GameEngine/Prevention/market.txt") or time()-filemtime("GameEngine/Prevention/market.txt")>50) {
@@ -4324,7 +4325,7 @@ class Automation {
$result = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'fdata`'); $result = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'fdata`');
mysqli_begin_transaction($GLOBALS['link']) or die(mysqli_error($database->dblink));; mysqli_begin_transaction($GLOBALS['link']) or die(mysqli_error($database->dblink));
while ($row = mysqli_fetch_assoc($result)) while ($row = mysqli_fetch_assoc($result))
{ {
$ress = $crop = 0; $ress = $crop = 0;