Skip to content
Permalink
Browse files

Factions data processing corrected.

  • Loading branch information...
mfendek committed Mar 12, 2018
1 parent 31fcb65 commit 4dab8eeebcac1ffe7a594bab7938a331dffd6571
Showing with 7 additions and 4 deletions.
  1. +7 −4 index.php
@@ -6,7 +6,7 @@
error_reporting(-1);
ini_set('error_log', 'logs/oobgdw-error-' . strftime('%Y%m%d') . '.log');
$version = '2018-02-22';
$version = '2018-03-12';
// configuration
@@ -352,13 +352,16 @@
$filterChassis[$chassis] = $chassis;
// reformat list so we could easily search in it later
$listData = explode(', ', $line[2]);
$listData = array_diff($listData, ['', ' ']);
$listData = explode(',', $line[2]);
$factions = [];
foreach ($listData as $item) {
// clean item (same data is malformed)
$item = str_replace(',', '', $item);
$item = trim($item);
if (empty($item)) {
continue;
}
$factions[] = $item;
$filterFactions[] = $item;
}

0 comments on commit 4dab8ee

Please sign in to comment.
You can’t perform that action at this time.