Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
6b9c156c
Commit
6b9c156c
authored
12 years ago
by
Anika Henke
Browse files
Options
Downloads
Patches
Plain Diff
improved error message for savedir paths (FS#2502)
parent
db53782e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/init.php
+9
-6
9 additions, 6 deletions
inc/init.php
with
9 additions
and
6 deletions
inc/init.php
+
9
−
6
View file @
6b9c156c
...
...
@@ -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 exist
a
nce of certain files and creates them if missing.
* Checks the exist
e
nce 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 exist
a
nce
// check exist
e
nce
$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 exist
a
nce when needed (except when unit testing)
// check for exist
e
nce when needed (except when unit testing)
if
(
$exists
&&
!
defined
(
'DOKU_UNITTEST'
)
&&
!@
file_exists
(
$finalpath
))
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment