Skip to content

Commit cddea58

Browse files
committed
Updates handling of relation values and column info
Improves relation value handling by ensuring compatibility with array inputs and adjusts column info retrieval to parse JSON files instead of PHP scripts. Updates changelog to version 3.5.4, adding a note on better relations values. Enhances data consistency and usability across the application.
1 parent dc25fbc commit cddea58

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

debian/changelog

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
php-spojenet-abraflexi (3.5.3) UNRELEASED; urgency=medium
1+
php-spojenet-abraflexi (3.5.4) UNRELEASED; urgency=medium
2+
3+
* better relations values
4+
5+
-- vitex <info@vitexsoftware.cz> Thu, 26 Jun 2025 23:46:49 +0200
6+
7+
php-spojenet-abraflexi (3.5.3) experimental; urgency=medium
28

39
* Refactor code style and improve consistency across multiple files
410

5-
-- vitex <info@vitexsoftware.cz> Tue, 24 Jun 2025 14:48:46 +0200
11+
-- vitex <info@vitexsoftware.cz> Thu, 26 Jun 2025 23:46:29 +0200
612

713
php-spojenet-abraflexi (3.5.2.295~noble.296~trixie) experimental; urgency=medium
814

src/AbraFlexi/Functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,10 @@ public static function xml2array($xml)
405405
public static function getOfflineColumnsInfo(string $evidence): ?array
406406
{
407407
$columnsInfo = null;
408-
$infoSource = self::$infoDir.'/Properties.'.$evidence.'.php';
408+
$infoSource = self::$infoDir.'/Properties.'.$evidence.'.json';
409409

410410
if (file_exists($infoSource)) {
411-
$columnsInfo = require $infoSource;
411+
$columnsInfo = json_decode(file_get_contents($infoSource), true);
412412
}
413413

414414
if (property_exists('\\AbraFlexi\\Relations', $evidence)) {

src/AbraFlexi/RO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ public function fixRecordTypes(array $record, $evidence = null)
11441144
break;
11451145
case 'relation':
11461146
$record[$column] = new Relation(
1147-
$value,
1147+
\is_array($value) ? $value[0] : $value,
11481148
\array_key_exists('fkEvidencePath', $columnInfo) && null !== $columnInfo['fkEvidencePath'] ? $columnInfo['fkEvidencePath'] : $column,
11491149
\array_key_exists($column.'@ref', $record) ? $record[$column.'@ref'] : null,
11501150
\array_key_exists($column.'@showAs', $record) ? $record[$column.'@showAs'] : null,

0 commit comments

Comments
 (0)