From e7c3ca9bd832f83bf2f66d6a06761062f2118185 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Sun, 4 Jun 2017 16:39:52 +0200 Subject: fix allow setting a default schema for the hub (issue #797) and allow selecting of focus (hubzilla default) schema if a default is set. --- view/theme/redbasic/php/config.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'view/theme/redbasic/php/config.php') diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 752a02a6a..8dbe1be9c 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -5,10 +5,20 @@ namespace Zotlabs\Theme; class RedbasicConfig { function get_schemas() { - $scheme_choices = array(); - $scheme_choices["---"] = t("Focus (Hubzilla default)"); $files = glob('view/theme/redbasic/schema/*.php'); + + $scheme_choices = []; + if($files) { + + if(in_array('view/theme/redbasic/schema/default.php', $files)) { + $scheme_choices['---'] = t('Default'); + $scheme_choices['focus'] = t('Focus (Hubzilla default)'); + } + else { + $scheme_choices['---'] = t('Focus (Hubzilla default)'); + } + foreach($files as $file) { $f = basename($file, ".php"); if($f != 'default') { @@ -17,6 +27,7 @@ class RedbasicConfig { } } } + return $scheme_choices; } -- cgit v1.2.3