Update
This commit is contained in:
parent
2432ccdcf1
commit
29d1538d68
1 changed files with 6 additions and 1 deletions
|
@ -28,6 +28,11 @@
|
||||||
if(file_exists('vendor/autoload.php')) {
|
if(file_exists('vendor/autoload.php')) {
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
$Parsedown = new Parsedown();
|
$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';
|
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 {
|
try {
|
||||||
$sql = new PDO('pgsql:host='.$database_host.';port='.$database_port.';dbname='.$database_name.';user='.$database_user.';password='.$database_pass);
|
$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);
|
$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
Loading…
Reference in a new issue