mirror of
https://github.com/friendica/friendica
synced 2024-12-23 17:20:16 +00:00
Only show supported themes on the admin site.
This commit is contained in:
parent
e6202defd1
commit
e803e56eea
1 changed files with 40 additions and 38 deletions
|
@ -615,15 +615,17 @@ function admin_page_site(&$a) {
|
||||||
$theme_choices = array();
|
$theme_choices = array();
|
||||||
$theme_choices_mobile = array();
|
$theme_choices_mobile = array();
|
||||||
$theme_choices_mobile["---"] = t("No special theme for mobile devices");
|
$theme_choices_mobile["---"] = t("No special theme for mobile devices");
|
||||||
$files = glob('view/theme/*');
|
$files = glob('view/theme/*'); /**/
|
||||||
if($files) {
|
if($files) {
|
||||||
foreach($files as $file) {
|
foreach($files as $file) {
|
||||||
|
if (intval(file_exists($file . '/unsupported')))
|
||||||
|
continue;
|
||||||
|
|
||||||
$f = basename($file);
|
$f = basename($file);
|
||||||
$theme_name = ((file_exists($file . '/experimental')) ? sprintf("%s - \x28Experimental\x29", $f) : $f);
|
$theme_name = ((file_exists($file . '/experimental')) ? sprintf("%s - \x28Experimental\x29", $f) : $f);
|
||||||
if (file_exists($file . '/mobile')) {
|
if (file_exists($file . '/mobile')) {
|
||||||
$theme_choices_mobile[$f] = $theme_name;
|
$theme_choices_mobile[$f] = $theme_name;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$theme_choices[$f] = $theme_name;
|
$theme_choices[$f] = $theme_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue