aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin/Site.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-26 21:01:20 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-26 21:01:20 +0100
commit4f07abe65586d66b0000e9b877ce467d71178aa2 (patch)
treeb022ecaa725b61d9305e13aa88ed1bb7811c6540 /Zotlabs/Module/Admin/Site.php
parent8783ccfd727dc4834c1f3c9460f851350fc912f4 (diff)
downloadvolse-hubzilla-4f07abe65586d66b0000e9b877ce467d71178aa2.tar.gz
volse-hubzilla-4f07abe65586d66b0000e9b877ce467d71178aa2.tar.bz2
volse-hubzilla-4f07abe65586d66b0000e9b877ce467d71178aa2.zip
add a minversion to the theme and fallback to default if requirement is not met. mark incompatible themes in the theme selector
Diffstat (limited to 'Zotlabs/Module/Admin/Site.php')
-rw-r--r--Zotlabs/Module/Admin/Site.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index 829ca71e4..3bb384ec5 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -163,6 +163,13 @@ class Site {
foreach($files as $file) {
$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)) {
+ $theme_choices[$f] = $theme_choices_mobile[$f] = sprintf(t('%s - (Incompatible)'), $f);
+ continue;
+ }
+
if (file_exists($file . '/library'))
continue;
if (file_exists($file . '/mobile'))
@@ -310,4 +317,4 @@ class Site {
));
}
-} \ No newline at end of file
+}