Removed home_redirect settings (conflict with new include_default_lang setting)

This commit is contained in:
Andy Miller
2015-10-13 16:53:52 -06:00
parent 00ec536761
commit 7ad9996cc3
3 changed files with 0 additions and 36 deletions

View File

@@ -243,28 +243,6 @@ form:
validate:
type: bool
languages.home_redirect.include_lang:
type: toggle
label: PLUGIN_ADMIN.HOME_REDIRECT_INCLUDE_LANGUAGE
help: PLUGIN_ADMIN.HOME_REDIRECT_INCLUDE_LANGUAGE_HELP
highlight: 1
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
languages.home_redirect.include_route:
type: toggle
label: PLUGIN_ADMIN.HOME_REDIRECT_INCLUDE_ROUTE
help: PLUGIN_ADMIN.HOME_REDIRECT_INCLUDE_ROUTE_HELP
highlight: 0
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
languages.http_accept_language:
type: toggle
label: PLUGIN_ADMIN.HTTP_ACCEPT_LANGUAGE

View File

@@ -9,9 +9,6 @@ languages:
translations: true # Enable translations by default
translations_fallback: true # Fallback through supported translations if active lang doesn't exist
session_store_active: false # Store active language in session
home_redirect:
include_lang: true # Include language in home redirect (/en)
include_route: false # Include route in home redirect (/blog)
http_accept_language: false # Attempt to set the language based on http_accept_language header in the browser
override_locale: false # Override the default or system locale with language specific one

View File

@@ -110,17 +110,6 @@ class Uri
// set active language
$uri = $language->setActiveFromUri($uri);
// redirect to language specific homepage if configured to do so
if ($uri == '/' && $language->enabled()) {
if ($config->get('system.languages.home_redirect.include_route', true)) {
$prefix = $config->get('system.languages.home_redirect.include_lang', true) ? $language->getLanguage() . '/' : '';
$grav->redirect($prefix . Pages::getHomeRoute());
} elseif ($config->get('system.languages.home_redirect.include_lang', true)) {
$grav->redirect($language->getLanguage() . '/');
}
}
// split the URL and params
$bits = parse_url($uri);