From 7b7fc44b4691bc97b10a18661a1df71d4736cd52 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 22 Aug 2015 09:24:46 +0200 Subject: [PATCH 1/2] Fix: disable hook for avoid errors when object langs is disable --- htdocs/core/ajax/box.php | 1 + htdocs/core/ajax/security.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index 2d14a319a80..63f96a0c513 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -27,6 +27,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; diff --git a/htdocs/core/ajax/security.php b/htdocs/core/ajax/security.php index 5bdd45c75d4..6fe4dc6017f 100644 --- a/htdocs/core/ajax/security.php +++ b/htdocs/core/ajax/security.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2015 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); require '../../main.inc.php'; From feed3f714c3e36be3b4001c6af1fe05a11b1d030 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Aug 2015 11:17:11 +0200 Subject: [PATCH 2/2] Fix to avoid warning --- htdocs/core/modules/syslog/mod_syslog_chromephp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/syslog/mod_syslog_chromephp.php b/htdocs/core/modules/syslog/mod_syslog_chromephp.php index d46b0734469..cd2ea512850 100644 --- a/htdocs/core/modules/syslog/mod_syslog_chromephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_chromephp.php @@ -55,7 +55,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface set_include_path($conf->global->SYSLOG_CHROMEPHP_INCLUDEPATH); //print 'rrrrr'.get_include_path(); - $res = include_once('ChromePhp.php'); + $res = @include_once('ChromePhp.php'); if (! $res) $res=@include_once('ChromePhp.class.php'); restore_include_path();