mirror of https://github.com/BOINC/boinc.git
Merge branch 'BOINC:master' into master
This commit is contained in:
commit
1e77e57b89
|
@ -366,7 +366,7 @@ function form_input_textarea($label, $name, $value='', $nrows=4) {
|
|||
|
||||
// $items is either a string of <option> elements, or an array
|
||||
//
|
||||
function form_select($label, $name, $items) {
|
||||
function form_select($label, $name, $items, $selected=null) {
|
||||
echo sprintf('
|
||||
<div class="form-group">
|
||||
<label align=right class="%s" for="%s">%s</label>
|
||||
|
@ -377,8 +377,11 @@ function form_select($label, $name, $items) {
|
|||
);
|
||||
if (is_array($items)) {
|
||||
foreach ($items as $i) {
|
||||
echo '<option value="'.$i[0].'">'.$i[1].'</option>
|
||||
';
|
||||
echo sprintf(
|
||||
'<option %s value=%s>%s</option>',
|
||||
($i[0]==$selected)?'selected':'',
|
||||
$i[0], $i[1]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
echo $items;
|
||||
|
@ -387,9 +390,9 @@ function form_select($label, $name, $items) {
|
|||
}
|
||||
|
||||
// same, for multiple select.
|
||||
// flags, if non-null, says which ones are selected
|
||||
// $selected, if non-null, is a list of selected values
|
||||
//
|
||||
function form_select_multiple($label, $name, $items, $flags=null) {
|
||||
function form_select_multiple($label, $name, $items, $selected=null) {
|
||||
echo sprintf('
|
||||
<div class="form-group">
|
||||
<label align=right class="%s" for="%s">%s</label>
|
||||
|
@ -398,12 +401,12 @@ function form_select_multiple($label, $name, $items, $flags=null) {
|
|||
',
|
||||
FORM_LEFT_CLASS, $name, $label, FORM_RIGHT_CLASS, $name, $name
|
||||
);
|
||||
$n = 0;
|
||||
foreach ($items as $i) {
|
||||
$s = ($flags && $flags[$n])?'selected':'';
|
||||
echo '<option '.$s.' value="'.$i[0].'">'.$i[1].'</option>
|
||||
';
|
||||
$n++;
|
||||
echo sprintf(
|
||||
'<option %s value=%s>%s</option>',
|
||||
($selected && in_array($i[0], $selected))?'selected':'',
|
||||
$i[0], $i[1]
|
||||
);
|
||||
}
|
||||
echo "</select></div></div>\n";
|
||||
}
|
||||
|
|
|
@ -188,13 +188,15 @@ function display_team_page($team, $user) {
|
|||
if (count($team->new_members)) {
|
||||
$first = true;
|
||||
$x = "";
|
||||
foreach ($team->new_members as $a) {
|
||||
foreach ($team->new_members as $id) {
|
||||
$u = BoincUser::lookup_id($id);
|
||||
if (!$u) continue;
|
||||
if ($first) {
|
||||
$first = false;
|
||||
} else {
|
||||
$x .= " · ";
|
||||
}
|
||||
$x .= user_links($a, BADGE_HEIGHT_MEDIUM);
|
||||
$x .= user_links($u, BADGE_HEIGHT_MEDIUM);
|
||||
}
|
||||
}
|
||||
row2(tra('New members in last day'), $x);
|
||||
|
@ -354,7 +356,7 @@ function new_member_list($teamid) {
|
|||
foreach ($deltas as $delta) {
|
||||
$u = BoincUser::lookup_id($delta->userid);
|
||||
if ($u->teamid == $teamid) {
|
||||
$new_members[] = $u; // they might have later quit
|
||||
$new_members[] = $u->id; // they might have later quit
|
||||
}
|
||||
}
|
||||
return array_unique($new_members);
|
||||
|
|
|
@ -354,9 +354,9 @@ int VBOX_VM::create_vm() {
|
|||
vboxlog_msg("Disabling Audio Support for VM.");
|
||||
command = "modifyvm \"" + vm_name + "\" ";
|
||||
if (is_virtualbox_version_newer(7, 0, 4)) {
|
||||
command += "--audio-enabled off";
|
||||
command += "--audio-enabled off ";
|
||||
} else {
|
||||
command += "--audio none";
|
||||
command += "--audio none ";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue