]> git.agnieray.net Git - galette.git/blobdiff - galette/includes/galette.inc.php
Bump version
[galette.git] / galette / includes / galette.inc.php
index 90053532ccbadae5946288b00f42b57bd331a48f..a31bf6b2467456373374af2b90411363e4cc7f8d 100644 (file)
@@ -68,6 +68,8 @@ $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 (
@@ -77,11 +79,6 @@ 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;
@@ -100,7 +97,7 @@ if (
 }
 
 define('GALETTE_NIGHTLY', false);
-define('GALETTE_VERSION', 'v0.9.5');
+define('GALETTE_VERSION', 'v0.9.5.2');
 
 //Version to display
 if (!defined('GALETTE_HIDE_VERSION')) {
@@ -110,7 +107,7 @@ if (!defined('GALETTE_HIDE_VERSION')) {
 define('GALETTE_COMPAT_VERSION', '0.9.5');
 define('GALETTE_DB_VERSION', '0.950');
 if (!defined('GALETTE_MODE')) {
-    define('GALETTE_MODE', 'PROD'); //DEV, PROD, MAINT or DEMO
+    define('GALETTE_MODE', \Galette\Core\Galette::MODE_PROD);
 }
 
 if (!isset($_COOKIE['show_galette_dashboard'])) {
@@ -125,13 +122,13 @@ if (!isset($_COOKIE['show_galette_dashboard'])) {
 }
 
 if (!defined('GALETTE_DISPLAY_ERRORS')) {
-    if (GALETTE_MODE === 'DEV') {
+    if (GALETTE_MODE === \Galette\Core\Galette::MODE_DEV) {
         define('GALETTE_DISPLAY_ERRORS', 1);
     } else {
         define('GALETTE_DISPLAY_ERRORS', 0);
     }
 }
-ini_set('display_errors', 0);
+ini_set('display_errors', (defined('GALETTE_TESTS') ? '1' : '0'));
 
 /*------------------------------------------------------------------------------
 Logger stuff
@@ -184,12 +181,11 @@ Analog::handler($galette_run_log);
 
 require_once GALETTE_ROOT . 'includes/functions.inc.php';
 
-if (!$installer and !defined('GALETTE_TESTS')) {
-    //If we're not working from installer nor from tests
-    include_once GALETTE_CONFIG_PATH . 'config.inc.php';
+//If we're not working from tests
+if ($installed && !defined('GALETTE_TESTS')) {
 
     /**
-     * Database instanciation
+     * Database instantiation
      */
     $zdb = new Core\Db();
 
@@ -227,5 +223,5 @@ if (!$installer and !defined('GALETTE_TESTS')) {
 }
 
 $plugins = new Galette\Core\Plugins();
-//make sure plugins autoload is caleld before session start
+//make sure plugins autoload is called before session start
 $plugins->autoload(GALETTE_PLUGINS_PATH);