[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] TextArea Tracker Field: ensure link conversion works for both arrays and strings
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68d3d4bf1ca96_2cdf3b894472@gitlab-sidekiq-low-urgency-cpu-bound-v2-69d75bf97c-zzr9m.mail> |
Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
fe76b5ca by Domeshow Emmanuel at 2025-09-24T11:15:44+00:00
[FIX] TextArea Tracker Field: ensure link conversion works for both arrays and strings
---
* [FIX] TextArea Tracker Field: ensure link conversion works for both arrays and strings
See merge request tikiwiki/tiki!8625
- - - - -
1 changed file:
- lib/core/Services/Tracker/Controller.php
Changes:
=====================================
lib/core/Services/Tracker/Controller.php
=====================================
@@ -1340,9 +1340,10 @@ class Services_Tracker_Controller
$permName = $f['permName'];
$fieldValue = $f['value'] ?? '';
if ($f['type'] === 'a') {
- foreach ((array) $fieldValue as & $value) {
- $value = TikiLib::lib('tiki')->convertAbsoluteLinksToRelative($value);
- }
+ $convert = fn($v) => TikiLib::lib('tiki')->convertAbsoluteLinksToRelative($v);
+ $fieldValue = is_array($fieldValue)
+ ? array_map($convert, $fieldValue) // apply conversion to each element
+ : $convert($fieldValue); // apply conversion to the single value
}
$fields[$permName] = $fieldValue;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fe76b5ca3ba53c0b6aa434f964eeae01d8844b9e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fe76b5ca3ba53c0b6aa434f964eeae01d8844b9e
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs