git://git.jankratochvil.net
/
www.energie.vellum.cz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
770e18c
)
+dirnameslashed($filename)
author
short
<>
Wed, 26 Sep 2001 22:45:06 +0000
(22:45 +0000)
committer
short
<>
Wed, 26 Sep 2001 22:45:06 +0000
(22:45 +0000)
- PHP dirname() is broken: ("/1/2/3"=>"/1/2", "/1"->"/") !
common.php
patch
|
blob
|
history
diff --git
a/common.php
b/common.php
index
1749106
..
ab99ea7
100644
(file)
--- a/
common.php
+++ b/
common.php
@@
-304,6
+304,15
@@
function image_supported($mime)
return(false);
}
+// PHP dirname() is broken: ("/1/2/3"=>"/1/2", "/1"->"/")
+function dirnameslashed($filename)
+{
+ $r=dirname($filename);
+ if (substr($r,-1)!="/")
+ $r.="/";
+ return($r);
+}
+
function footer($delimit=true)
{
// deadlock prevention: