}
function show_users_list ($users, $filter='') {
+ if (!count($users)) {
+ return;
+ }
+
echo '<p>' ._('Key') .':
<span class="active">'._('Active'). '</span>
<span class="deleted">' ._('Deleted') .'</span>
//we don't always want the default Any row shown
if ($show_any) {
$return .= '
- <option value=""'.(($checked_val=='') ? ' selected="selected"' : '').'>'. $text_any .'</option>';
+ <option value=""'.(($checked_val=='') ? ' selected="selected"' : '').'>'. util_html_secure($text_any) .'</option>';
}
//we don't always want the default 100 row shown
if ($show_100) {
$return .= '
- <option value="100"'.(($checked_val==100) ? ' selected="selected"' : '').'>'. $text_100 .'</option>';
+ <option value="100"'.(($checked_val==100) ? ' selected="selected"' : '').'>'. util_html_secure($text_100) .'</option>';
}
$checked_found=false;
// if it was shown above, otherwise do show it
if (($vals[$i] != '100') || ($vals[$i] == '100' && !$show_100)) {
$return .= '
- <option value="'.$vals[$i].'"';
+ <option value="'.util_html_secure($vals[$i]).'"';
if ((string)$vals[$i] == (string)$checked_val) {
$checked_found=true;
$return .= ' selected="selected"';
if (is_array($allowed) && !in_array($vals[$i], $allowed)) {
$return .= ' disabled="disabled" class="option_disabled"';
}
- $return .= '>'./*htmlspecialchars(*/$texts[$i]/*)*/.'</option>';
+ $return .= '>'.util_html_secure($texts[$i]).'</option>';
}
}
//
//
if (!$checked_found && $checked_val != 'xzxz' && $checked_val && $checked_val != 100) {
$return .= '
- <option value="'.$checked_val.'" selected="selected">'._('No Change').'</option>';
+ <option value="'.util_html_secure($checked_val).'" selected="selected">'._('No Change').'</option>';
}
$return .= '
* Copyright 2004 (c) GForge LLC
* Copyright 2010, Roland Mas
* Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright © 2011
+ * Thorsten Glaser <t.glaser@tarent.de>
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
echo '<p><strong>'._('Role Name').'</strong></p>' ;
echo $role->getDisplayableName ($group) ;
} else {
- echo '<p><strong>'._('Role Name').'</strong><br /><input type="text" name="role_name" value="'.$role->getName().'"><br />' ;
+ echo '<p><strong>'._('Role Name').'</strong><br /><input type="text" name="role_name" value="'.$role->getName().'" /><br />' ;
echo '<input type="checkbox" name="public" value="1"' ;
if ($role->isPublic()) {
- echo ' checked' ;
+ echo ' checked="checked"' ;
}
- echo '> '._('Shared role (can be referenced by other projects)').'</p>' ;
+ echo ' /> '._('Shared role (can be referenced by other projects)').'</p>' ;
}
} else {
if ($role_id != 'observer') {
sortRoleList ($roles) ;
- echo '<tr '. $HTML->boxGetAltRowStyle($i) . '>' ;
$seen = false ;
foreach ($roles as $role) {
+ echo '<tr '. $HTML->boxGetAltRowStyle($i) . '>' ;
if (!$seen) {
echo '<td style="white-space: nowrap;" rowspan="'.(count($roles)+1).'">
<a href="/users/'.$user->getUnixName().'">';