projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
776f7c1
)
better url plugin
author
x2000habouzit
<x2000habouzit>
Tue, 24 Aug 2004 19:34:21 +0000
(19:34 +0000)
committer
x2000habouzit
<x2000habouzit>
Tue, 24 Aug 2004 19:34:21 +0000
(19:34 +0000)
plugins/modifier.url.php
patch
|
blob
|
blame
|
history
diff --git
a/plugins/modifier.url.php
b/plugins/modifier.url.php
index
4ec32d2
..
a16acdb
100644
(file)
--- 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
''
;
}
?>