Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0733a23

Browse files
committed
v1.7.02
1 parent 97dc2bc commit 0733a23

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

Data Admin/CHANGEDB.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,8 @@
161161
$count++;
162162
$sql[$count][0]="1.7.01" ;
163163
$sql[$count][1]="";
164+
165+
//v1.7.02
166+
$count++;
167+
$sql[$count][0]="1.7.02" ;
168+
$sql[$count][1]="";

Data Admin/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGELOG
22
=========
3+
## [1.7.02] 2023-10-20
4+
- Fixed export option in Manage Records when fields have multiple relational keys
5+
36
## [1.7.01] 2023-06-18
47
- Added Gibbon Person ID to the username finder
58

Data Admin/export_run.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,15 @@
143143
if ($importType->isFieldRelational($fieldName)) {
144144
$join = $on = '';
145145
extract($importType->getField($fieldName, 'relationship'));
146-
$queryFieldsRelational = (is_array($field))? implode(',', $field) : $field;
147146

147+
// Handle fields that have multiple value options
148+
if (!is_array($field) && stripos($field, '|') !== false) {
149+
$field = explode('|', $field);
150+
$field = current($field);
151+
}
152+
153+
$queryFieldsRelational = (is_array($field))? implode(',', $field) : $field;
154+
148155
// Build a query to grab data from relational tables
149156
$relationalSQL = "SELECT `{$table}`.`{$key}` id, {$queryFieldsRelational} FROM `{$table}`";
150157

@@ -261,6 +268,12 @@
261268
extract($importType->getField($fieldName, 'relationship'));
262269
$filter = $importType->getField($fieldName, 'filter');
263270

271+
// Handle fields that have multiple value options
272+
if (!is_array($field) && stripos($field, '|') !== false) {
273+
$field = explode('|', $field);
274+
$field = current($field);
275+
}
276+
264277
$values = $filter == 'csv' ? array_map('trim', explode(',', $value)) : [$value];
265278
$relationalValue = [];
266279

Data Admin/manifest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$entryURL="import_manage.php" ; //The landing page for the unit, used in the main menu
2626
$type="Additional" ; //Do not change.
2727
$category="Admin" ; //The main menu area to place the module in
28-
$version="1.7.01" ; //Version number
28+
$version="1.7.02" ; //Version number
2929
$author="Sandra Kuipers" ; //Your name
3030
$url="https://github.com/SKuipers/" ; //Your URL
3131

Data Admin/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Sets version information
2222
*/
23-
$moduleVersion="1.7.01" ;
23+
$moduleVersion="1.7.02" ;
2424
$coreVersion = '23.0.00';
2525

2626
$gibbonVersionRequired="23.0.00";

0 commit comments

Comments
 (0)