}
$translator->setLocale($c->get('i18n')->getLongID());
- $translator->setCache($c->get('cache'));
+ if (!isset($container['mode']) || $c->get('mode') !== 'INSTALL' && $c->get('mode') !== 'NEED_UPDATE') {
+ $translator->setCache($c->get('cache'));
+ }
return $translator;
};
//For bad existing globals can be used...
-$hist = $container['history'];
-$login = $container['login'];
-$zdb = $container['zdb'];
+if (!isset($container['mode']) || $container['mode'] !== 'INSTALL' && $container['mode'] !== 'NEED_UPDATE') {
+ $hist = $container['history'];
+ $login = $container['login'];
+ $zdb = $container['zdb'];
+}
$i18n = $container['i18n'];
$translator = $container['translator'];
'themes/default/'
);
- $i18n = new Galette\Core\I18n();
- require_once __DIR__ . '/i18n.inc.php';
+ require_once '../includes/dependencies.php';
$app->add(
new Galette\Core\Middleware(
$session_name = 'galette_install_' . str_replace('.', '_', GALETTE_VERSION);
$session = &$_SESSION['galette'][$session_name];
-if (isset($session['lang'])) {
- $i18n = unserialize($session['lang']);
- if (!$i18n->getId()) {
- $i18n = new Galette\Core\I18n();
- }
-} else {
- $i18n = new Galette\Core\I18n();
-}
+$app = new \Slim\App(
+ array(
+ 'templates.path' => GALETTE_ROOT . 'templates/default/',
+ 'mode' => 'INSTALL'
+ )
+);
+require_once '../includes/dependencies.php';
if (isset($_GET['pref_lang'])) {
$i18n->changeLanguage($_GET['pref_lang']);
}
-$session['lang'] = serialize($i18n);
-
-require_once '../includes/i18n.inc.php';
if (isset($_POST['abort_btn'])) {
if (isset($session[md5(GALETTE_ROOT)])) {