recovery.php => platal.php
[platal.git] / plugins / modifier.url.php
index f3b026f..2dcb4b8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
 
 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;
 }
 ?>