aboutsummaryrefslogtreecommitdiff
path: root/app/class/model.php
diff options
context:
space:
mode:
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 = '';