diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-11 09:25:03 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-11 09:25:03 +0100 |
| commit | 4c5724df39a4f22d5b1b1117cc4a6200ce186784 (patch) | |
| tree | 431dad255d5cf0f48d4002f21d49c762579b1ee1 /app/Services | |
| parent | a64cc9967a255bf52811e8a74d2e30f88cb56671 (diff) | |
| download | webtrees-firebird.tar.gz webtrees-firebird.tar.bz2 webtrees-firebird.zip | |
Add Firebird/PDO support via lsces/illuminate-firebirdHEADv2.2.7-lscfirebird
Diffstat (limited to 'app/Services')
| -rw-r--r-- | app/Services/AdminService.php | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | app/Services/GedcomExportService.php | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/Services/AdminService.php b/app/Services/AdminService.php index 31c372e2d1..0b053257dd 100644 --- a/app/Services/AdminService.php +++ b/app/Services/AdminService.php @@ -157,8 +157,8 @@ class AdminService $families = DB::table('families') ->where('f_file', '=', $tree->id()) - ->groupBy([new Expression('LEAST(f_husb, f_wife)')]) - ->groupBy([new Expression('GREATEST(f_husb, f_wife)')]) + ->groupBy([new Expression( DB::driverName() === DB::FIREBIRD ? 'MINVALUE(f_husb, f_wife)' : 'LEAST(f_husb, f_wife)' )]) + ->groupBy([new Expression( DB::driverName() === DB::FIREBIRD ? 'MAXVALUE(f_husb, f_wife)' : 'GREATEST(f_husb, f_wife)' )]) ->having(new Expression('COUNT(f_id)'), '>', '1') ->select([new Expression(DB::groupConcat('f_id') . ' AS xrefs')]) ->orderBy('xrefs') diff --git a/app/Services/GedcomExportService.php b/app/Services/GedcomExportService.php index 18018d1e1c..d5fcb1bdaa 100644..100755 --- a/app/Services/GedcomExportService.php +++ b/app/Services/GedcomExportService.php @@ -236,7 +236,7 @@ class GedcomExportService $datum->f_gedcom ?? $datum->s_gedcom ?? $datum->m_gedcom ?? - $datum->o_gedcom; + $datum->o_gedcom ?? ''; } if ($media_path !== null && preg_match('/^0 @' . Gedcom::REGEX_XREF . '@ OBJE/', $gedcom) === 1) { @@ -378,7 +378,7 @@ class GedcomExportService if ($sort_by_xref) { $query - ->orderBy(new Expression('LENGTH(f_id)')) + ->orderBy(new Expression((DB::driverName() === DB::FIREBIRD ? 'CHAR_' : '' ).'LENGTH(f_id)')) ->orderBy('f_id'); } @@ -393,7 +393,7 @@ class GedcomExportService if ($sort_by_xref) { $query - ->orderBy(new Expression('LENGTH(i_id)')) + ->orderBy(new Expression((DB::driverName() === DB::FIREBIRD ? 'CHAR_' : '' ).'LENGTH(i_id)')) ->orderBy('i_id'); } @@ -408,7 +408,7 @@ class GedcomExportService if ($sort_by_xref) { $query - ->orderBy(new Expression('LENGTH(s_id)')) + ->orderBy(new Expression((DB::driverName() === DB::FIREBIRD ? 'CHAR_' : '' ).'LENGTH(s_id)')) ->orderBy('s_id'); } @@ -423,7 +423,7 @@ class GedcomExportService if ($sort_by_xref) { $query - ->orderBy(new Expression('LENGTH(m_id)')) + ->orderBy(new Expression((DB::driverName() === DB::FIREBIRD ? 'CHAR_' : '' ).'LENGTH(m_id)')) ->orderBy('m_id'); } @@ -440,7 +440,7 @@ class GedcomExportService if ($sort_by_xref) { $query ->orderBy('o_type') - ->orderBy(new Expression('LENGTH(o_id)')) + ->orderBy(new Expression((DB::driverName() === DB::FIREBIRD ? 'CHAR_' : '' ).'LENGTH(o_id)')) ->orderBy('o_id'); } |
