From 2e4d7c801272f31fc678f73c9b0919c78f66c475 Mon Sep 17 00:00:00 2001 From: Ruben de Vries Date: Wed, 18 Aug 2021 09:14:05 +0200 Subject: [PATCH] NIT fixes --- tools/update-items-from-api.php | 8 ++++++-- vendor/php-multi-curl/EpiCurl.php | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/update-items-from-api.php b/tools/update-items-from-api.php index 8039a12d..9cef50e6 100644 --- a/tools/update-items-from-api.php +++ b/tools/update-items-from-api.php @@ -101,15 +101,19 @@ function processApiData($API_JSON, $offset) echo "{$itemCount}: {$APIItem->getName()} (ID: {$APIItem->getItemId()})\n"; - $itemData = array('TypeId' => getOrCreateTypeID($APIItem->getMarketType()), + $itemData = array( + 'TypeId' => getOrCreateTypeID($APIItem->getMarketType()), 'DataId' => $APIItem->getItemId(), 'Name' => $APIItem->getName(), + 'TpName' => $APIItem->getName(), 'RestrictionLevel' => $APIItem->getLevel(), 'Rarity' => getRarityID($APIItem->getRarity()), 'VendorSellPrice' => $APIItem->getVendorValue(), 'Img' => $APIItem->getImageURL(), 'RarityWord' => $APIItem->getRarity(), - 'UnsellableFlag' => $APIItem->isUnsellable()); + 'UnsellableFlag' => $APIItem->isUnsellable(), + 'GemStoreDescription' -> "", + ); $item = ItemQuery::create()->findPK($APIItem->getItemId()); diff --git a/vendor/php-multi-curl/EpiCurl.php b/vendor/php-multi-curl/EpiCurl.php index 7f7eff84..bc6783ac 100644 --- a/vendor/php-multi-curl/EpiCurl.php +++ b/vendor/php-multi-curl/EpiCurl.php @@ -66,14 +66,14 @@ public function getResult($key = null) $innerSleepInt = $outerSleepInt = 1; while($this->running && ($this->execStatus == CURLM_OK || $this->execStatus == CURLM_CALL_MULTI_PERFORM)) { - usleep($outerSleepInt); + if ($outerSleepInt > 0) usleep($outerSleepInt); $outerSleepInt *= $this->sleepIncrement; $ms=curl_multi_select($this->mc); if($ms >= 0) { do{ $this->execStatus = curl_multi_exec($this->mc, $this->running); - usleep($innerSleepInt); + if ($innerSleepInt > 0) usleep($innerSleepInt); $innerSleepInt *= $this->sleepIncrement; }while($this->execStatus==CURLM_CALL_MULTI_PERFORM); $innerSleepInt = 1;