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

This commit is contained in:
Ralf Becker 2010-09-07 11:57:31 +00:00
parent 2777c78d74
commit a709044415

View File

@ -181,9 +181,11 @@ class filemanager_select
} }
else 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(". $js = "window.opener.CKEDITOR.tools.callFunction(".
$content['ckeditorfuncnum'].",'". $content['ckeditorfuncnum'].",'".
htmlspecialchars(egw::link(egw_vfs::download_url(egw_vfs::concat($content['path'],$content['name']))))."',". htmlspecialchars($download_url)."',".
"'');\nwindow.close();"; "'');\nwindow.close();";
} }
header('Content-type: text/html; charset='.translation::charset()); header('Content-type: text/html; charset='.translation::charset());