fix allow setting a default schema for the hub (issue #797) and allow selecting of focus (hubzilla default) schema if a default is set.

This commit is contained in:
git-marijus
2017-06-04 16:39:52 +02:00
parent e8a4e9a31f
commit e7c3ca9bd8
2 changed files with 16 additions and 6 deletions

View File

@@ -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;
}