- user web: enable the "merge computers by name" feature.

I added this on 30 May 07 but accidentally left
    "if ($userid==0)" around it.

svn path=/trunk/boinc/; revision=13945
This commit is contained in:
David Anderson 2007-10-24 17:35:28 +00:00
parent a122425261
commit 05542a460f
3 changed files with 22 additions and 15 deletions

View File

@ -9829,3 +9829,12 @@ Frank Thomas 24 Oct 2007
clientgui/
ProjectProcessingPage.cpp
David 24 Oct 2007
- user web: enable the "merge computers by name" feature.
I added this on 30 May 07 but accidentally left
"if ($userid==0)" around it.
html/user/
merge_by_name.php
hosts_user.php

View File

@ -85,8 +85,9 @@ if ($userid) {
error_page("No such user");
}
$caching=true;
// At this point, we know that (1) $userid, $show_all and $sort all have
// At this point, we know that $userid, $show_all and $sort all have
// valid values.
//
$cache_args="userid=$userid&show_all=$show_all&sort=$sort";
start_cache(USER_PAGE_TTL, $cache_args);
if ($user->show_hosts) {
@ -128,14 +129,14 @@ while ($host = mysql_fetch_object($result)) {
mysql_free_result($result);
echo "</table>\n";
if ($old_hosts>0) more_or_less($show_all);
if ($userid == 0) {
echo "
<a href=merge_by_name.php>Merge hosts by name</a>
";
if ($old_hosts>0) {
more_or_less($show_all);
}
echo "
<a href=merge_by_name.php>Merge hosts by name</a>
";
if ($caching) {
page_tail(true);
end_cache(USER_PAGE_TTL, $cache_args);

View File

@ -22,7 +22,7 @@ function merge_name($list) {
}
$error = merge_hosts($host, $newest_host);
if (!$error) {
echo "<b>merged $host->id into $newest_host->id\n";
echo "<br>Merged $host->id into $newest_host->id\n";
} else {
echo "<br>$error\n";
}
@ -54,17 +54,14 @@ if ($_GET['confirmed']) {
} else {
$tokens = url_tokens($user->authenticator);
echo "
This operation will merge all of your computers
that have the same domain name.
This operation merges computers based on their domain name.
<p>
For each name, it will merge all older computers
For each domain name, it will merge all older computers
having that name with the newest computer having that name.
Incompatible computers will not be merged.
<p>
Click <a href=merge_by_name.php?confirmed=1&$tokens>here</a>
if you're sure you want to do this.
<p>Click <a href=hosts_user.php>here</a>
to return to the list of your computers.
<a href=merge_by_name.php?confirmed=1&$tokens>Go ahead and do this</a>.
<p><a href=hosts_user.php>Return to the list of computers</a>.
";
}
page_tail();