* 'version' => Scheme version
* 'overwrites' => Variables which overwriting custom settings
*/
-use Friendica\Core\PConfig;
-require_once 'boot.php';
+use Friendica\Core\PConfig;
function get_scheme_info($scheme)
{
- $theme = get_app()->getCurrentTheme();
+ $theme = \get_app()->getCurrentTheme();
$themepath = 'view/theme/' . $theme . '/';
- $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme'));
+ if (!isset($scheme)) {
+ $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme'));
+ }
$info = [
'name' => $scheme,
foreach ($ll as $l) {
$l = trim($l, "\t\n\r */");
if ($l != '') {
- list($k, $v) = array_map('trim', explode(':', $l, 2));
+ $values = array_map('trim', explode(':', $l, 2));
+ if (count($values) < 2) {
+ continue;
+ }
+ list($k, $v) = $values;
$k = strtolower($k);
if ($k == 'author') {
$r = preg_match('|([^<]+)<([^>]+)>|', $v, $m);