diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 63f5d0822a..6687a0bd02 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,16 @@ +2010-05-06 Miguel de Dios + + * include/config.inc.php: fixed the operation require when the php file to + call config.php have a file with same name of "config_process.php" ...in + rare cases. + + * include/config_process.php: fixed the operation require when the php file + to call config.php have a file with same name of "functions.php", + "functions_db.php", "functions_config.php" ...in rare cases. + + * include/functions.php, include/functions_config.php: cleaned the source + code. + 2010-05-05 Miguel de Dios * godmode/reporting/map_builder.php: added the height and width to save in diff --git a/pandora_console/include/config.inc.php b/pandora_console/include/config.inc.php index 5156893d9f..87c573073b 100644 --- a/pandora_console/include/config.inc.php +++ b/pandora_console/include/config.inc.php @@ -113,5 +113,6 @@ error_reporting(E_ALL); // This MUST be writtable by http server user, and should be in pandora root. // By default, Pandora adds /attachment to this, so by default is the pandora console home dir -include ("config_process.php"); +$ownDir = dirname(__FILE__) . '/'; +include ($ownDir . "config_process.php"); ?> diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a96128ad1f..f0de96ae59 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -59,15 +59,17 @@ if (! $config['dbconnection']) { exit; } +$ownDir = dirname(__FILE__) . '/'; + mysql_select_db ($config["dbname"]); -require_once ('functions.php'); -require_once ('functions_db.php'); -require_once ('functions_config.php'); +require_once ($ownDir . 'functions.php'); +require_once ($ownDir . 'functions_db.php'); +require_once ($ownDir. 'functions_config.php'); process_config (); -require_once ('streams.php'); -require_once ('gettext.php'); +require_once ($ownDir . 'streams.php'); +require_once ($ownDir . 'gettext.php'); $config["remote_addr"] = $_SERVER['REMOTE_ADDR']; $config['user_language'] = $config["language"]; @@ -107,7 +109,7 @@ if (! defined ('EXTENSIONS_DIR')) if (! defined ('ENTERPRISE_DIR')) define ('ENTERPRISE_DIR', 'enterprise'); -require_once ('functions_extensions.php'); +require_once ($ownDir . 'functions_extensions.php'); $config['extensions'] = get_extensions (); diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 4bab35cabc..5a321e7eee 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1,6 +1,4 @@ diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 3aab53a723..3683c4fe3c 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1,5 +1,4 @@