mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 16:14:26 +02:00
Bugfixings in Config
- replaced usage of "!<unset>!" with null-returns - fixed bool settings (0/1) - fixed overriding config-values - fixed basepath problems
This commit is contained in:
parent
2d91d5c3d9
commit
8c3aebc376
24 changed files with 175 additions and 157 deletions
|
@ -205,6 +205,7 @@ class App
|
|||
/**
|
||||
* @brief App constructor.
|
||||
*
|
||||
* @param string $basePath The basedir of the app
|
||||
* @param Configuration $config The Configuration
|
||||
* @param LoggerInterface $logger The current app logger
|
||||
* @param Profiler $profiler The profiler of this application
|
||||
|
@ -212,14 +213,15 @@ class App
|
|||
*
|
||||
* @throws Exception if the Basepath is not usable
|
||||
*/
|
||||
public function __construct(Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true)
|
||||
public function __construct($basePath, Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true)
|
||||
{
|
||||
BaseObject::setApp($this);
|
||||
|
||||
$this->logger = $logger;
|
||||
$this->config = $config;
|
||||
$this->profiler = $profiler;
|
||||
$this->basePath = $this->config->get('system', 'basepath');
|
||||
$cfgBasePath = $this->config->get('system', 'basepath');
|
||||
$this->basePath = (isset($cfgBasePath) && $cfgBasePath !== '') ? $cfgBasePath : $basePath;
|
||||
|
||||
if (!Core\System::isDirectoryUsable($this->basePath, false)) {
|
||||
throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue