From: Vincent Vanwaelscappel Date: Thu, 13 Mar 2025 16:11:47 +0000 (+0100) Subject: wip #7387 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c311de2e5d3dde7ad02a6c9eff0a0450bfffdab3;p=cubist_cms-back.git wip #7387 @2 --- diff --git a/src/app/Magic/Models/ExternalServer.php b/src/app/Magic/Models/ExternalServer.php index a6d0360..31bdab2 100644 --- a/src/app/Magic/Models/ExternalServer.php +++ b/src/app/Magic/Models/ExternalServer.php @@ -28,6 +28,7 @@ class ExternalServer extends CubistMagicAbstractModel implements IServer $this->addField('name', Text::class, __('Nom'), ['column' => true]); $this->addField('protocol', SelectFromArray::class, __('Protocole'), ['options' => $this->getProtocols(), 'default' => 'SFTP', 'column' => true, 'allows_null' => false]); + $this->addField('ftp_mode', SelectFromArray::class, __('Mode FTP'), ['when' => ['protocol' => $this->getFTPProtocols()], 'options' => ['1' => __('Actif'), '0' => __('Passif')], 'default' => '1']); $this->addField('host', Text::class, __('Hôte'), ['default' => '', 'column' => true, 'column_label' => __('Serveur'), 'column_function_name' => 'getServerColumn', 'column_type' => 'model_function', 'when' => ['protocol' => $this->getHostProtocols()]]); $this->addField('port', Integer::class, __('Port'), ['hint' => __('Laisser vide pour utiliser le port par défaut'), 'default' => '', 'min' => 1, 'max' => 65536, 'when' => ['protocol' => $this->getPortProtocols()]]); $this->addField('username', Text::class, __('Nom d\'utilisateur'), ['when' => ['protocol' => $this->getUsernameProtocols()]]); @@ -201,7 +202,7 @@ class ExternalServer extends CubistMagicAbstractModel implements IServer public function getSettings() { - return ['ftp_mode' => 1]; + return ['ftp_mode' => $this->ftp_mode]; } public function makeURL($path)