2018-11-12 03:27:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/* Local settings; not checked into git. */
|
|
|
|
$localSettings = [];
|
|
|
|
if (\is_readable(__DIR__ . '/../config/local.json')) {
|
|
|
|
$settingsFile = \file_get_contents(__DIR__ . '/../config/local.json');
|
|
|
|
if (\is_string($settingsFile)) {
|
|
|
|
/** @var array $localSettings */
|
|
|
|
$localSettings = \json_decode($settingsFile, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Full directory settings list
|
|
|
|
*
|
|
|
|
* Please don't change any value here, instead put them into config/local.json following the same structure.
|
|
|
|
*/
|
|
|
|
$settings = [
|
|
|
|
'displayErrorDetails' => false, // set to false in production
|
|
|
|
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
|
|
|
// Escaper settings
|
|
|
|
'escaper' => [
|
|
|
|
'encoding' => 'utf-8'
|
|
|
|
],
|
|
|
|
// Renderer settings
|
|
|
|
'renderer' => [
|
2018-11-16 05:29:52 +01:00
|
|
|
'template_path' => __DIR__ . '/templates',
|
2018-11-12 03:27:49 +01:00
|
|
|
],
|
|
|
|
// Monolog settings
|
|
|
|
'logger' => [
|
|
|
|
'name' => 'friendica-directory',
|
|
|
|
'path' => __DIR__ . '/../logs/app.log',
|
|
|
|
// This has to be translated to a numeric level (lowest priority 100-600 highest priority) in config/local.json
|
|
|
|
'level' => \Monolog\Logger::WARNING,
|
|
|
|
'formatter' => 'logfile',
|
|
|
|
],
|
|
|
|
// Dummy database settings, please run "bin/console install" to set them up for your instance
|
|
|
|
'database' => [
|
|
|
|
'driver' => 'mysql',
|
|
|
|
'hostname' => 'localhost',
|
|
|
|
'database' => 'friendica-directory',
|
|
|
|
'username' => 'friendica-directory',
|
|
|
|
'password' => 'friendica-directory',
|
|
|
|
],
|
|
|
|
'simplecache' => [
|
2018-11-16 05:29:52 +01:00
|
|
|
'directory' => __DIR__ . '/../cache',
|
2018-11-12 03:27:49 +01:00
|
|
|
],
|
|
|
|
'poller' => [
|
|
|
|
// Successful poll delay
|
|
|
|
'directory_poll_delay' => 3600, // 1 hour
|
|
|
|
'server_poll_delay' => 24 * 3600, // 1 day
|
|
|
|
'profile_poll_delay' => 24 * 3600, // 1 day
|
|
|
|
|
|
|
|
// Unsuccessful poll base delay
|
|
|
|
'directory_poll_retry_base_delay' => 600, // 10 minutes
|
|
|
|
'server_poll_retry_base_delay' => 1800, // 30 minutes
|
|
|
|
'profile_poll_retry_base_delay' => 1800, // 30 minutes
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
return [
|
|
|
|
'settings' => $localSettings + $settings
|
|
|
|
];
|