aboutsummaryrefslogtreecommitdiff
path: root/app/class/model.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-29 00:03:00 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-29 00:03:00 +0100
commit6e3ad2f1355e5f474cc02ab3b9eebe881dbb04ee (patch)
treef41a8fcdb5a8ef412a408ae637defb2985f5d3b1 /app/class/model.php
parentafad95324de8f078e9f3dedc66df66b6c2eebe72 (diff)
downloadwcms-6e3ad2f1355e5f474cc02ab3b9eebe881dbb04ee.tar.gz
wcms-6e3ad2f1355e5f474cc02ab3b9eebe881dbb04ee.zip
fonts
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);
}
-
-
}