[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/17: Move DEBUG and LOGINPUT to config.inc.
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/17: Move DEBUG and LOGINPUT to config.inc.php |
Date: |
Wed, 12 Aug 2015 13:23:41 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3f3a4aa90bbff5afb399800ebf8c6bb72b0993be
Author: Dany De Bontridder <address@hidden>
Date: Tue Aug 11 10:50:53 2015 +0200
Move DEBUG and LOGINPUT to config.inc.php
---
include/constant.php | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/constant.php b/include/constant.php
index 26f0fc4..df18dc9 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -22,8 +22,7 @@
* \brief Contains all the variable + the javascript
* and some parameter
*/
-require_once ('config.inc.php');
-require_once('constant.security.php');
+
// SVNVERSION
global $version_noalyss;
/*
@@ -31,11 +30,19 @@ global $version_noalyss;
*/
$inc_path=get_include_path();
$dirname=dirname(__FILE__);
+
/* Global variable of the include dir */
global $g_include_dir,$g_ext_dir;
$g_include_dir=$dirname;
$g_ext_dir = $dirname."/ext";
+if ( !defined("NOALYSS_HOME")) define
("NOALYSS_HOME",dirname($dirname)."/html");
+if ( !defined("NOALYSS_PLUGIN")) define ("NOALYSS_PLUGIN",$g_ext_dir);
+if ( !defined("NOALYSS_INCLUDE")) define ("NOALYSS_INCLUDE",$g_include_dir);
+
+require_once NOALYSS_INCLUDE.'/config.inc.php';
+require_once NOALYSS_INCLUDE.'/constant.security.php';
+
if ( strpos($inc_path,";") != 0 ) {
$new_path=$inc_path.';'.$dirname;
$os=0; /* $os is 0 for windoz */
@@ -74,8 +81,12 @@ define ('SMALLX','ⵝ');
define ('SVNINFO',6815);
-define ("DEBUG",false);
-define ("LOGINPUT",false);
+if ( ! defined ('DEBUG')) {
+ define ("DEBUG",false);
+}
+if ( ! defined ('LOGINPUT')) {
+ define ("LOGINPUT",false);
+}
$version_noalyss=SVNINFO;
@@ -112,8 +123,9 @@ if ( DEBUG ) {
ini_set('error_log','syslog');
}
else {
- error_reporting(15);
- ini_set("display_errors",1);
+ // Rapporte les erreurs d'exécution de script
+ error_reporting(E_ERROR | E_WARNING | E_PARSE);
+ ini_set("display_errors",0);
ini_set("html_errors",0);
ini_set('log_errors',1);
ini_set('error_log','syslog');
- [Noalyss-commit] [noalyss] branch master updated (0ee7d7a -> 1ddde7c), Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 03/17: Cosmetic, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 04/17: Cosmetic ; change appearance login screen, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 06/17: Move DEBUG and LOGINPUT to config.inc.php,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 02/17: Add variable to force the reload of CSS and javascript when version changes, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 09/17: Use a variable for an absolute path for performance reason NOALYSS_INCLUDE NOALYSS_HOME NOALYSS_PLUGIN, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 10/17: Use a variable for an absolute path for performance reason NOALYSS_INCLUDE NOALYSS_HOME NOALYSS_PLUGIN, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 12/17: show cross to remove a tag, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 13/17: Admin can modify any document + repository, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 07/17: Move DEBUG and LOGINPUT to config.inc.php, by default error are shown, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 14/17: Code cleaning : remove code for "Plugin only" users, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 01/17: Add variable to own, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 05/17: translation, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 16/17: highlight, Dany De Bontridder, 2015/08/12