Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Controller/Api/Universe.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ public function search(\Base $f3, $params){
$postData = (array)$f3->get('POST');
$categories = (array)$postData['categories'];
$universeNameData = [];
$activeCharacter = $this->getCharacter();

if(
array_key_exists('arg1', $params) &&
!empty($search = strtolower($params['arg1'])) &&
!empty($categories)
){
$universeNameData = Ccp\Universe::searchUniverseNameData($categories, $search);
$universeNameData = Ccp\Universe::searchUniverseNameData($categories, $search, $activeCharacter->_id, $activeCharacter->getAccessToken());
}

echo json_encode($universeNameData);
Expand Down
47 changes: 28 additions & 19 deletions app/Controller/Ccp/Sso.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,26 +504,35 @@ public function getCharacterData(int $characterId) : \stdClass{

$characterData->corporation = null;
$characterData->alliance = null;

if($corporationId = (int)$characterDataBasic['corporation']['id']){
/**
* @var $corporation Pathfinder\CorporationModel
*/
$corporation = Pathfinder\AbstractPathfinderModel::getNew('CorporationModel');
$corporation->getById($corporationId, 0);
if($corporation->valid()){
$characterData->corporation = $corporation;
/**
* TODO: Move to -> @var $corporation Pathfinder\CorporationModel
* REF: https://github.com/goryn-clade/pathfinder/pull/157/files
*/
$characterAffiliation = $this->getF3()->ccpClient()->send('getCharacterAffiliation', [$characterId]);
if(count($characterAffiliation) === 1) {
$characterCorporationId = $characterAffiliation[0]['corporation']['id'];
$characterAllianceId = $characterAffiliation[0]['alliance']['id'];

if($corporationId = (int)$characterCorporationId){
/**
* @var $corporation Pathfinder\CorporationModel
*/
$corporation = Pathfinder\AbstractPathfinderModel::getNew('CorporationModel');
$corporation->getById($corporationId, 0);
if($corporation->valid()){
$characterData->corporation = $corporation;
}
}
}

if($allianceId = (int)$characterDataBasic['alliance']['id']){
/**
* @var $alliance Pathfinder\AllianceModel
*/
$alliance = Pathfinder\AbstractPathfinderModel::getNew('AllianceModel');
$alliance->getById($allianceId, 0);
if($alliance->valid()){
$characterData->alliance = $alliance;
if($allianceId = (int)$characterAllianceId){
/**
* @var $alliance Pathfinder\AllianceModel
*/
$alliance = Pathfinder\AbstractPathfinderModel::getNew('AllianceModel');
$alliance->getById($allianceId, 0);
if($alliance->valid()){
$characterData->alliance = $alliance;
}
}
}
}
Expand Down Expand Up @@ -614,4 +623,4 @@ static function getSsoJwkClaim() : string {
static function getSSOLogger() : \Log {
return parent::getLogger('SSO');
}
}
}
6 changes: 4 additions & 2 deletions app/Controller/Ccp/Universe.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,16 @@ private function clear(string $cacheKey){
* search universeName data by search term
* @param array $categories
* @param string $search
* @param int $characterId
* @param string $accessToken
* @param bool $strict
* @return array
*/
public static function searchUniverseNameData(array $categories, string $search, bool $strict = false) : array {
public static function searchUniverseNameData(array $categories, string $search, int $characterId, string $accessToken, bool $strict = false) : array {
$f3 = \Base::instance();
$universeNameData = [];
if( !empty($categories) && !empty($search)){
$universeIds = $f3->ccpClient()->send('search', $categories, $search, $strict);
$universeIds = $f3->ccpClient()->send('search', $categories, $search, $characterId, $accessToken, $strict);
if(isset($universeIds['error'])){
// ESI error
$universeNameData = $universeIds;
Expand Down
4 changes: 2 additions & 2 deletions app/environment.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CCP_SSO_DOWNTIME = 11:00
; CCP ESI API
CCP_ESI_URL = https://esi.evetech.net
CCP_ESI_DATASOURCE = singularity
CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1,esi-clones.read_clones.v1,esi-characters.read_corporation_roles.v1
CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1,esi-clones.read_clones.v1,esi-characters.read_corporation_roles.v1,esi-search.search_structures.v1
CCP_ESI_SCOPES_ADMIN =

; SMTP settings (optional)
Expand Down Expand Up @@ -90,7 +90,7 @@ CCP_SSO_DOWNTIME = 11:00
; CCP ESI API
CCP_ESI_URL = https://esi.evetech.net
CCP_ESI_DATASOURCE = tranquility
CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1,esi-clones.read_clones.v1,esi-characters.read_corporation_roles.v1
CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1,esi-clones.read_clones.v1,esi-characters.read_corporation_roles.v1,esi-search.search_structures.v1
CCP_ESI_SCOPES_ADMIN =

; SMTP settings (optional)
Expand Down
4 changes: 2 additions & 2 deletions app/pathfinder.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ NAME = Goryn Are Lost
; Version is used for CSS/JS cache busting and is part of the URL for static resources:
; e.g. public/js/vX.X.X/app.js
; Syntax: String (current version)
; Default: v2.2.0
VERSION = v2.2.0
; Default: v2.2.2
VERSION = v2.2.2

; Contact information [optional]
; Shown on 'licence', 'contact' page.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"react/promise-stream": "1.2.*",
"clue/ndjson-react": "1.2.*",
"firebase/php-jwt": "^5.4",
"goryn-clade/pathfinder_esi": "2.1.2"
"goryn-clade/pathfinder_esi": "2.1.3"
},
"suggest": {
"ext-redis": "Redis can be used as cache backend."
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 46 additions & 12 deletions js/app/conf/signature_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,38 @@
2: 'Unsecured Core Emergence' //*
};

// Ghost sites ======================================================================================================

let hsGh = {
1: 'Lesser Serpentis Covert Research Facility',
2: 'Lesser Sansha Covert Research Facility',
3: 'Lesser Guristas Covert Research Facility',
4: 'Lesser Blood Raiders Covert Research Facility'
};

let lsGh = {
1: 'Standard Serpentis Covert Research Facility',
2: 'Standard Sansha Covert Research Facility',
3: 'Standard Guristas Covert Research Facility',
4: 'Standard Blood Raiders Covert Research Facility'
};

let nsGh = {
1: 'Improved Serpentis Covert Research Facility',
2: 'Improved Sansha Covert Research Facility',
3: 'Improved Guristas Covert Research Facility',
4: 'Improved Blood Raiders Covert Research Facility'
};

let whGh = {
1: 'Superior Serpentis Covert Research Facility',
2: 'Superior Sansha Covert Research Facility',
3: 'Superior Guristas Covert Research Facility',
4: 'Superior Blood Raiders Covert Research Facility'
};



// Gas sites ======================================================================================================

let c1Gas = {
Expand Down Expand Up @@ -540,7 +572,7 @@
4: c1Gas,
5: c1WH,
6: c1Ore,
7: {} // Ghost
7: whGh
},
2: { // C2
1: c2Combat,
Expand All @@ -549,7 +581,7 @@
4: c2Gas,
5: c2WH,
6: c2Ore,
7: {} // Ghost
7: whGh
},
3: { // C3
1: c3Combat,
Expand All @@ -558,7 +590,7 @@
4: c3Gas,
5: c3WH,
6: c3Ore,
7: {} // Ghost
7: whGh
},
4: { // C4
1: c4Combat,
Expand All @@ -567,7 +599,7 @@
4: c4Gas,
5: c4WH,
6: c4Ore,
7: {} // Ghost
7: whGh
},
5: { // C5
1: c5Combat,
Expand All @@ -576,7 +608,7 @@
4: c5Gas,
5: c5WH,
6: c5Ore,
7: {} // Ghost
7: whGh
},
6: { // C6
1: c6Combat,
Expand All @@ -585,16 +617,15 @@
4: c6Gas,
5: c6WH,
6: c6Ore,
7: { // Ghost
1: 'Superior Blood Raider Covert Research Facility' //*
}
7: whGh
},
12: { // Thera WH
1: c12Combat
},
13: { // Shattered WH
5: c13WH,
6: c13Ore
6: c13Ore,
7: whGh
},
14: { // Drifter Sentinel WH
1: c14Combat
Expand All @@ -614,13 +645,16 @@
}, // system type (k-space)
2: {
30: { // High Sec
5: hsWH
5: hsWH,
7: hsGh
},
31: { // Low Sec
5: lsWH
5: lsWH,
7: lsGh
},
32: { // 0.0
5: nullWH
5: nullWH,
7: nsGh
},
33: { // Pochven
5: pochWH
Expand Down
4 changes: 2 additions & 2 deletions js/app/ui/dialog/map_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ define([
deleteEolConnections: true,
persistentAliases: true,
persistentSignatures: true,
trackAbyssalJumps: true,
trackAbyssalJumps: false,
logActivity: true,
logHistory: true,

Expand Down Expand Up @@ -770,4 +770,4 @@ define([

};

});
});
4 changes: 2 additions & 2 deletions js/app/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,8 @@ define([
*/
const unicodeToString = (text) => {
const result = text.replace(/\\u[\dA-F]{4}/gi, (match) => String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)))
return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result
}
return result.substring(0, 2) == "u'" ? result.substring(2, result.length - 1) : result;
};

/**
* polyfill for "passive" events
Expand Down
Loading