2013-05-23 Miguel de Dios <miguel.dedios@artica.es>

* godmode/reporting/reporting_builder.item_editor.php: fixed ACL for
	the custom graphs.
	
	Fixes: #2233

MERGED FROM THE BRANCH 4




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8196 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-05-23 12:32:36 +00:00
parent 101acf9496
commit b8c07fda76
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2013-05-23 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.item_editor.php: fixed ACL for
the custom graphs.
Fixes: #2233
MERGED FROM THE BRANCH 4
2013-05-23 Miguel de Dios <miguel.dedios@artica.es> 2013-05-23 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/alerts_status.functions.php, * operation/agentes/alerts_status.functions.php,

View File

@ -13,6 +13,8 @@
// GNU General Public License for more details. // GNU General Public License for more details.
global $config; global $config;
require_once ('include/functions_custom_graphs.php');
// Login check // Login check
check_login (); check_login ();
@ -834,16 +836,14 @@ html_print_input_hidden('id_item', $idItem);
html_print_select($graphs, 'id_custom_graph', $value_selected, 'change_custom_graph();', __('None'), 0); html_print_select($graphs, 'id_custom_graph', $value_selected, 'change_custom_graph();', __('None'), 0);
} }
else { else {
switch ($config["dbtype"]) { $list_custom_graphs = custom_graphs_get_user ($config['id_user'], false, true, "IR");
case "mysql":
$query_sql = 'SELECT id_graph, name FROM tgraph WHERE private = 0 OR (private = 1 AND id_user = "'.$config["id_user"].'")'; $graphs = array();
break; foreach ($list_custom_graphs as $custom_graph) {
case "postgresql": $graphs[$custom_graph['id_graph']] = $custom_graph['name'];
case "oracle":
$query_sql = 'SELECT id_graph, name FROM tgraph WHERE private = 0 OR (private = 1 AND id_user = \''.$config["id_user"].'\')';
break;
} }
html_print_select_from_sql($query_sql, 'id_custom_graph', $idCustomGraph, 'change_custom_graph();', __('None'), 0); html_print_select($graphs, 'id_custom_graph',
$idCustomGraph, 'change_custom_graph();', __('None'), 0);
} }
$style_button_create_custom_graph = 'style="display: none;"'; $style_button_create_custom_graph = 'style="display: none;"';