check if sqlite db has propper path

This commit is contained in:
Uwe Steinmann 2021-07-23 13:40:42 +02:00
parent 9c7ce41163
commit a027f1f70d

View File

@ -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);