diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-03-26 20:39:56 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-03-26 21:16:12 +0100 |
commit | 83c3add386c187dbf06b9ff5cf33e749a35d1f23 (patch) | |
tree | e6bebfa364406e86b61bf4644bdc9f2031f4c09d /app | |
parent | b32df77047b8b86193aa3f367165265ec6046ae1 (diff) | |
download | wcms-83c3add386c187dbf06b9ff5cf33e749a35d1f23.tar.gz wcms-83c3add386c187dbf06b9ff5cf33e749a35d1f23.zip |
fix media target when W is not in a subfolder
Diffstat (limited to 'app')
-rw-r--r-- | app/class/media.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/class/media.php b/app/class/media.php index 01dfd55..cd6c6f0 100644 --- a/app/class/media.php +++ b/app/class/media.php @@ -56,7 +56,12 @@ class Media public function getfullpath() { - $fullpath = '/' . Config::basepath() . '/'. $this->path() . $this->id() . '.' . $this->extension(); + if(!empty(Config::basepath())) { + $base = '/' . Config::basepath(); + } else { + $base = ''; + } + $fullpath = $base . '/'. $this->path() . $this->id() . '.' . $this->extension(); $fullpath = str_replace('\\', '/', $fullpath); return $fullpath; } |