mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
BUG Check for extensions on record in CMS (fixes #41)
This commit is contained in:
parent
d837220b01
commit
4f433155f1
@ -30,7 +30,7 @@ class TranslatableCMSMainExtension extends Extension {
|
||||
// if a locale is set, it needs to match to the current record
|
||||
$requestLocale = $req->requestVar("Locale") ? $req->requestVar("Locale") : $req->requestVar("locale");
|
||||
$page = $this->owner->currentPage();
|
||||
if($requestLocale && $page && $page->Locale != $requestLocale) {
|
||||
if($requestLocale && $page && $page->hasExtension('Translatable') && $page->Locale != $requestLocale) {
|
||||
$transPage = $page->getTranslation($requestLocale);
|
||||
if($transPage) {
|
||||
Translatable::set_current_locale($transPage->Locale);
|
||||
|
Loading…
Reference in New Issue
Block a user