2011-07-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_html.php: Fixed function print_select_groups()
	to retrieve subgroups with parent distinct than "group All". 
	
	Fixes: #3365845
		
	* godmode/agentes/modificar_agente.php: Fixed call to 
	print_select_groups() to check user ACLs.
	
	* ChangeLog: fixed date of my last commit.
	
	* general/logoff.php: Changed logout splash screen.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-07-13 16:39:35 +00:00
parent 35f2313a26
commit 35c7fef732
4 changed files with 28 additions and 5 deletions

View File

@ -1,4 +1,18 @@
2011-07-12 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
2011-07-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_html.php: Fixed function print_select_groups()
to retrieve subgroups with parent distinct than "group All".
Fixes: #3365845
* godmode/agentes/modificar_agente.php: Fixed call to
print_select_groups() to check user ACLs.
* ChangeLog: fixed date of my last commit.
* general/logoff.php: Changed logout splash screen.
2011-07-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php: Truncate agent name when is large in
graphs legends and add missed ttl variable.

View File

@ -19,7 +19,7 @@
<br>
<h1 id="log"><?php echo __('Logged out'); ?></h1>
<br>
<div class="databox" style="width: 400px; margin: 0 auto auto;">
<div style="width: 400px; margin: 0 auto auto;">
<table cellpadding="4" cellspacing="1" width="400">
<tr><td align="left">
<?php

View File

@ -86,8 +86,12 @@ else {
echo "<table cellpadding='4' cellspacing='4' class='databox' width='98%'><tr>";
echo "<td valign='top'>".__('Group')."</td>";
echo "<td valign='top'>";
html_print_select_groups(false, "AR", true, "ag_group", $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false, 'width:100px;');
$own_info = get_user_info($config['id_user']);
if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "PM"))
$return_all_group = false;
else
$return_all_group = true;
html_print_select_groups(false, "AR", $return_all_group, "ag_group", $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false, 'width:100px;');
echo "<td valign='top'>
<noscript>
@ -461,6 +465,7 @@ $(document).ready (function () {
$("#ag_group").click (
function () {
$(this).css ("width", "auto");
$(this).css ("min-width", "100px");
});
/* $("#ag_group").hover (

View File

@ -193,7 +193,11 @@ function html_print_select_groups($id_user = false, $privilege = "AR", $returnAl
unset($user_groups[$id_group]);
}
$user_groups_tree = groups_get_groups_tree_recursive($user_groups);
// First group it's needed to retrieve its parent group
$first_group = array_slice($user_groups, 0, 1);
$parent_group = $first_group[0]['parent'];
$user_groups_tree = groups_get_groups_tree_recursive($user_groups, $parent_group);
$fields = array();
foreach ($user_groups_tree as $group) {