use Cubist\Net\Transfer\Local;
use Cubist\Util\Files\Files;
use Cubist\Util\Json;
+use Illuminate\Support\Facades\DB;
// __('!! Serveurs externes')
class FluidbookExternalInstallServer extends ExternalServer
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]);
+
}
public function onSaved(): bool
} catch (\Exception $e) {
}
+ try {
+ $fingerprint = ssh2_fingerprint($connection,
+ SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX);
+ } catch (\Exception $e) {
+
+ }
+
+ if(!$fingerprint) {
+ throw new \Exception('Fingerprint missing');
+ }
+
try {
self::$isValidConnexion = ssh2_auth_password($connection, $usr, $pwd);
} catch (\Exception $e) {
return self::$isValidConnexion;
}
+
+ public static 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()
+ ->get()
+ ->groupBy('fluidbook_external_install_server.host')
+ ->toArray();*/
+ }
}