diff --git a/filemanager/inc/html.inc.php b/filemanager/inc/html.inc.php
index f5c65aaa46..a384f12d9a 100755
--- a/filemanager/inc/html.inc.php
+++ b/filemanager/inc/html.inc.php
@@ -275,11 +275,17 @@ function html_link ($href = NULL, $text = NULL, $return = 0, $encode = 1)
###
$href = preg_replace ("/%2F/", "/", $href);
$text = trim ($text);
-/*
- $rstring = "$text";
-*/
- $href = $sep . $href;
- $address = $phpgw->link ($href);
+
+ /* Auto-detect and don't disturb absolute links */
+ if (!preg_match ("|^http(.{0,1})://|", $href))
+ {
+ $href = $sep . $href;
+ $address = $phpgw->link ($href);
+ }
+ else
+ {
+ $address = $href;
+ }
$rstring = "$text";
return (eor ($rstring, $return));
}
@@ -313,6 +319,15 @@ function html_table_begin ($width = NULL, $border = NULL, $cellspacing = NULL, $
return (eor ($rstring, $return));
}
+function html_link_email ($address = NULL, $text = NULL, $return = 0, $encode = 1)
+{
+ if ($encode)
+ $href = string_encode ($href, 1);
+
+ $rstring = "$text";
+ return (eor ($rstring, $return));
+}
+
function html_table_end ($return = 0)
{
$rstring = "";