From 3a4d3d3f52f23d02587fe15d7bc4650ee1158277 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 4 Oct 2003 16:58:09 +0000 Subject: [PATCH] fix for file-attachments, to not yet created entries --- etemplate/inc/class.link_widget.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 3e8b39f2bf..a92f30c734 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -132,7 +132,10 @@ { $value[$row] = $link; $value[$row]['title'] = $this->link->title($link['app'],$link['id'],$link); - $value[$row]['view'] = $this->link->view($link['app'],$link['id'],$link); + if (!is_array($link['id'])) + { + $value[$row]['view'] = $this->link->view($link['app'],$link['id'],$link); + } } break; } @@ -193,7 +196,10 @@ { $link_id = $this->link->link($value['to_app'],$value['to_id'], $this->link->vfs_appname,$value['file'],$value['remark']); - unlink($value['file']['tmp_name']); + if (!is_array($value['to_id'])) + { + unlink($value['file']['tmp_name']); + } unset($value['file']); } $extension_data = $value;