diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-02-27 10:13:08 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-02-27 10:16:04 +0100 |
commit | 8e3e90ddd243011828b9dbb44e7c4abc00655b28 (patch) | |
tree | 7354d1494ad46efa10e130ec01728bc2f0e5b1e5 /Zotlabs/Render | |
parent | 8a69a5c3c7bd0188228d5c1c8580e5331a66e2da (diff) | |
download | volse-hubzilla-8e3e90ddd243011828b9dbb44e7c4abc00655b28.tar.gz volse-hubzilla-8e3e90ddd243011828b9dbb44e7c4abc00655b28.tar.bz2 volse-hubzilla-8e3e90ddd243011828b9dbb44e7c4abc00655b28.zip |
set minversion and maxversion for themes in view/theme/themename/php/theme.php instead of separate file.
Diffstat (limited to 'Zotlabs/Render')
-rw-r--r-- | Zotlabs/Render/Theme.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php index 53bcfe664..7464a0db2 100644 --- a/Zotlabs/Render/Theme.php +++ b/Zotlabs/Render/Theme.php @@ -70,8 +70,9 @@ class Theme { $chosen_theme = $_GET['theme_preview']; // Check if $chosen_theme is compatible with core. If not fall back to default - $min_version = ((file_exists('view/theme/' . $chosen_theme . '/.MINVERSION')) ? file_get_contents('view/theme/' . $chosen_theme . '/.MINVERSION') : 0); - if((version_compare($min_version, STD_VERSION, '>=')) || ($min_version == 0)) { + $info = get_theme_info($chosen_theme); + $compatible = check_plugin_versions($info); + if(!$compatible) { $chosen_theme = ''; } |