]> _ Git - fluidbook-toolbox.git/commitdiff
wait #4769 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Oct 2021 11:10:57 +0000 (13:10 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Oct 2021 11:10:57 +0000 (13:10 +0200)
app/Http/Controllers/API/FluidbookThemeAPIController.php
config/logging.php
public/info.php [new file with mode: 0644]

index 9aeac90f97ccef666d3d1412de2640922f737388..d162af65f92bf42476a2e362761239454a47f85f 100644 (file)
@@ -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);
         }
     }
 
index 088c204e29942a941c9cbfb8dadb44671a5b1814..a20402898ca79afb96916c27be61ac99b976ceb6 100644 (file)
@@ -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 (file)
index 0000000..61ace19
--- /dev/null
@@ -0,0 +1,2 @@
+<?php
+phpinfo();