From 3fa41231611872b79f33469ceec5a8af1a95294d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 5 Mar 2015 12:47:18 +0100 Subject: only allow theme selection forms if there are any themes to select --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/settings.php b/mod/settings.php index 59a4b1f42..bb0bfacbd 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -848,8 +848,8 @@ function settings_content(&$a) { '$baseurl' => $a->get_baseurl(true), '$uid' => local_channel(), - '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'), - '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''), + '$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false), + '$mobile_theme' => (($mobile_themes) ? array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, '') : false), '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), -- cgit v1.2.3