From 29d1538d68871f85a0a5d8f98bd1a58b2ceec914 Mon Sep 17 00:00:00 2001 From: Airikr Date: Sun, 9 Jun 2024 18:13:46 +0200 Subject: [PATCH] Update --- site-settings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/site-settings.php b/site-settings.php index c8ad00c..2d2e0e8 100755 --- a/site-settings.php +++ b/site-settings.php @@ -28,6 +28,11 @@ if(file_exists('vendor/autoload.php')) { require_once 'vendor/autoload.php'; $Parsedown = new Parsedown(); + + if(!file_exists($dir_files.'/encryption.key')) { + $enckey = KeyFactory::generateEncryptionKey(); + KeyFactory::save($enckey, $dir_files.'/encryption.key'); + } } require_once 'site-functions.php'; @@ -35,7 +40,7 @@ - if(!empty($database_host) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) { + if(!empty($database_host) AND !empty($database_port) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) { try { $sql = new PDO('pgsql:host='.$database_host.';port='.$database_port.';dbname='.$database_name.';user='.$database_user.';password='.$database_pass); $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);