From d4410324b2351ea4e59feed3f50ed9a4a6bff65b Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sun, 20 Nov 2011 03:38:57 +1100 Subject: [PATCH] More descriptive error messages. --- inc/functions.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index e3f585e3..2ba4abc4 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -238,10 +238,14 @@ loadConfig(); - if(!file_exists($board['dir'])) mkdir($board['dir'], 0777); - if(!file_exists($board['dir'] . $config['dir']['img'])) @mkdir($board['dir'] . $config['dir']['img'], 0777) or error("Couldn't create " . $config['dir']['img'] . ". Check permissions.", true); - if(!file_exists($board['dir'] . $config['dir']['thumb'])) @mkdir($board['dir'] . $config['dir']['thumb'], 0777) or error("Couldn't create " . $config['dir']['thumb'] . ". Check permissions.", true); - if(!file_exists($board['dir'] . $config['dir']['res'])) @mkdir($board['dir'] . $config['dir']['res'], 0777) or error("Couldn't create " . $config['dir']['res'] . ". Check permissions.", true); + if(!file_exists($board['dir'])) + mkdir($board['dir'], 0777) or error("Couldn't create " . $board['dir'] . ". Check permissions.", true); + if(!file_exists($board['dir'] . $config['dir']['img'])) + @mkdir($board['dir'] . $config['dir']['img'], 0777) or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); + if(!file_exists($board['dir'] . $config['dir']['thumb'])) + @mkdir($board['dir'] . $config['dir']['thumb'], 0777) or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); + if(!file_exists($board['dir'] . $config['dir']['res'])) + @mkdir($board['dir'] . $config['dir']['res'], 0777) or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); } function openBoard($uri) {