2011-06-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* 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
This commit is contained in:
juanmanuelr 2011-06-10 10:19:04 +00:00
parent 063b347da9
commit ce22ae8f59
3 changed files with 44 additions and 14 deletions

View File

@ -1,3 +1,11 @@
2011-06-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 <juanmanuel.ramon@artica.es>
* include/functions_tags.php

View File

@ -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();

View File

@ -0,0 +1,33 @@
<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/* Function that includes all graph dependencies */
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');
}
?>