summaryrefslogtreecommitdiff
path: root/inc/init.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2012-05-27 11:51:32 +0100
committerAnika Henke <anika@selfthinker.org>2012-05-27 11:51:32 +0100
commit6b9c156c2d804458adf7d057c5c021d4c4658a9d (patch)
tree8f8e09328ba91b437b31b2959a6c33aa35c49a43 /inc/init.php
parentdb53782ebab12a3f1419389603f95f3596210808 (diff)
downloadrpg-6b9c156c2d804458adf7d057c5c021d4c4658a9d.tar.gz
rpg-6b9c156c2d804458adf7d057c5c021d4c4658a9d.tar.bz2
improved error message for savedir paths (FS#2502)
Diffstat (limited to 'inc/init.php')
-rw-r--r--inc/init.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/inc/init.php b/inc/init.php
index d57e12d7b..923bda352 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -234,9 +234,12 @@ function init_paths(){
'tmpdir' => 'tmp');
foreach($paths as $c => $p){
- if(empty($conf[$c])) $conf[$c] = $conf['savedir'].'/'.$p;
- $conf[$c] = init_path($conf[$c]);
- if(empty($conf[$c])) nice_die("The $c ('$p') does not exist, isn't accessible or writable.
+ $path = $conf[$c];
+ if(empty($path))
+ $path = $conf['savedir'].'/'.$p;
+ $conf[$c] = init_path($path);
+ if(empty($conf[$c]))
+ nice_die("The $c ('$p') at $path is not found, isn't accessible or writable.
You should check your config and permission settings.
Or maybe you want to <a href=\"install.php\">run the
installer</a>?");
@@ -265,7 +268,7 @@ function init_lang($langCode) {
}
/**
- * Checks the existance of certain files and creates them if missing.
+ * Checks the existence of certain files and creates them if missing.
*/
function init_files(){
global $conf;
@@ -312,7 +315,7 @@ function init_files(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function init_path($path){
- // check existance
+ // check existence
$p = fullpath($path);
if(!@file_exists($p)){
$p = fullpath(DOKU_INC.$path);
@@ -560,7 +563,7 @@ function fullpath($path,$exists=false){
}
$finalpath = $root.implode('/', $newpath);
- // check for existance when needed (except when unit testing)
+ // check for existence when needed (except when unit testing)
if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) {
return false;
}