From: soufiane Date: Fri, 24 Nov 2023 17:21:05 +0000 (+0100) Subject: wip #6479 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b4da9b897435e2f0b0429d277b2d5b9a63622d0d;p=fluidbook-toolbox.git wip #6479 --- 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() {