diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000000..228ad3258f --- /dev/null +++ b/.htaccess @@ -0,0 +1,4 @@ + +RewriteEngine On +RewriteRule reset/?$ reset.html [QSA,L] + \ No newline at end of file diff --git a/application/Espo/Core/Utils/Config.php b/application/Espo/Core/Utils/Config.php index 6444931df1..424a7a1034 100644 --- a/application/Espo/Core/Utils/Config.php +++ b/application/Espo/Core/Utils/Config.php @@ -125,7 +125,7 @@ class Config $config = $this->getFileManager()->getContents($defaultConfig['configPath']); if (empty($config)) { - $GLOBALS['log']->emergency('Check syntax or permission of your '.$defaultConfig['configPath']); + $config = array(); } $this->configData = Util::merge((array) $defaultConfig, (array) $config); diff --git a/application/Espo/Core/defaults/config.php b/application/Espo/Core/defaults/config.php index 9450c52803..ec04fd2bc3 100644 --- a/application/Espo/Core/defaults/config.php +++ b/application/Espo/Core/defaults/config.php @@ -2,7 +2,6 @@ return array ( 'configPath' => 'application/config.php', - 'cachePath' => 'data/cache', 'database' => @@ -10,6 +9,31 @@ return array ( 'driver' => 'pdo_mysql', 'host' => 'localhost', ), + 'useCache' => true, + 'recordsPerPage' => 20, + 'recordsPerPageSmall' => 5, + 'applicationName' => 'EspoCRM', + 'timeZone' => 'UTC', + 'dateFormat' => 'MM/DD/YYYY', + 'timeFormat' => 'HH:mm', + 'weekStart' => 0, + 'thousandSeparator' => ',', + 'decimalMark' => '.', + 'currencyList' => + array ( + 0 => 'USD', + 1 => 'EUR', + ), + 'defaultCurrency' => 'USD', + 'outboundEmailIsShared' => true, + 'outboundEmailFromName' => 'EspoCRM', + 'outboundEmailFromAddress' => '', + 'smtpServer' => '', + 'smtpPort' => 25, + 'smtpAuth' => true, + 'smtpSecurity' => '', + 'smtpUsername' => '', + 'smtpPassword' => '', 'logger' => array ( 'path' => 'data/logs/espo.log', @@ -17,7 +41,6 @@ return array ( 'isRotate' => true, /*rotate every day every logs files*/ 'maxRotateFiles' => 30, /*max number of rotate files*/ ), - 'defaultPermissions' => array ( 'dir' => '0775', @@ -25,29 +48,32 @@ return array ( 'user' => '', 'group' => '', ), - 'dateFormat' => 'MM/DD/YYYY', - 'timeFormat' => 'HH:mm', - 'cron' => array( 'maxJobNumber' => 15, /*Max number of jobs per one execution*/ 'jobPeriod' => 7800, /*Period for jobs, ex. if cron executed at 15:35, it will execute all pending jobs for times from 14:05 to 15:35*/ 'minExecutionTime' => 50, /*to avoid too frequency execution*/ ), - + 'currency' => + array( + 'base' => 'USD', + 'rate' => array( + 'EUR' => 1.37, + 'GBP' => 1.67, + ), + ), + 'crud' => array( + 'get' => 'read', + 'post' => 'create', + 'put' => 'update', + 'patch' => 'patch', + 'delete' => 'delete', + ), 'systemUser' => array( 'id' => 'system', 'userName' => 'system', 'firstName' => '', 'lastName' => 'System', - ), - - 'crud' => array( - 'get' => 'read', - 'post' => 'create', - 'put' => 'update', - 'patch' => 'patch', - 'delete' => 'delete', - ), + ), 'systemItems' => array ( 'systemItems', @@ -62,16 +88,7 @@ return array ( 'defaultPermissions', 'logger', 'devMode', - ), - 'currency' => - array( - 'base' => 'USD', - 'rate' => array( - 'EUR' => 1.37, - 'GBP' => 1.67, - ), - ), - + ), ); ?> diff --git a/index.php b/index.php index df5bd1c02a..29421df556 100644 --- a/index.php +++ b/index.php @@ -1,11 +1,18 @@ getContainer()->get('config')->get('configPath'); +if (!file_exists($configFile)) { + header("Location: install/"); + exit; +} + if (empty($_GET['entryPoint'])) { include "main.html"; } else { - include "bootstrap.php"; - - $app = new \Espo\Core\Application(); $app->runEntryPoint($_GET['entryPoint']); } diff --git a/tests/testData/Utils/Config/defaultConfig.php b/tests/testData/Utils/Config/defaultConfig.php index 8cfc12b80e..36739b4ac8 100644 --- a/tests/testData/Utils/Config/defaultConfig.php +++ b/tests/testData/Utils/Config/defaultConfig.php @@ -35,8 +35,7 @@ return array ( 'database', 'customPath', 'defaultsPath', - 'crud', - 'scopeModuleMap', + 'crud', ), 'adminItems' => array (