cd variable for sites who want /ab/cb/abcd
This commit is contained in:
parent
7b59be6fa0
commit
811f9e0f66
1 changed files with 1 additions and 0 deletions
|
@ -502,6 +502,7 @@ function format_text($string) {
|
||||||
|
|
||||||
function warehouse_path($base, $hash, $create=true) {
|
function warehouse_path($base, $hash, $create=true) {
|
||||||
$ab = substr($hash, 0, 2);
|
$ab = substr($hash, 0, 2);
|
||||||
|
$cd = substr($hash, 2, 2);
|
||||||
$pa = "$base/$ab/$hash";
|
$pa = "$base/$ab/$hash";
|
||||||
if($create && !file_exists(dirname($pa))) mkdir(dirname($pa), 0755, true);
|
if($create && !file_exists(dirname($pa))) mkdir(dirname($pa), 0755, true);
|
||||||
return $pa;
|
return $pa;
|
||||||
|
|
Reference in a new issue