summaryrefslogtreecommitdiff
path: root/app/Family.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-12-29 12:59:09 +0000
committerGreg Roach <fisharebest@webtrees.net>2018-12-29 13:08:06 +0000
commit2e5b44522e1947dbe71ac1d2a7dfbed827dc3867 (patch)
tree4834839c46612e96117211bf088be277464fdc20 /app/Family.php
parent18c74c7f6002877e6b6e3a78959dc021407cf407 (diff)
downloadwebtrees-2e5b44522e1947dbe71ac1d2a7dfbed827dc3867.tar.gz
webtrees-2e5b44522e1947dbe71ac1d2a7dfbed827dc3867.tar.bz2
webtrees-2e5b44522e1947dbe71ac1d2a7dfbed827dc3867.zip
Use illuminate/database for GEDCOM records
Diffstat (limited to 'app/Family.php')
-rw-r--r--app/Family.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/Family.php b/app/Family.php
index d157e534bb..2975846615 100644
--- a/app/Family.php
+++ b/app/Family.php
@@ -17,6 +17,8 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees;
+use Illuminate\Database\Capsule\Manager as DB;
+
/**
* A GEDCOM family (FAM) object.
*/
@@ -115,12 +117,10 @@ class Family extends GedcomRecord
*/
protected static function fetchGedcomRecord(string $xref, int $tree_id)
{
- return Database::prepare(
- "SELECT f_gedcom FROM `##families` WHERE f_id = :xref AND f_file = :tree_id"
- )->execute([
- 'xref' => $xref,
- 'tree_id' => $tree_id,
- ])->fetchOne();
+ return DB::table('families')
+ ->where('f_id', '=', $xref)
+ ->where('f_file', '=', $tree_id)
+ ->value('f_gedcom');
}
/**