aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render/Theme.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-27 10:44:50 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-27 10:45:31 +0100
commit24676980450908d22b56d2eb3c146ad1f991c97c (patch)
treeb51d7fdf077a034c065577087b5b9811b22f88e9 /Zotlabs/Render/Theme.php
parentb6c4e6a6d08dd88a3d86b5b509a2cd0f5e72ef83 (diff)
downloadvolse-hubzilla-24676980450908d22b56d2eb3c146ad1f991c97c.tar.gz
volse-hubzilla-24676980450908d22b56d2eb3c146ad1f991c97c.tar.bz2
volse-hubzilla-24676980450908d22b56d2eb3c146ad1f991c97c.zip
do not mess up schemas
Diffstat (limited to 'Zotlabs/Render/Theme.php')
-rw-r--r--Zotlabs/Render/Theme.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php
index 7464a0db2..71eef50c3 100644
--- a/Zotlabs/Render/Theme.php
+++ b/Zotlabs/Render/Theme.php
@@ -69,16 +69,18 @@ class Theme {
if(array_key_exists('theme_preview',$_GET))
$chosen_theme = $_GET['theme_preview'];
+
+
+ // Allow theme selection of the form 'theme_name:schema_name'
+ $themepair = explode(':', $chosen_theme);
+
// Check if $chosen_theme is compatible with core. If not fall back to default
- $info = get_theme_info($chosen_theme);
+ $info = get_theme_info($themepair[0]);
$compatible = check_plugin_versions($info);
if(!$compatible) {
$chosen_theme = '';
}
- // Allow theme selection of the form 'theme_name:schema_name'
- $themepair = explode(':', $chosen_theme);
-
if($chosen_theme && (file_exists('view/theme/' . $themepair[0] . '/css/style.css') || file_exists('view/theme/' . $themepair[0] . '/php/style.php'))) {
return($themepair);
}