aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modelfont.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-28 20:18:17 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-28 20:24:52 +0200
commit9090550d241f9f7b3246b24bfd323bd988add749 (patch)
tree2c2de66510533da53848dd876a9ab392471b38b8 /app/class/Modelfont.php
parent98514a4e0037aa0879e45bbad660aeda8837c624 (diff)
downloadwcms-9090550d241f9f7b3246b24bfd323bd988add749.tar.gz
wcms-9090550d241f9f7b3246b24bfd323bd988add749.zip
listen to brother Stan and clean some things
Diffstat (limited to 'app/class/Modelfont.php')
-rw-r--r--app/class/Modelfont.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/class/Modelfont.php b/app/class/Modelfont.php
index 3dac3ff..48885be 100644
--- a/app/class/Modelfont.php
+++ b/app/class/Modelfont.php
@@ -33,8 +33,8 @@ class Modelfont extends Model
public function list()
{
+ $list = [];
if ($handle = opendir(Model::FONT_DIR)) {
- $list = [];
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
$list[] = $entry;
@@ -73,7 +73,7 @@ class Modelfont extends Model
public function write(string $fontface)
{
- $write = file_put_contents(Model::GLOBAL_DIR . 'fonts.css', $fontface);
+ $write = file_put_contents(Model::ASSETS_CSS_DIR . 'fonts.css', $fontface);
if ($write !== false) {
}
}
@@ -81,7 +81,7 @@ class Modelfont extends Model
public function upload(array $file, $maxsize = 2 ** 24, $id = null)
{
$message = 'runing';
- if (isset($file) and $file['font']['error'] == 0 and $file['font']['size'] < $maxsize) {
+ if ($file['font']['error'] == 0 && $file['font']['size'] < $maxsize) {
$infosfichier = pathinfo($file['font']['name']);
$extension_upload = $infosfichier['extension'];
$extensions_autorisees = $this::FONT_TYPES;