mirror of https://github.com/BOINC/boinc.git
web: in "all projects" certificate, show message if no projects
... rather than a certificate with PHP warnings at the top
This commit is contained in:
parent
03b2e00990
commit
7d68422e94
|
@ -78,6 +78,7 @@ function get_other_projects($user) {
|
|||
//
|
||||
$remote = @json_decode(json_encode((array)$xml_object))->project;
|
||||
if (!$remote) {
|
||||
$user->projects = null;
|
||||
return $user;
|
||||
}
|
||||
if (count($remote) == 1) {
|
||||
|
|
|
@ -38,6 +38,11 @@ if ($border=="no") {
|
|||
$font = "\"Optima,Lucida Bright,Times New Roman\"";
|
||||
|
||||
$user = get_other_projects($user);
|
||||
|
||||
if (!$user->projects) {
|
||||
error_page("No accounts found");
|
||||
}
|
||||
|
||||
$total_credit = 0;
|
||||
foreach ($user->projects as $p) {
|
||||
$total_credit += $p->total_credit;
|
||||
|
|
Loading…
Reference in New Issue