summaryrefslogtreecommitdiff
path: root/app/Services/GedcomExportService.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Services/GedcomExportService.php')
-rwxr-xr-x[-rw-r--r--]app/Services/GedcomExportService.php12
1 files changed, 6 insertions, 6 deletions
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');
}