From 41e6b7ffd476b43d394c8354379fe2fab7f9c7ce Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Fri, 10 Jun 2011 10:19:04 +0000 Subject: [PATCH] 2011-06-10 Juan Manuel Ramon * include/config_process.php: Graph's dependencies now are included by calling a new file with require_once sentence in order to avoid duplicate function declaration problem. * include/include_graph_dependencies.php: All graph's dependencies in this file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4427 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 +++++ pandora_console/include/config_process.php | 17 ++-------- .../include/include_graph_dependencies.php | 33 +++++++++++++++++++ 3 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 pandora_console/include/include_graph_dependencies.php diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0d9b660900..5395d7a9d6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-06-10 Juan Manuel Ramon + + * include/config_process.php: Graph's dependencies now are included + by calling a new file with require_once sentence in order to avoid + duplicate function declaration problem. + * include/include_graph_dependencies.php: All graph's dependencies + in this file. + 2011-06-09 Juan Manuel Ramon * include/functions_tags.php diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3e9be02bd4..139c3dc8f4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -153,20 +153,9 @@ if (isset($config['history_db_enabled'])) { // Make dbconnection the default connection again (the link identifier of the already opened link will be returned) db_connect(); -function include_graphs_dependencies($home_url = '', $serialize_ttl = 1) { - global $ttl; - global $homeurl; - - $ttl = $serialize_ttl; - $homeurl = $home_url; - - include_once($homeurl . 'include/functions.php'); - include_once($homeurl . 'include/functions_html.php'); - - include_once($homeurl . 'include/graphs/functions_fsgraph.php'); - include_once($homeurl . 'include/graphs/functions_gd.php'); - include_once($homeurl . 'include/graphs/functions_utils.php'); -} +// Function include_graphs_dependencies() it's called in the code below +require_once("include_graph_dependencies.php"); + //require_once("include/fgraph.php"); include_graphs_dependencies(); diff --git a/pandora_console/include/include_graph_dependencies.php b/pandora_console/include/include_graph_dependencies.php new file mode 100644 index 0000000000..1ba35a2538 --- /dev/null +++ b/pandora_console/include/include_graph_dependencies.php @@ -0,0 +1,33 @@ +