From 3e8db325d9fa32392ea1cfe8cffd5190758d1d5d Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 2 Jun 2010 16:56:38 +0000 Subject: [PATCH] 2010-06-02 Sergio Martin * include/auth/ldap.php include/fgraph.php godmode/reporting/graph_builder.php: Changed the deprecated function split() by explode() function for bug: 2989970 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2849 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/godmode/reporting/graph_builder.php | 10 +++++----- pandora_console/include/auth/ldap.php | 4 ++-- pandora_console/include/fgraph.php | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e8b22f2922..6c60bbafa4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-06-02 Sergio Martin + + * include/auth/ldap.php + include/fgraph.php + godmode/reporting/graph_builder.php: Changed the deprecated + function split() by explode() function for bug: 2989970 + 2010-06-02 Miguel de Dios * godmode/agentes/module_manager_editor_plugin.php: fixed, now show the diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index 71c3810b51..7b771c86b1 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -149,7 +149,7 @@ if (isset ($_GET["delete_module"] )) { $chunkdata = $_POST["chunk"]; if (isset($chunkdata)) { $chunk1 = array(); - $chunk1 = split ("\|", $chunkdata); + $chunk1 = explode ("\|", $chunkdata); $modules="";$weights=""; for ($a = 0; $a < count ($chunk1); $a++) { if (isset ($_POST["delete_$a"])) { @@ -163,7 +163,7 @@ if (isset ($_GET["delete_module"] )) { $agent_array = array (); for ($a = 0; $a < count ($chunk1); $a++) { $chunk2[$a] = array(); - $chunk2[$a] = split (",", $chunk1[$a]); + $chunk2[$a] = explode (",", $chunk1[$a]); $skip_module =0; for ($b = 0; $b < count ($deleted_id); $b++) { if ($deleted_id[$b] == $chunk2[$a][1]) { @@ -250,11 +250,11 @@ if (! isset($_GET["delete_module"])) { $weight_array = array(); $agent_array = array(); $chunk1 = array(); - $chunk1 = split ("\|", $chunkdata); + $chunk1 = explode ("\|", $chunkdata); $modules="";$weights=""; for ($a=0; $a < count($chunk1); $a++){ $chunk2[$a] = array(); - $chunk2[$a] = split ( ",", $chunk1[$a]); + $chunk2[$a] = explode ( ",", $chunk1[$a]); if (strpos($modules, $chunk2[$a][1]) == 0){ // Skip dupes $module_array[] = $chunk2[$a][1]; $agent_array[] = $chunk2[$a][0]; @@ -375,7 +375,7 @@ if (($render == 1) && (isset($modules))) { echo ""; echo "
"; if ($config['flash_charts']) { - echo graphic_combined_module (split (',', $modules), split (',', $weights), $period, $width, $height, + echo graphic_combined_module (explode (',', $modules), explode (',', $weights), $period, $width, $height, 'Combined%20Sample%20Graph', '', $events, 0, 0, $stacked); } else { echo ""; diff --git a/pandora_console/include/auth/ldap.php b/pandora_console/include/auth/ldap.php index c1ef01bd1a..e774053f65 100644 --- a/pandora_console/include/auth/ldap.php +++ b/pandora_console/include/auth/ldap.php @@ -518,8 +518,8 @@ function get_users ($order = false) { * @return string userid */ function stripdn ($dn) { - list ($uid, $trash) = split (',', $dn, 2); - list ($trash, $user) = split ('=', $uid); + list ($uid, $trash) = explode (',', $dn, 2); + list ($trash, $user) = explode ('=', $uid); return ($user); } diff --git a/pandora_console/include/fgraph.php b/pandora_console/include/fgraph.php index 0871d781c9..6b56b73c05 100644 --- a/pandora_console/include/fgraph.php +++ b/pandora_console/include/fgraph.php @@ -2440,9 +2440,9 @@ if ($graphic_type) { case "combined": // Split id to get all parameters $module_list = array(); - $module_list = split (",", $id); + $module_list = explode (",", $id); $weight_list = array(); - $weight_list = split (",", $weight_l); + $weight_list = explode (",", $weight_l); graphic_combined_module ($module_list, $weight_list, $period, $width, $height, $label, $unit_name, $draw_events, $draw_alerts, $pure, $stacked, $date);