From d895be2015eef64a7a611129a1d21986a4eae0e9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 8 Oct 2018 12:47:50 +0200 Subject: [PATCH] fix PHP Warning: Use of undefined constant EGW_APP_INC --- api/src/Egw.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/api/src/Egw.php b/api/src/Egw.php index b9c8f4f403..5c52f126f2 100644 --- a/api/src/Egw.php +++ b/api/src/Egw.php @@ -276,16 +276,19 @@ class Egw extends Egw\Base } } - // Load the (depricated) app include files if they exists - if (EGW_APP_INC != "" && ! preg_match ('/phpgwapi/i', EGW_APP_INC) && - file_exists(EGW_APP_INC . '/functions.inc.php') && !isset($_GET['menuaction'])) + if (defined('EGW_APP_INC')) { - include(EGW_APP_INC . '/functions.inc.php'); - } - if (!@$GLOBALS['egw_info']['flags']['noheader'] && !@$GLOBALS['egw_info']['flags']['noappheader'] && - file_exists(EGW_APP_INC . '/header.inc.php') && !isset($_GET['menuaction'])) - { - include(EGW_APP_INC . '/header.inc.php'); + // Load the (depricated) app include files if they exists + if (EGW_APP_INC != "" && ! preg_match ('/phpgwapi/i', EGW_APP_INC) && + file_exists(EGW_APP_INC . '/functions.inc.php') && !isset($_GET['menuaction'])) + { + include(EGW_APP_INC . '/functions.inc.php'); + } + if (!@$GLOBALS['egw_info']['flags']['noheader'] && !@$GLOBALS['egw_info']['flags']['noappheader'] && + file_exists(EGW_APP_INC . '/header.inc.php') && !isset($_GET['menuaction'])) + { + include(EGW_APP_INC . '/header.inc.php'); + } } }