Module: nagvis Branch: master Commit: 5263b5cd7fcb4b2ac5a87da936147453dac80b0f URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=5263b5cd7fcb4b2ac5a87da936147453dac80b0f
Author: Roman Kyrylych <[email protected]> Date: Tue Aug 25 19:29:43 2009 +0300 gmap: Introduced INCLUDE_PATH Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/NagVisService.php | 14 +++++++------- share/netmap/NagiosService.php | 15 ++++++++------- share/netmap/SettingsService.php | 15 +++++++-------- share/netmap/amf-server.php | 4 +++- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/share/netmap/NagVisService.php b/share/netmap/NagVisService.php index 7c6b725..18b20c3 100644 --- a/share/netmap/NagVisService.php +++ b/share/netmap/NagVisService.php @@ -27,14 +27,14 @@ class NagVisService private function init() { - require_once("../nagvis/includes/defines/global.php"); - require_once("../nagvis/includes/defines/matches.php"); + require_once(INCLUDE_PATH . 'defines/global.php'); + require_once(INCLUDE_PATH . 'defines/matches.php'); set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__)) - . PATH_SEPARATOR . '../nagvis/includes/classes/' - . PATH_SEPARATOR . '../nagvis/includes/classes/validator/' - . PATH_SEPARATOR . '../nagvis/includes/classes/frontend/'); - require_once("../nagvis/includes/functions/oldPhpVersionFixes.php"); - require_once("../nagvis/includes/functions/getuser.php"); + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/validator/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/frontend/'); + require_once(INCLUDE_PATH . 'functions/oldPhpVersionFixes.php'); + require_once(INCLUDE_PATH . 'functions/getuser.php'); $this->CORE = new GlobalCore(); $this->CORE->MAINCFG->setRuntimeValue('user', getUser()); diff --git a/share/netmap/NagiosService.php b/share/netmap/NagiosService.php index c2f721c..1d83c94 100644 --- a/share/netmap/NagiosService.php +++ b/share/netmap/NagiosService.php @@ -29,14 +29,15 @@ class NagiosService public function __construct() { - require_once("../nagvis/includes/defines/global.php"); - require_once("../nagvis/includes/defines/matches.php"); + require_once(INCLUDE_PATH . 'defines/global.php'); + require_once(INCLUDE_PATH . 'defines/matches.php'); set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__)) - . PATH_SEPARATOR . '../nagvis/includes/classes/' - . PATH_SEPARATOR . '../nagvis/includes/classes/validator/' - . PATH_SEPARATOR . '../nagvis/includes/classes/frontend/'); - require_once("../nagvis/includes/functions/oldPhpVersionFixes.php"); - require_once("../nagvis/includes/functions/getuser.php"); + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/validator/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/frontend/'); + require_once(INCLUDE_PATH . 'functions/oldPhpVersionFixes.php'); + require_once(INCLUDE_PATH . 'functions/getuser.php'); + $this->CORE = new GlobalCore(); $this->CORE->MAINCFG->setRuntimeValue('user', getUser()); diff --git a/share/netmap/SettingsService.php b/share/netmap/SettingsService.php index 27f6d4b..48f6bb9 100644 --- a/share/netmap/SettingsService.php +++ b/share/netmap/SettingsService.php @@ -35,15 +35,14 @@ class SettingsService */ public function load() { - require_once("../nagvis/includes/defines/global.php"); - require_once("../nagvis/includes/defines/matches.php"); + require_once(INCLUDE_PATH . 'defines/global.php'); + require_once(INCLUDE_PATH . 'defines/matches.php'); set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__)) - . PATH_SEPARATOR . '../nagvis/includes/classes/' - . PATH_SEPARATOR . '../nagvis/includes/classes/' - . PATH_SEPARATOR . '../nagvis/includes/classes/validator/' - . PATH_SEPARATOR . '../nagvis/includes/classes/frontend/'); - require_once("../nagvis/includes/functions/oldPhpVersionFixes.php"); - require_once("../nagvis/includes/functions/getuser.php"); + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/validator/' + . PATH_SEPARATOR . INCLUDE_PATH . 'classes/frontend/'); + require_once(INCLUDE_PATH . 'functions/oldPhpVersionFixes.php'); + require_once(INCLUDE_PATH . 'functions/getuser.php'); $CORE = new GlobalCore(); $CORE->MAINCFG->setRuntimeValue('user', getUser()); diff --git a/share/netmap/amf-server.php b/share/netmap/amf-server.php index e269606..3c5794c 100644 --- a/share/netmap/amf-server.php +++ b/share/netmap/amf-server.php @@ -39,7 +39,9 @@ class Custom_Zend_Amf_Server extends Zend_Amf_Server protected $_production = false; } -define('CONFIG_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../..') . '/etc/geomap/'); +define('NAGVIS_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../..') . '/'); +define('INCLUDE_PATH', NAGVIS_PATH . 'share/nagvis/includes/'); +define('CONFIG_PATH', NAGVIS_PATH . 'etc/geomap/'); $server = new Custom_Zend_Amf_Server(); $server->setClassMap("Settings", "Settings"); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
