mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Fix link conversion only works the first time
This commit is contained in:
parent
1c4f15078d
commit
e99ab7aff5
@ -282,6 +282,9 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
if($appname) {
|
||||
if(!self::$cf_parse_cache[$appname]) {
|
||||
$c_fields = self::convert_parse_custom_fields($appname, $selects, $links, $methods);
|
||||
self::$cf_parse_cache[$appname] = array($c_fields, $selects, $links, $methods);
|
||||
}
|
||||
list($c_fields, $c_selects, $links, $methods) = self::$cf_parse_cache[$appname];
|
||||
|
||||
// Add in any fields that are keys to another app
|
||||
foreach((array)$fields['links'] as $link_field => $app)
|
||||
@ -292,9 +295,7 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
$fields['links'][] = $link_field;
|
||||
unset($fields['links'][$link_field]);
|
||||
}
|
||||
self::$cf_parse_cache[$appname] = array($c_fields, $selects, $links, $methods);
|
||||
}
|
||||
list($c_fields, $c_selects, $links, $methods) = self::$cf_parse_cache[$appname];
|
||||
|
||||
// Not quite a recursive merge, since only one level
|
||||
foreach($fields as $type => &$list) {
|
||||
if($c_fields[$type]) {
|
||||
@ -304,7 +305,6 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
}
|
||||
$fields += $c_fields;
|
||||
$selects += $c_selects;
|
||||
|
||||
}
|
||||
foreach((array)$fields['select'] as $name) {
|
||||
if($record->$name != null && is_array($selects) && $selects[$name]) {
|
||||
|
@ -272,6 +272,10 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
|
||||
if(!self::$cf_parse_cache[$appname]) {
|
||||
$c_fields = importexport_export_csv::convert_parse_custom_fields($appname, $selects, $links, $methods);
|
||||
self::$cf_parse_cache[$appname] = array($c_fields, $selects, $links, $methods);
|
||||
}
|
||||
list($c_fields, $c_selects, $links, $methods) = self::$cf_parse_cache[$appname];
|
||||
|
||||
// Add in any fields that are keys to another app
|
||||
foreach((array)$fields['links'] as $link_field => $app)
|
||||
{
|
||||
@ -281,9 +285,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
$fields['links'][] = $link_field;
|
||||
unset($fields['links'][$link_field]);
|
||||
}
|
||||
self::$cf_parse_cache[$appname] = array($c_fields, $selects, $links, $methods);
|
||||
}
|
||||
list($c_fields, $c_selects, $links, $methods) = self::$cf_parse_cache[$appname];
|
||||
|
||||
// Not quite a recursive merge, since only one level
|
||||
foreach($fields as $type => &$list)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user