From f3756d0b076a81442e9512b2d3e39de47082cd22 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 10 Dec 2018 12:23:42 +0100 Subject: media-clean --- app/class/media.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app/class/media.php') diff --git a/app/class/media.php b/app/class/media.php index 0cbbd89..01dfd55 100644 --- a/app/class/media.php +++ b/app/class/media.php @@ -56,7 +56,17 @@ class Media public function getfullpath() { - return '/' . Config::basepath() . '/' . $this->path() . $this->id() . '.' . $this->extension(); + $fullpath = '/' . Config::basepath() . '/'. $this->path() . $this->id() . '.' . $this->extension(); + $fullpath = str_replace('\\', '/', $fullpath); + return $fullpath; + } + + public function getincludepath() + { + $includepath = $this->path() . $this->id() . '.' . $this->extension(); + $includepath = str_replace('\\', '/', $includepath); + $includepath = substr($includepath, 6); + return $includepath; } -- cgit v1.2.3