aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r--view/theme/redbasic/php/config.php15
-rw-r--r--view/theme/redbasic/php/style.php7
2 files changed, 16 insertions, 6 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;
}
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index a666f96f2..06cf23ba2 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -56,10 +56,9 @@ if (($schema) && ($schema != '---')) {
}
-// If we haven't got a schema, load the default. We shouldn't touch this - we
-// should leave it for admins to define for themselves.
-// default.php and default.css MUST be symlinks to existing schema files.
-if (! $schema) {
+// Allow admins to set a default schema for the hub.
+// default.php and default.css MUST be symlinks to existing schema files in view/theme/redbasic/schema
+if ((!$schema) || ($schema == '---')) {
if(file_exists('view/theme/redbasic/schema/default.php')) {
$schemefile = 'view/theme/redbasic/schema/default.php';