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.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/app/class/model.php b/app/class/model.php
index cd0733c..600e930 100644
--- a/app/class/model.php
+++ b/app/class/model.php
@@ -8,6 +8,7 @@ abstract class Model
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 GLOBAL_DIR = 'assets'. DIRECTORY_SEPARATOR . 'global' . DIRECTORY_SEPARATOR;
const DATABASE_DIR = '.' . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR;
const MEDIA_EXTENSIONS = array('jpeg', 'jpg', 'JPG', 'png', 'gif', 'mp3', 'mp4', 'mov', 'wav', 'flac', 'pdf');
const MEDIA_TYPES = ['image', 'video', 'sound', 'other'];
@@ -23,6 +24,15 @@ abstract class Model
return DIRECTORY_SEPARATOR . $basepath . Model::RENDER_DIR;
}
+ public static function globalpath()
+ {
+ $basepath = '';
+ if(!empty(Config::basepath())) {
+ $basepath = Config::basepath() . DIRECTORY_SEPARATOR ;
+ }
+ return DIRECTORY_SEPARATOR . $basepath . Model::GLOBAL_DIR;
+ }
+
public static function csspath()
{
$basepath = '';
@@ -45,12 +55,9 @@ abstract class Model
{
$basepath = '';
if(!empty(Config::basepath())) {
- $basepath = Config::basepath() . DIRECTORY_SEPARATOR ;
+ $basepath = Config::basepath() . '/' ;
}
- $url = DIRECTORY_SEPARATOR . $basepath . Model::FONT_DIR;
- return $url;
+ return '/' . $basepath . str_replace('\\', '/',Model::FONT_DIR);
}
-
-
}