summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/CreateSourceAction.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2020-08-05 21:14:38 +0100
committerGreg Roach <greg@subaqua.co.uk>2020-08-05 21:14:38 +0100
commitedbd59d95d68a6a1309e3b3be4b7cd46060a3f9a (patch)
tree085d11b72bfa1ce2da0a3d0d6b5acdaca3a72b2b /app/Http/RequestHandlers/CreateSourceAction.php
parent42f3c8eda222bafb85e2db232d7306d037d69770 (diff)
downloadwebtrees-edbd59d95d68a6a1309e3b3be4b7cd46060a3f9a.tar.gz
webtrees-edbd59d95d68a6a1309e3b3be4b7cd46060a3f9a.tar.bz2
webtrees-edbd59d95d68a6a1309e3b3be4b7cd46060a3f9a.zip
Fix: #3455 - no names for new records, select2 not re-initialised correctly
Diffstat (limited to 'app/Http/RequestHandlers/CreateSourceAction.php')
-rw-r--r--app/Http/RequestHandlers/CreateSourceAction.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Http/RequestHandlers/CreateSourceAction.php b/app/Http/RequestHandlers/CreateSourceAction.php
index d3f9e5b2bf..00c06e0a4f 100644
--- a/app/Http/RequestHandlers/CreateSourceAction.php
+++ b/app/Http/RequestHandlers/CreateSourceAction.php
@@ -2,7 +2,7 @@
/**
* webtrees: online genealogy
- * Copyright (C) 2019 webtrees development team
+ * Copyright (C) 2020 webtrees development team
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -19,6 +19,7 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Http\RequestHandlers;
+use Fisharebest\Webtrees\Factory;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;
use Psr\Http\Message\ResponseInterface;
@@ -99,6 +100,7 @@ class CreateSourceAction implements RequestHandlerInterface
}
$record = $tree->createRecord($gedcom);
+ $record = Factory::source()->new($record->xref(), $record->gedcom(), null, $tree);
// id and text are for select2 / autocomplete
// html is for interactive modals