aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php/config.php
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-06-04 16:39:52 +0200
committergit-marijus <mario@mariovavti.com>2017-06-04 17:01:18 +0200
commit58b5c4cc1625c56a2d5351493e3e3c71f9887c89 (patch)
tree690cf2adfc1f2449b5af5b0913fa5bce33d12240 /view/theme/redbasic/php/config.php
parent47d55694a4c84b6c12c0db61a69bcac8b671b20e (diff)
downloadvolse-hubzilla-58b5c4cc1625c56a2d5351493e3e3c71f9887c89.tar.gz
volse-hubzilla-58b5c4cc1625c56a2d5351493e3e3c71f9887c89.tar.bz2
volse-hubzilla-58b5c4cc1625c56a2d5351493e3e3c71f9887c89.zip
fix allow setting a default schema for the hub (issue #797) and allow selecting of focus (hubzilla default) schema if a default is set.
Diffstat (limited to 'view/theme/redbasic/php/config.php')
-rw-r--r--view/theme/redbasic/php/config.php15
1 files changed, 13 insertions, 2 deletions
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;
}