mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Don't attach translation.js when in the maintenance mode
Also not sure but maybe it has something to do with #207.
This commit is contained in:
parent
1c6433eb73
commit
6de62a6929
@ -254,11 +254,15 @@ abstract class AbstractController implements
|
|||||||
|
|
||||||
// Localization file is added as absolute URL because URL Generator
|
// Localization file is added as absolute URL because URL Generator
|
||||||
// already prepended base URL to its result.
|
// already prepended base URL to its result.
|
||||||
|
// Localization file is generated using contents from the database,
|
||||||
|
// so it should not be attached when in the maintenance mode
|
||||||
|
if (get_maintenance_mode() === false) {
|
||||||
$this->getAssetManager()->attachJs(
|
$this->getAssetManager()->attachJs(
|
||||||
$this->generateUrl('js_translation', array('locale' => get_current_locale())),
|
$this->generateUrl('js_translation', array('locale' => get_current_locale())),
|
||||||
AssetManagerInterface::ABSOLUTE_URL,
|
AssetManagerInterface::ABSOLUTE_URL,
|
||||||
-1000
|
-1000
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->getStyle()->render($template, $parameters);
|
return $this->getStyle()->render($template, $parameters);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user