* 'overwrites' => Variables which overwriting custom settings
*/
-use Friendica\Core\PConfig;
+use Friendica\DI;
+use Friendica\Util\Strings;
function get_scheme_info($scheme)
{
- $theme = \get_app()->getCurrentTheme();
+ $theme = DI::app()->getCurrentTheme();
$themepath = 'view/theme/' . $theme . '/';
- if (!isset($scheme)) {
- $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme'));
+ if (empty($scheme)) {
+ $scheme = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema'));
}
+ $scheme = Strings::sanitizeFilePathItem($scheme);
+
$info = [
'name' => $scheme,
'description' => '',