aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-27 10:13:08 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-27 10:13:08 +0100
commit0f208fb36bca5e3395d34ce3553d98bab389ddd3 (patch)
tree333cbaf6517111b4af41d96fa20258339ddde041 /Zotlabs/Module
parent4f07abe65586d66b0000e9b877ce467d71178aa2 (diff)
downloadvolse-hubzilla-0f208fb36bca5e3395d34ce3553d98bab389ddd3.tar.gz
volse-hubzilla-0f208fb36bca5e3395d34ce3553d98bab389ddd3.tar.bz2
volse-hubzilla-0f208fb36bca5e3395d34ce3553d98bab389ddd3.zip
set minversion and maxversion for themes in view/theme/themename/php/theme.php instead of separate file.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Admin/Site.php5
-rw-r--r--Zotlabs/Module/Settings/Display.php5
2 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index 3bb384ec5..b71e63030 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -164,8 +164,9 @@ class Site {
$vars = '';
$f = basename($file);
- $min_version = ((file_exists('view/theme/' . $f . '/.MINVERSION')) ? file_get_contents('view/theme/' . $f . '/.MINVERSION') : 0);
- if((version_compare($min_version, STD_VERSION, '>=')) || ($min_version == 0)) {
+ $info = get_theme_info($f);
+ $compatible = check_plugin_versions($info);
+ if(!$compatible) {
$theme_choices[$f] = $theme_choices_mobile[$f] = sprintf(t('%s - (Incompatible)'), $f);
continue;
}
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index d5be07a81..ee404daba 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -131,8 +131,9 @@ class Display {
foreach($allowed_themes as $th) {
$f = $th;
- $min_version = ((file_exists('view/theme/' . $th . '/.MINVERSION')) ? file_get_contents('view/theme/' . $th . '/.MINVERSION') : 0);
- if((version_compare($min_version, STD_VERSION, '>=')) || ($min_version == 0)) {
+ $info = get_theme_info($th);
+ $compatible = check_plugin_versions($info);
+ if(!$compatible) {
$mobile_themes[$f] = $themes[$f] = sprintf(t('%s - (Incompatible)'), $f);
continue;
}