diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-22 00:09:55 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-22 00:09:55 +0100 |
commit | d46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd (patch) | |
tree | d763a0488fa3055a1a75b2d669744fcb8526ab92 /app/class/model.php | |
parent | 47689d1fdfb2c33ee5e00cfe9fe529d6ba3529db (diff) | |
download | wcms-d46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd.tar.gz wcms-d46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd.zip |
linkfrom analyse
Diffstat (limited to 'app/class/model.php')
-rw-r--r-- | app/class/model.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/class/model.php b/app/class/model.php index b6e2ee6..cd0733c 100644 --- a/app/class/model.php +++ b/app/class/model.php @@ -5,7 +5,7 @@ abstract class Model const CONFIG_FILE = 'config.json'; const CSS_DIR = 'assets' . DIRECTORY_SEPARATOR .'css' . DIRECTORY_SEPARATOR; const FONT_DIR = 'fonts' . DIRECTORY_SEPARATOR; - const MEDIA_DIR = '.' . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR; + const MEDIA_DIR = 'media' . DIRECTORY_SEPARATOR; const TEMPLATES_DIR = '.'. DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR; const RENDER_DIR = 'assets'. DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR; const DATABASE_DIR = '.' . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR; @@ -32,6 +32,15 @@ abstract class Model return DIRECTORY_SEPARATOR . $basepath . Model::CSS_DIR; } + public static function mediapath() + { + $basepath = ''; + if(!empty(Config::basepath())) { + $basepath = Config::basepath() . DIRECTORY_SEPARATOR ; + } + return DIRECTORY_SEPARATOR . $basepath . Model::MEDIA_DIR; + } + public static function fontpath() { $basepath = ''; |