$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);
// 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) {
+++ /dev/null
-<?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'));
- }
-}