From 7f94fccda33383f3a7be364cf0c316e7ed2c61bb Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 22 Dec 2018 08:21:09 +0100 Subject: bug fix: font dir check and create --- app/class/modelfont.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/class/modelfont.php') diff --git a/app/class/modelfont.php b/app/class/modelfont.php index 213da11..8e7645e 100644 --- a/app/class/modelfont.php +++ b/app/class/modelfont.php @@ -4,7 +4,15 @@ class Modelfont extends Model { const FONT_TYPES = ['woff2', 'woff', 'otf', 'ttf', 'eot', 'svg']; - + + public function fontdircheck() + { + if(!is_dir(Model::FONT_DIR)) { + return mkdir(Model::FONT_DIR); + } else { + return true; + } + } public function getfontlist() { -- cgit v1.2.3