From b4da9b897435e2f0b0429d277b2d5b9a63622d0d Mon Sep 17 00:00:00 2001 From: soufiane Date: Fri, 24 Nov 2023 18:21:05 +0100 Subject: [PATCH] wip #6479 --- app/Models/FluidbookExternalInstallServer.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Models/FluidbookExternalInstallServer.php b/app/Models/FluidbookExternalInstallServer.php index 0233406e9..cefbe5ba7 100644 --- a/app/Models/FluidbookExternalInstallServer.php +++ b/app/Models/FluidbookExternalInstallServer.php @@ -33,6 +33,7 @@ class FluidbookExternalInstallServer extends ExternalServer public function setFields() { + parent::setFields(); $this->addField('redirections', Table::class, __('Redirections'), ['entity_singular' => __('redirection'), 'columns' => ['from' => __('De'), 'to' => __('Vers')], 'when' => ['protocol' => 'hosting']]); $this->addField('allows_root', Checkbox::class, __('Autoriser le chargement à la racine (sur le chemin de base)'), ['default' => false]); @@ -114,16 +115,13 @@ class FluidbookExternalInstallServer extends ExternalServer return $result_; } - public static function listFluidbook($id) + public function listFluidbook() { - /*return DB::table('fluidbook_external_install_server') - ->join('fluidbook_publication', 'fluidbook_external_install_server.name', '=', 'fluidbook_publication.c_title') - ->where('fluidbook_external_install_server.created_ok','1') - ->where('fluidbook_external_install_server.host','!=','') - ->select() + $id = $this->id; + $results = DB::table('fluidbook_publication') + ->whereJsonContains('settings->install_online->server', $id) ->get() - ->groupBy('fluidbook_external_install_server.host') - ->toArray();*/ + ->toArray(); } public static function messages() { -- 2.39.5