From 36d0594b8e4b75e98cc860e828d540bb93e3c4d6 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 3 Mar 2024 12:30:27 +0100 Subject: Remove obsolete field for system lang from site admin page. The field was commented out in the module, but still remained in the template. This patch also removes some processing to discover available languages whose result were not used. This should fix https://framagit.org/hubzilla/core/-/issues/1840 --- Zotlabs/Module/Admin/Site.php | 15 --------------- view/tpl/admin_site.tpl | 2 -- 2 files changed, 17 deletions(-) diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php index d53322573..dae5e7c77 100644 --- a/Zotlabs/Module/Admin/Site.php +++ b/Zotlabs/Module/Admin/Site.php @@ -227,20 +227,6 @@ class Site { */ function get() { - /* Installed langs */ - $lang_choices = array(); - $langs = glob('view/*/hstrings.php'); - - if(is_array($langs) && count($langs)) { - if(! in_array('view/en/hstrings.php',$langs)) - $langs[] = 'view/en/'; - asort($langs); - foreach($langs as $l) { - $t = explode("/",$l); - $lang_choices[$t[1]] = $t[1]; - } - } - /* Installed themes */ $theme_choices_mobile["---"] = t("Default"); $theme_choices = array(); @@ -425,7 +411,6 @@ class Site { '$banner' => array('banner', t("Banner/Logo"), $banner, t('Unfiltered HTML/CSS/JS is allowed')), '$admininfo' => array('admininfo', t("Administrator Information"), $admininfo, t("Contact information for site administrators. Displayed on siteinfo page. BBCode can be used here")), '$siteinfo' => array('siteinfo', t('Site Information'), get_config('system','siteinfo'), t("Publicly visible description of this site. Displayed on siteinfo page. BBCode can be used here")), - //'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - change theme settings"), $theme_choices), // '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile), // '$site_channel' => array('site_channel', t("Channel to use for this website's static pages"), get_config('system','site_channel'), t("Site Channel")), diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index bad68361b..d91c7caad 100644 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -13,8 +13,6 @@ {{include file="field_input.tpl" field=$reply_address}} {{include file="field_input.tpl" field=$from_email}} {{include file="field_input.tpl" field=$from_email_name}} - - {{include file="field_select.tpl" field=$language}} {{include file="field_select.tpl" field=$theme}} {{* include file="field_select.tpl" field=$theme_mobile *}} {{include file="field_input.tpl" field=$frontpage}} -- cgit v1.2.3