optional warehouse split levels
This commit is contained in:
parent
2f9979c790
commit
cd609141f4
@ -504,7 +504,12 @@ 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);
|
$cd = substr($hash, 2, 2);
|
||||||
$pa = "$base/$ab/$hash";
|
if(WH_SPLITS == 2) {
|
||||||
|
$pa = "$base/$ab/$cd/$hash";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$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;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ define("SCORE_VERSION", 's2hack/'.VERSION);
|
|||||||
define("COOKIE_PREFIX", 'shm');
|
define("COOKIE_PREFIX", 'shm');
|
||||||
define("SPEED_HAX", false);
|
define("SPEED_HAX", false);
|
||||||
define("FORCE_NICE_URLS", false);
|
define("FORCE_NICE_URLS", false);
|
||||||
|
define("WH_SPLITS", 1);
|
||||||
|
|
||||||
require_once "core/util.inc.php";
|
require_once "core/util.inc.php";
|
||||||
require_once "lib/context.php";
|
require_once "lib/context.php";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user