From: Vincent Vanwaelscappel Date: Fri, 8 Oct 2021 11:10:57 +0000 (+0200) Subject: wait #4769 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=19a94adee5864e85b4bbab4b6ef5ec7f05410839;p=fluidbook-toolbox.git wait #4769 @1 --- diff --git a/app/Http/Controllers/API/FluidbookThemeAPIController.php b/app/Http/Controllers/API/FluidbookThemeAPIController.php index 9aeac90f9..d162af65f 100644 --- a/app/Http/Controllers/API/FluidbookThemeAPIController.php +++ b/app/Http/Controllers/API/FluidbookThemeAPIController.php @@ -60,7 +60,7 @@ class FluidbookThemeAPIController extends Controller */ public static function _handleFiles($theme, $data) { - $oldRoot = '/home/extranet/www/fluidbook/themes/' . $theme->getAttribute('id') . '/'; + // $oldRoot = '/home/extranet/www/fluidbook/themes/' . $theme->getAttribute('id') . '/'; foreach ($theme->getFields() as $field) { if (!($field instanceof Files)) { continue; @@ -70,47 +70,47 @@ class FluidbookThemeAPIController extends Controller if (!$v) { $theme->deleteMediaInField($k); - continue; - } - $path = $oldRoot . $v; - if (!file_exists($path)) { - $opath = str_replace('.svg', '.o.svg', $path); - if (file_exists($opath)) { - copy($opath, $path); - } else { - continue; - } - } - - $media = $theme->getMediaInField($k); - $upload = false; - - if ($media->count() === 0) { - $upload = true; - } else { - /** @var Media $m */ - $m = $media->get(0); - - if ($m->getAttribute('file_name') !== $k) { - $upload = true; - } else { - $mpath = $m->getPath(); - if (filesize($path) !== filesize($mpath)) { - $upload = true; - } - } - } - - if (!$upload) { - continue; - } - $s = storage_path('themes/' . $theme->getAttribute('id')); - if (!file_exists($s)) { - mkdir($s); + //continue; } - $f = $s . '/' . $v; - copy($path, $f); - $theme->addMediaToField($k, $f); +// $path = $oldRoot . $v; +// if (!file_exists($path)) { +// $opath = str_replace('.svg', '.o.svg', $path); +// if (file_exists($opath)) { +// copy($opath, $path); +// } else { +// continue; +// } +// } +// +// $media = $theme->getMediaInField($k); +// $upload = false; +// +// if ($media->count() === 0) { +// $upload = true; +// } else { +// /** @var Media $m */ +// $m = $media->get(0); +// +// if ($m->getAttribute('file_name') !== $k) { +// $upload = true; +// } else { +// $mpath = $m->getPath(); +// if (filesize($path) !== filesize($mpath)) { +// $upload = true; +// } +// } +// } +// +// if (!$upload) { +// continue; +// } +// $s = storage_path('themes/' . $theme->getAttribute('id')); +// if (!file_exists($s)) { +// mkdir($s); +// } +// $f = $s . '/' . $v; +// copy($path, $f); +// $theme->addMediaToField($k, $f); } } diff --git a/config/logging.php b/config/logging.php index 088c204e2..a20402898 100644 --- a/config/logging.php +++ b/config/logging.php @@ -37,7 +37,7 @@ return [ 'channels' => [ 'stack' => [ 'driver' => 'stack', - 'channels' => ['single'], + 'channels' => ['daily'], 'ignore_exceptions' => false, ], diff --git a/public/info.php b/public/info.php new file mode 100644 index 000000000..61ace196d --- /dev/null +++ b/public/info.php @@ -0,0 +1,2 @@ +