- fixed a bug where Structures are not shown/updated, #640
- upgraded "pathfinder_esi" Composer dependency `v1.2.4` -> 'v1.2.5'
This commit is contained in:
@@ -34,7 +34,7 @@ class Structure extends Controller\AccessController {
|
||||
* @var $structure Model\StructureModel
|
||||
*/
|
||||
$structure = Model\BasicModel::getNew('StructureModel');
|
||||
foreach ($structuresData as $structureData){
|
||||
foreach($structuresData as $structureData){
|
||||
// reset on loop start because of potential "continue"
|
||||
$structure->reset();
|
||||
|
||||
@@ -46,7 +46,7 @@ class Structure extends Controller\AccessController {
|
||||
}
|
||||
}elseif( !isset($structureData['id']) ){
|
||||
// from clipboard -> search by structure by name
|
||||
$structure->getByName($activeCharacter->getCorporation(), (string)$structureData['name']);
|
||||
$structure->getByName($activeCharacter->getCorporation(), (string)$structureData['name'], (int)$structureData['systemId']);
|
||||
}
|
||||
|
||||
$newStructure = $structure->dry();
|
||||
|
||||
@@ -225,11 +225,12 @@ class StructureModel extends BasicModel {
|
||||
return $structuresData;
|
||||
}
|
||||
|
||||
public function getByName(CorporationModel $corporation, string $name) {
|
||||
public function getByName(CorporationModel $corporation, string $name, int $systemId) {
|
||||
if( !$corporation->dry() && $name){
|
||||
$this->has('structureCorporations', ['corporationId = :corporationId', ':corporationId' => $corporation->_id]);
|
||||
$this->load(['name = :name AND active = :active',
|
||||
$this->load(['name = :name AND systemId = :systemId AND active = :active',
|
||||
':name' => $name,
|
||||
':systemId' => $systemId,
|
||||
':active' => 1
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
"monolog/monolog": "1.*",
|
||||
"websoftwares/monolog-zmq-handler": "0.2.*",
|
||||
"swiftmailer/swiftmailer": "^6.0",
|
||||
"exodus4d/pathfinder_esi": "dev-master#v1.2.4"
|
||||
"exodus4d/pathfinder_esi": "dev-master#v1.2.5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user