Browse code

Erlaube absolute Links

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1356 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on30/04/2009 19:35:18
Showing1 changed files
... ...
@@ -176,6 +176,11 @@ function encode_querystring($querystring)
176 176
 
177 177
 function internal_link($file, $label, $querystring = '', $attribs = '')
178 178
 {
179
+  global $prefix;
180
+  if (strpos($file, '/') == 0)
181
+  {
182
+    $file = $prefix.substr($file, 1);
183
+  }
179 184
   $querystring = encode_querystring($querystring);
180 185
   return "<a href=\"{$file}{$querystring}\" {$attribs} >{$label}</a>";
181 186
 }