- server: fix messed-up app version stats export

svn path=/trunk/boinc/; revision=21105
This commit is contained in:
David Anderson 2010-04-05 20:57:28 +00:00
parent 2536797068
commit 78cd631687
2 changed files with 17 additions and 31 deletions

View File

@ -2373,13 +2373,13 @@ Rom 1 Apr 2010
AdvancedFrame.cpp
David 1 Apr 2010
- manager: fixed one last (hopefully) instance of == applied to
a char[] formerly std::string
- manager: fixed one last (hopefully) instance of == applied to
a char[] formerly std::string
clientgui/
AsyncRPC.cpp
sg_ProjectComponents.cpp
ViewStatisticts.cpp
clientgui/
AsyncRPC.cpp
sg_ProjectComponents.cpp
ViewStatisticts.cpp
David 1 Apr 2010
- scheduler: choose cuda_fermi over other cuda plan classes
@ -2396,10 +2396,10 @@ David 1 Apr 2010
credit.cpp
David 1 Apr 2010
- manager: change text for notice-frequency slider
- manager: change text for notice-frequency slider
clientgui/
DlgOptions.cpp
clientgui/
DlgOptions.cpp
David 2 Apr 2010
- backend programs: change the way PFC and elapsed-time statistics
@ -2511,3 +2511,9 @@ David 5 Apr 2010
sched/
credit.cpp,h
validator.cpp
David 5 Apr 2010
- server: fix messed-up app version stats export
html/user/
app_versions.php

View File

@ -21,36 +21,16 @@
require_once("../inc/boinc_db.inc");
require_once("../inc/xml.inc");
function prune($avs) {
$out = array();
foreach($avs as $av) {
$found = false;
foreach ($out as $av2) {
if ($av->appid == $av2->appid
&& $av->plan_class == $av2->plan_class
&& $av->version_num > $av2->version_num
) {
$found = true;
break;
}
}
if (!$found) {
$out[] = $av;
}
}
return $out;
}
BoincDb::get(true);
xml_header();
echo "<app_versions>\n";
$app_versions = BoincAppVersion::enum("deprecated=0");
$app_versions = prune($app_versions);
$app_versions = BoincAppVersion::enum("deprecated=0 and pfc_n>0");
foreach ($app_versions as $av) {
$platform = BoincPlatform::lookup_id($av->platformid);
$app = BoincApp::lookup_id($av->appid);
echo "
<app_version>
<id>$av->id</id>
<create_time>$av->create_time</create_time>
<platform>$platform->name</platform>
<app_name>$app->name</app_name>