mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
allow to create links pointing outside egw
This commit is contained in:
parent
374f4eba24
commit
9adfc41c1e
@ -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 "<p>html::a_href('".htmlspecialchars($content)."','$url',".print_r($vars,True).") = ".$this->link($url,$vars)."</p>";
|
||||
return '<a href="'.$this->link($url,$vars).'" '.$options.'>'.$content.'</a>';
|
||||
return '<a href="'.$url.'" '.$options.'>'.$content.'</a>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user