From a027f1f70dd29c339af1f21a979d353d3e177652 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 23 Jul 2021 13:40:42 +0200 Subject: [PATCH] check if sqlite db has propper path --- install/install.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index ea43f076f..a016048a9 100644 --- a/install/install.php +++ b/install/install.php @@ -110,12 +110,13 @@ do { $httpRoot = str_replace ("//", "/" , $httpRoot, $count); } while ($count<>0); +$msg = ''; if($rootDir != $settings->_rootDir) { $msg = "Your Root directory has been modified to fit your installation path!"; } $settings->_rootDir = $rootDir; -if(!$settings->_contentDir) { +if(!$settings->_contentDir || !is_dir($settings->_contentDir)) { $settings->_contentDir = realpath($settings->_rootDir."..") . '/data/'; $settings->_luceneDir = $settings->_contentDir . 'lucene/'; $settings->_stagingDir = $settings->_contentDir . 'staging/'; @@ -126,6 +127,11 @@ if(!$settings->_contentDir) { $settings->_cacheDir = $settings->_contentDir . 'cache/'; } } +if($settings->_dbDriver == 'sqlite') { + if(!$settings->_dbDatabase || !file_exists($settings->_dbDatabase)) { + $settings->_dbDatabase = $settings->_contentDir.'content.db'; + } +} $settings->_httpRoot = $httpRoot; if(isset($settings->_extraPath)) @@ -141,5 +147,5 @@ include("../inc/inc.ClassUI.php"); include("class.Install.php"); $view = new SeedDMS_View_Install(array('settings'=>$settings, 'session'=>null, 'sitename'=>'SeedDMS', 'printdisclaimer'=>0, 'showmissingtranslations'=>0, 'absbaseprefix'=>'/', 'enabledropfolderlist'=>0, 'enablemenutasks'=>0, 'configdir'=>$configDir)); -$view->install(); +$view->install($msg);