check_logfiles: 3.7.5.1
[omd.git] / packages / nagvis / global.php.patch
blob429d7802e45efb7a7887bedaa8e8b7ca1406d4c1
1 --- nagvis-1.7-nightly/share/server/core/defines/global.php.orig 2012-12-16 11:56:58.912708241 +0100
2 +++ nagvis-1.7-nightly/share/server/core/defines/global.php 2012-12-16 11:57:59.041006400 +0100
3 @@ -38,14 +38,22 @@
4 else
5 error_reporting(E_ALL);
7 +$_path_parts = explode('/', dirname($_SERVER["SCRIPT_FILENAME"]));
8 +if($_path_parts[count($_path_parts) - 6] == 'local') // handle OMD local/ hierarchy
9 + $_base_dir = join(array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, -6), '/');
10 +else
11 + $_base_dir = join(array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, -5), '/');
13 /**
14 * Set the search path for included files
16 set_include_path(
17 get_include_path()
18 - .PATH_SEPARATOR.'../../server/core/classes'
19 - .PATH_SEPARATOR.'../../server/core/classes/objects'
20 - .PATH_SEPARATOR.'../../server/core/ext/php-gettext-1.0.12'
21 + .PATH_SEPARATOR.$_base_dir.'/local/share/nagvis/htdocs/server/core/classes'
22 + .PATH_SEPARATOR.$_base_dir.'/local/share/nagvis/htdocs/server/core/classes/objects'
23 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/classes'
24 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/classes/objects'
25 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/ext/php-gettext-1.0.12'
28 // Enable/Disable profiling of NagVis using xhprof. To make use of this the
29 @@ -64,7 +73,7 @@
30 define('DEBUGLEVEL', 6);
32 // Path to the debug file
33 -define('DEBUGFILE', '../../../var/nagvis-debug.log');
34 +define('DEBUGFILE', $_base_dir.'/tmp/nagvis/nagvis-debug.log');
36 // It is possible to define a conf.d directory for splitting the main
37 // configuration in several files. Only the values defined in the CONST_MAINCFG
38 @@ -78,14 +87,14 @@
39 // The last value wins.
41 // Path to the main configuration file
42 -define('CONST_MAINCFG', '../../../etc/nagvis.ini.php');
43 -define('CONST_MAINCFG_CACHE', '../../../var/nagvis-conf');
44 +define('CONST_MAINCFG', $_base_dir.'/etc/nagvis/nagvis.ini.php');
45 +define('CONST_MAINCFG_CACHE', $_base_dir.'/tmp/nagvis/nagvis-conf');
47 // Path to the main configuration conf.d directory
48 -define('CONST_MAINCFG_DIR', '../../../etc/conf.d');
49 +define('CONST_MAINCFG_DIR', $_base_dir.'/etc/nagvis/conf.d');
51 // The directory below the NagVis root which is shared by the webserver
52 -define('HTDOCS_DIR', 'share');
53 +define('HTDOCS_DIR', 'htdocs');
55 // Needed minimal PHP version
56 define('CONST_NEEDED_PHP_VERSION', '5.0');