From ceab55f26b47b86e4b4b3f1b59b89568491e2e32 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 6 Mar 2019 17:07:51 +0100 Subject: [PATCH 1/3] NEW : add constant MAIN_DEFAULT_LANGUAGE_FILTER --- htdocs/core/class/html.formadmin.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 1758480af8f..166e0ce2044 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -62,7 +62,9 @@ class FormAdmin public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0) { // phpcs:enable - global $langs; + global $conf, $langs; + + if (!empty($conf->global->MAIN_DEFAULT_LANGUAGE_FILTER)) $filter[$conf->global->MAIN_DEFAULT_LANGUAGE_FILTER] = 1; $langs_available=$langs->get_available_languages(DOL_DOCUMENT_ROOT, 12); From 0f8f4fbc15e2d8d7796f6c5ccfa4fafb72978662 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 6 Mar 2019 17:12:39 +0100 Subject: [PATCH 2/3] bad branching --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 35f6f56c57c..cecfc3e5efa 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -61,7 +61,7 @@ if (defined('THEME_ONLY_CONSTANT')) return; session_cache_limiter('public'); -require_once __DIR__.'/../../main.inc.php'; // __DIR__ allow this script to be included in custom themes +require_once '/../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) From b4397806fcd66667ba85269f44facb8897540cae Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 6 Mar 2019 17:14:05 +0100 Subject: [PATCH 3/3] bad branching 2 --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index cecfc3e5efa..1f58937d879 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -61,7 +61,7 @@ if (defined('THEME_ONLY_CONSTANT')) return; session_cache_limiter('public'); -require_once '/../../main.inc.php'; +require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)