From: Johan Cwiklinski
Date: Thu, 25 Nov 2021 14:49:49 +0000 (+0100)
Subject: Revert "Don't display installer if not necessary"
X-Git-Tag: 0.9.6~21
X-Git-Url: https://git.agnieray.net/?a=commitdiff_plain;h=2a5d0f6f3d36db5eb8b454e32b64f5d4c8421177;p=galette.git
Revert "Don't display installer if not necessary"
This reverts commit 1e91521d94cb506aac9bad4af1578d0d82a4d57f.
closes #1597
---
diff --git a/galette/config/behavior.inc.php.dist b/galette/config/behavior.inc.php.dist
index 2c59ae479..f05ea1938 100644
--- a/galette/config/behavior.inc.php.dist
+++ b/galette/config/behavior.inc.php.dist
@@ -7,9 +7,9 @@
*
* PHP version 5
*
- * Copyright © 2017-2021 The Galette Team
+ * Copyright © 2017 The Galette Team
*
- * This file is part of Galette (https://galette.eu).
+ * This file is part of Galette (http://galette.eu).
*
* Galette is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,10 +28,9 @@
* @package Galette
*
* @author Johan Cwiklinski
-
- * @copyright 2017-2021 The Galette Team
+ * @copyright 2017 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
- * @link https://galette.eu
+ * @link http://galette.eu
*/
//change this *ONLY* for debug purposes!
@@ -53,9 +52,3 @@
* a single reverse proxy
*/
//define('GALETTE_X_FORWARDED_FOR_INDEX', 1);
-
-/*
- * Uncomment to enable the installer page even if galette is already installed and up to date
- * @see https://bugs.galette.eu/issues/1574
- */
-//define('FORCE_INSTALLER', true);
diff --git a/galette/includes/galette.inc.php b/galette/includes/galette.inc.php
index 0d5cce854..99ba5f206 100644
--- a/galette/includes/galette.inc.php
+++ b/galette/includes/galette.inc.php
@@ -68,8 +68,6 @@ $installed = file_exists(GALETTE_CONFIG_PATH . 'config.inc.php');
if (!$installed && !$installer) {
header('location: ./installer.php');
die();
-} else if ($installed) {
- include_once GALETTE_CONFIG_PATH . 'config.inc.php';
}
if (
@@ -79,6 +77,11 @@ if (
include_once GALETTE_CONFIG_PATH . 'behavior.inc.php';
}
+if (isset($installer) && $installer !== true) {
+ //If we're not working from installer
+ include_once GALETTE_CONFIG_PATH . 'config.inc.php';
+}
+
use Analog\Analog;
use Analog\Handler;
use Analog\Handler\LevelName;
@@ -181,8 +184,9 @@ Analog::handler($galette_run_log);
require_once GALETTE_ROOT . 'includes/functions.inc.php';
-//If we're not working from tests
-if ($installed && !defined('GALETTE_TESTS')) {
+if (!$installer and !defined('GALETTE_TESTS')) {
+ //If we're not working from installer nor from tests
+ include_once GALETTE_CONFIG_PATH . 'config.inc.php';
/**
* Database instantiation
diff --git a/galette/install/steps/end.php b/galette/install/steps/end.php
index 11515bc1d..125edd688 100644
--- a/galette/install/steps/end.php
+++ b/galette/install/steps/end.php
@@ -48,6 +48,7 @@ if ($install->isUpgrade()) {
echo _T("Galette has been successfully updated!");
}
?>
+