diff options
author | Andrew Dolgov <[email protected]> | 2020-09-12 17:18:08 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-12 17:18:08 +0300 |
commit | 036c8f04f2a154e01c749dba4f1a69c564e423f6 (patch) | |
tree | abc264390a8cc34e1013abcb3c2878adc3a287eb /index.php | |
parent | 069489d437f66cded1ef97b18ae832f00b6cba82 (diff) |
add some basic startup sanity checks
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -7,12 +7,16 @@ die("sessions/ directory is not writable."); } + require_once "config.php"; + require_once "common.php"; + + sanity_check(); + if (!isset($_COOKIE['epube_sid'])) { header("Location: login.php"); exit; } - require_once "config.php"; require_once "sessions.php"; require_once "db.php"; @@ -34,14 +38,6 @@ die; } - if (!is_writable(SCRATCH_DB)) { - die(SCRATCH_DB . " is not writable"); - } - - if (!is_writable(dirname(SCRATCH_DB))) { - die(dirname(SCRATCH_DB) . " directory is not writable"); - } - // TODO: this should be unified with the service worker cache list $check_files_mtime = [ 'manifest.json', |