closed #114 Added check for already existing system when adding a new one. (fixed PDO 'duplicate entry' error)

This commit is contained in:
Exodus4D
2016-04-10 16:32:51 +02:00
parent c6206172ac
commit 3dc2f707aa
4 changed files with 60 additions and 36 deletions

View File

@@ -49,8 +49,8 @@ class Connection extends Controller\AccessController{
$map->getById( (int)$mapData['id'] );
if( $map->hasAccess($activeCharacter) ){
$source = $map->getSystem( (int)$connectionData['source'] );
$target = $map->getSystem( (int)$connectionData['target'] );
$source = $map->getSystemById( $connectionData['source'] );
$target = $map->getSystemById( $connectionData['target'] );
if(
!is_null($source) &&