diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-02 23:05:18 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-02 23:05:18 +1100 |
| commit | 599824d2e6398a342ae98535ee34aeef4f071dd2 (patch) | |
| tree | 0eb3a84e535625954d32fa661748a747ff06e9dd /inc/config.php | |
| parent | 4754493e531a2f6cfe4404c302a8de3cf3ba0190 (diff) | |
Minor bug.
Diffstat (limited to 'inc/config.php')
| -rw-r--r-- | inc/config.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/config.php b/inc/config.php index 5069b804..fb5202fd 100644 --- a/inc/config.php +++ b/inc/config.php @@ -49,6 +49,8 @@ define('DIR_THUMB', 'thumb/'); define('DIR_RES', 'res/'); + // The root directory, including the trailing slash, for Tinyboard. + // examples: '/', '/board/', '/chan/' define('ROOT', '/'); define('POST_URL', ROOT . 'index.php'); define('FILE_INDEX', 'index.html'); @@ -65,7 +67,7 @@ define('ALWAYS_NOKO', false); - define('URL_MATCH', '/^' . (@$_SERVER['HTTPS']?'https':'http').':\/\/'.$_SERVER['HTTP_HOST'] . '(\/|\/' . preg_quote(FILE_INDEX, '/') . '|\/' . str_replace('%d', '\d+', preg_quote(FILE_PAGE, '/')) . ')$/'); + define('URL_MATCH', '/^' . (@$_SERVER['HTTPS']?'https':'http').':\/\/'.$_SERVER['HTTP_HOST'] . '(' . preg_quote(ROOT, '/') . '|' . preg_quote(ROOT, '/') . '' . preg_quote(FILE_INDEX, '/') . '|' . preg_quote(ROOT, '/') . '' . str_replace('%d', '\d+', preg_quote(FILE_PAGE, '/')) . ')$/'); if(!file_exists(DIR_IMG)) mkdir(DIR_IMG) or error("Couldn't create " . DIR_IMG . ". Install manually."); if(!file_exists(DIR_THUMB)) mkdir(DIR_THUMB) or error("Couldn't create " . DIR_IMG . ". Install manually."); |
