diff options
Diffstat (limited to 'Zotlabs/Render/Theme.php')
-rw-r--r-- | Zotlabs/Render/Theme.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php index 9f9009d72..3a0116abe 100644 --- a/Zotlabs/Render/Theme.php +++ b/Zotlabs/Render/Theme.php @@ -70,9 +70,15 @@ class Theme { $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($themepair[0]); + $compatible = check_plugin_versions($info); + if(!$compatible) { + $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); } @@ -125,9 +131,9 @@ class Theme { $opts .= $schema_str; if(file_exists('view/theme/' . $t . '/php/style.php')) - return('view/theme/' . $t . '/php/style.pcss' . $opts); + return('/view/theme/' . $t . '/php/style.pcss' . $opts); - return('view/theme/' . $t . '/css/style.css'); + return('/view/theme/' . $t . '/css/style.css'); } function debug() { |