aboutsummaryrefslogtreecommitdiff
path: root/app/class/model.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-22 00:09:55 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-22 00:09:55 +0100
commitd46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd (patch)
treed763a0488fa3055a1a75b2d669744fcb8526ab92 /app/class/model.php
parent47689d1fdfb2c33ee5e00cfe9fe529d6ba3529db (diff)
downloadwcms-d46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd.tar.gz
wcms-d46c05b12b9dcd65d2d9cd230bf45b5bdf6fa8bd.zip
linkfrom analyse
Diffstat (limited to 'app/class/model.php')
-rw-r--r--app/class/model.php11
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 = '';