forked from GNUsocial/gnu-social
fillConfigVoids to set default value of empty config options
This commit is contained in:
@@ -141,6 +141,7 @@ class GNUsocial
|
||||
// Load settings from database; note we need autoload for this
|
||||
Config::loadSettings();
|
||||
|
||||
self::fillConfigVoids();
|
||||
self::verifyLoadedConfig();
|
||||
|
||||
self::initPlugins();
|
||||
@@ -420,6 +421,14 @@ class GNUsocial
|
||||
}
|
||||
}
|
||||
|
||||
static function fillConfigVoids()
|
||||
{
|
||||
// special cases on empty configuration options
|
||||
if (!common_config('thumbnail', 'dir')) {
|
||||
common_config_set('thumbnail', 'dir', File::path('thumb'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that the loaded config is good. Not complete, but will
|
||||
* throw exceptions on common configuration problems I hope.
|
||||
|
||||
Reference in New Issue
Block a user