From a709044415f2d40eece2518a9894b8dabdb3277b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 7 Sep 2010 11:57:31 +0000 Subject: [PATCH] only use egw::link on egw_vfs::download_url, if it is still a path (relative to EGroupware install dir), allowing filesystem streamwrapper to return a complete direct url --- filemanager/inc/class.filemanager_select.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_select.inc.php b/filemanager/inc/class.filemanager_select.inc.php index f0a4dd3792..06dcda694b 100644 --- a/filemanager/inc/class.filemanager_select.inc.php +++ b/filemanager/inc/class.filemanager_select.inc.php @@ -181,9 +181,11 @@ class filemanager_select } else { + $download_url = egw_vfs::download_url(egw_vfs::concat($content['path'],$content['name'])); + if ($download_url[0] == '/') $download_url = egw::link($download_url); $js = "window.opener.CKEDITOR.tools.callFunction(". $content['ckeditorfuncnum'].",'". - htmlspecialchars(egw::link(egw_vfs::download_url(egw_vfs::concat($content['path'],$content['name']))))."',". + htmlspecialchars($download_url)."',". "'');\nwindow.close();"; } header('Content-type: text/html; charset='.translation::charset());