mirror of https://github.com/BOINC/boinc.git
- web: don't cache hosts page, and make it more translatable
svn path=/trunk/boinc/; revision=21582
This commit is contained in:
parent
722610231d
commit
3cab0e3568
|
@ -3768,3 +3768,9 @@ David 18 May 2010
|
||||||
sched_send.cpp
|
sched_send.cpp
|
||||||
client/
|
client/
|
||||||
rr_sim.cpp
|
rr_sim.cpp
|
||||||
|
|
||||||
|
David 19 May 2010
|
||||||
|
- web: don't cache hosts page, and make it more translatable
|
||||||
|
|
||||||
|
html/user/
|
||||||
|
hosts_user.php
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
require_once("../inc/boinc_db.inc");
|
require_once("../inc/boinc_db.inc");
|
||||||
require_once("../inc/util.inc");
|
require_once("../inc/util.inc");
|
||||||
require_once("../inc/host.inc");
|
require_once("../inc/host.inc");
|
||||||
require_once("../inc/cache.inc");
|
|
||||||
|
|
||||||
$show_all = get_int("show_all", true);
|
$show_all = get_int("show_all", true);
|
||||||
if ($show_all != 1) {
|
if ($show_all != 1) {
|
||||||
|
@ -47,26 +46,18 @@ if ($userid) {
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
error_page("No such user");
|
error_page("No such user");
|
||||||
}
|
}
|
||||||
$caching = true;
|
|
||||||
|
|
||||||
// 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&rev=$rev";
|
|
||||||
start_cache(USER_PAGE_TTL, $cache_args);
|
|
||||||
if ($user->show_hosts) {
|
if ($user->show_hosts) {
|
||||||
page_head("Computers belonging to $user->name");
|
page_head(tra("Computers belonging to %1", $user->name));
|
||||||
} else {
|
} else {
|
||||||
page_head("Computers hidden");
|
page_head("Computers hidden");
|
||||||
echo "This user has chosen not to show information about their computers.\n";
|
echo tra("This user has chosen not to show information about their computers.");
|
||||||
page_tail();
|
page_tail();
|
||||||
end_cache(USER_PAGE_TTL, $cache_args);
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$private = false;
|
$private = false;
|
||||||
} else {
|
} else {
|
||||||
$user = get_logged_in_user();
|
$user = get_logged_in_user();
|
||||||
$caching = false;
|
|
||||||
$userid = $user->id;
|
$userid = $user->id;
|
||||||
page_head("Your computers");
|
page_head("Your computers");
|
||||||
$private = true;
|
$private = true;
|
||||||
|
@ -74,11 +65,6 @@ if ($userid) {
|
||||||
|
|
||||||
show_user_hosts($userid, $private, $show_all, $sort, $rev);
|
show_user_hosts($userid, $private, $show_all, $sort, $rev);
|
||||||
|
|
||||||
if ($caching) {
|
page_tail();
|
||||||
page_tail(true);
|
|
||||||
end_cache(USER_PAGE_TTL, $cache_args);
|
|
||||||
} else {
|
|
||||||
page_tail();
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue