From 9adfc41c1e6442277ee55fd9889c7843a3c62ce5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 30 Apr 2006 18:04:14 +0000 Subject: [PATCH] allow to create links pointing outside egw --- phpgwapi/inc/class.html.inc.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 49ddacee42..d0c414b63a 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -908,17 +908,21 @@ class html */ function a_href( $content,$url,$vars='',$options='') { - if (!strstr($url,'/') && count(explode('.',$url)) == 3) - { - $url = "/index.php?menuaction=$url"; - } if (is_array($url)) { $vars = $url; $url = '/index.php'; } + elseif (!strstr($url,'/') && count(explode('.',$url)) == 3) + { + $url = "/index.php?menuaction=$url"; + } + if ($url{0} == '/') // link relative to eGW + { + $url = $this->link($url,$vars); + } //echo "

html::a_href('".htmlspecialchars($content)."','$url',".print_r($vars,True).") = ".$this->link($url,$vars)."

"; - return ''.$content.''; + return ''.$content.''; } /**