From 0d2a7d4471dc7ab992fd2dbda2de04d1d9fc41ac Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 24 Aug 2004 19:34:21 +0000 Subject: [PATCH] better url plugin --- plugins/modifier.url.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modifier.url.php b/plugins/modifier.url.php index 4ec32d2..a16acdb 100644 --- a/plugins/modifier.url.php +++ b/plugins/modifier.url.php @@ -3,11 +3,11 @@ function smarty_modifier_url($string) { if(strpos($string, "http://")!==false) return $string; - $chemins = Array('.', '..', '/'); + $chemins = Array('', '../', '../../'); foreach ($chemins as $ch) { - if (file_exists("$ch/login.php") || file_exists("$ch/public/login.php")) - return "$ch/$string"; + if (file_exists($ch.'../htdocs/')) + return $ch.$string; } - return ""; + return ''; } ?> -- 2.1.4