cd variable for sites who want /ab/cb/abcd

This commit is contained in:
Shish 2011-03-23 11:19:34 +00:00
parent 7b59be6fa0
commit 811f9e0f66

View file

@ -502,6 +502,7 @@ function format_text($string) {
function warehouse_path($base, $hash, $create=true) {
$ab = substr($hash, 0, 2);
$cd = substr($hash, 2, 2);
$pa = "$base/$ab/$hash";
if($create && !file_exists(dirname($pa))) mkdir(dirname($pa), 0755, true);
return $pa;