]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6998 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 15 Jul 2024 14:01:23 +0000 (16:01 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 15 Jul 2024 14:01:23 +0000 (16:01 +0200)
app/Http/Controllers/Admin/Operations/FluidbookPublication/PreviewOperation.php
app/Models/FluidbookPublication.php
app/Models/YSLSurvey.php [deleted file]

index 7fbae2a6fe75fd11c75713da0491a49055b191dd..ca9d1efac5c38983b2f4b8bc57336f4eac2c4085 100644 (file)
@@ -141,7 +141,9 @@ trait PreviewOperation
 
         $relayPath = $dest . '/' . $path;
         if (!file_exists($relayPath)) {
-            FluidbookHealthIssues::addIssue($fluidbook->id, FluidbookHealthIssues::TYPE_MISSING_FILE, ['path' => $path]);
+            if ($path !== 'index.html') {
+                FluidbookHealthIssues::addIssue($fluidbook->id, FluidbookHealthIssues::TYPE_MISSING_FILE, ['path' => $path]);
+            }
             abort(404, __('Ce fichier n\'existe pas'));
         }
         return XSendFileController::sendfile($relayPath);
index 3bdcfe6b54e73a0351c35cfe02148a48e4c81257..892b6b2b9da447f9d8fd9b4d6ad1d07fa633ae48 100644 (file)
@@ -845,21 +845,6 @@ class FluidbookPublication extends ToolboxStatusModel
 //        return true;
     }
 
-    /**
-     * @param $id
-     * @return FluidbookPublication
-     */
-    public static function syncPublicationFromWorkshop($id)
-    {
-        return;
-        /** @var FluidbookPublication $fb */
-        $fb = FluidbookPublication::withoutGlobalScopes()->find($id);
-        $fb?->syncFromWorkshop();
-
-        return FluidbookPublication::find($id);
-    }
-
-
     public function moveRegion($newRegion)
     {
         foreach (FluidbookDocument::withoutGlobalScopes()->whereIn('id', $this->getDocumentsId())->get() as $doc) {
diff --git a/app/Models/YSLSurvey.php b/app/Models/YSLSurvey.php
deleted file mode 100644 (file)
index 3e0eba1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-namespace App\Models;
-
-use App\Fields\FluidbookID;
-use Cubist\Backpack\Magic\Fields\Country;
-use Cubist\Backpack\Magic\Fields\Integer;
-use Cubist\Backpack\Magic\Fields\Text;
-use Cubist\Backpack\Magic\Fields\Textarea;
-use Cubist\Backpack\Magic\Models\CubistMagicAbstractModel;
-
-class YSLSurvey extends CubistMagicAbstractModel
-{
-    protected $table = 'ysl_survey';
-    protected $_options = ['name' => 'ysl-survey',
-        'singular' => 'feeback',
-        'plural' => 'feedbacks'];
-
-
-    protected static $_permissionBase = 'ysl-survey';
-
-    public function setFields()
-    {
-        parent::setFields();
-
-        $this->addField('fluidbook_id', FluidbookID::class, __('Fluidbook'));
-        $this->addField('page', Text::class, __('Page'));
-        $this->addField('rating', Integer::class, __('Note'));
-        $this->addField('suggestions', Textarea::class, __('Message'));
-        $this->addField('title', Text::class, __('Titre'));
-        $this->addField('function', Text::class, __('Fonction'));
-        $this->addField('country', Country::class, __('Pays'));
-        $this->addField('date', Integer::class, __('Date'));
-    }
-}