diff --git a/app/main/model/charactermodel.php b/app/main/model/charactermodel.php index 0ff4e3ec..c672a740 100644 --- a/app/main/model/charactermodel.php +++ b/app/main/model/charactermodel.php @@ -767,7 +767,16 @@ class CharacterModel extends BasicModel { if( !empty($lookupUniverseIds) ){ // get "more" information for some Ids (e.g. name) $universeData = self::getF3()->ccpClient->getUniverseNamesData($lookupUniverseIds, $additionalOptions); - if( !empty($universeData) ){ + + if( !empty($universeData) && !isset($universeData['error']) ){ + // We expect max ONE system AND/OR station data, not an array of e.g. systems + if(!empty($universeData['system'])){ + $universeData['system'] = reset($universeData['system']); + } + if(!empty($universeData['station'])){ + $universeData['station'] = reset($universeData['station']); + } + $logData = array_replace_recursive($logData, $universeData); }else{ // this is important! universe data is a MUST HAVE! diff --git a/js/app/ui/form_element.js b/js/app/ui/form_element.js index 62083c0d..a5f7d41d 100644 --- a/js/app/ui/form_element.js +++ b/js/app/ui/form_element.js @@ -40,7 +40,7 @@ define([ case 'alliance': imagePath = Init.url.ccpImageServer + '/Alliance/' + data.id + '_32.png'; break; - case 'inventory_type': + case 'inventoryType': imagePath = Init.url.ccpImageServer + '/Type/' + data.id + '_32.png'; break; case 'render': @@ -49,7 +49,7 @@ define([ case 'station': iconName = 'fa-home'; break; - case 'solar_system': + case 'system': iconName = 'fa-sun'; break; } @@ -202,7 +202,7 @@ define([ // select changed }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null @@ -394,7 +394,7 @@ define([ // select changed }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null @@ -441,7 +441,7 @@ define([ children: groupData.types.map(mapChildren, { groupId: groupData.id, categoryId: categoryData.id, - categoryType: 'inventory_type', + categoryType: 'inventoryType', }) }); } @@ -473,7 +473,7 @@ define([ } }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null diff --git a/public/js/v1.3.5/app/ui/form_element.js b/public/js/v1.3.5/app/ui/form_element.js index 62083c0d..a5f7d41d 100644 --- a/public/js/v1.3.5/app/ui/form_element.js +++ b/public/js/v1.3.5/app/ui/form_element.js @@ -40,7 +40,7 @@ define([ case 'alliance': imagePath = Init.url.ccpImageServer + '/Alliance/' + data.id + '_32.png'; break; - case 'inventory_type': + case 'inventoryType': imagePath = Init.url.ccpImageServer + '/Type/' + data.id + '_32.png'; break; case 'render': @@ -49,7 +49,7 @@ define([ case 'station': iconName = 'fa-home'; break; - case 'solar_system': + case 'system': iconName = 'fa-sun'; break; } @@ -202,7 +202,7 @@ define([ // select changed }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null @@ -394,7 +394,7 @@ define([ // select changed }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null @@ -441,7 +441,7 @@ define([ children: groupData.types.map(mapChildren, { groupId: groupData.id, categoryId: categoryData.id, - categoryType: 'inventory_type', + categoryType: 'inventoryType', }) }); } @@ -473,7 +473,7 @@ define([ } }).on('select2:open', function(){ // clear selected system (e.g. default system) - // => improves usability (not necessary). There is a small "x" whe it could be cleared manually + // => improves usability (not necessary). There is a small "x" if field can be cleared manually if( options.maxSelectionLength === 1 && $(this).val() !== null diff --git a/public/templates/modules/system_info.html b/public/templates/modules/system_info.html index f2e16bb7..7fb8b477 100644 --- a/public/templates/modules/system_info.html +++ b/public/templates/modules/system_info.html @@ -16,8 +16,8 @@ {{/system.locked}} -