url => rel
authorx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 28 Sep 2005 06:54:15 +0000 (06:54 +0000)
committerx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 28 Sep 2005 06:54:15 +0000 (06:54 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@64 839d8a87-29fc-0310-9880-83ba4fa771e5

plugins/modifier.url.php

index f3b026f..819ac6f 100644 (file)
 
 function smarty_modifier_url($string)
 {
+    global $globals;
     if(strpos($string, "http://")!==false)
        return $string;
-    $chemins = Array('', '../', '../../');
-    foreach ($chemins as $ch) {
-       if (file_exists($ch.'../htdocs/')) {
-           return $ch.$string;
-       }
-    }
-    return '';
+    return $globals->baseurl."/".$string;
 }
 ?>