- lib: fix typo

svn path=/trunk/boinc/; revision=15903
This commit is contained in:
David Anderson 2008-08-20 16:49:37 +00:00
parent 7f039209b7
commit a5f80bc2e6
6 changed files with 50 additions and 9 deletions

View File

@ -6862,3 +6862,9 @@ Charlie 20 Aug 2008
WizardAttachProject.cpp
common/
wxFlatNotebook.cpp
David 20 Aug 2008
- lib: fix typo
lib/
filesys.C

View File

@ -35,6 +35,7 @@ create table bossa_job_inst (
app_id integer not null,
job_id integer not null,
user_id integer not null,
batch_id integer not null,
finish_time integer not null,
timeout integer not null,
calibration tinyint not null,

View File

@ -257,10 +257,14 @@ class BossaJobInst {
}
$now = time();
$clause = "(create_time, app_id, job_id, user_id, calibration) values ($now, $app->id, $job->id, $user->id, $job->calibration)";
$clause = "(create_time, app_id, job_id, user_id, batch_id, calibration) values ($now, $app->id, $job->id, $user->id, $job->batch_id, $job->calibration)";
$id = BossaJobInst::insert($clause);
return BossaJobInst::lookup_id($id);
}
function delete_aux($clause) {
$db = BossaDb::get();
return $db->delete_aux('bossa_job_inst', $clause);
}
// app-callable functions
//

View File

@ -56,7 +56,7 @@ function job_show($job, $inst, $user) {
echo "
<span class=link>
<a href=\"javascript: void(0)\">
<img border=0 align = left src=images/info_icon.png>
<img border=0 align = left src=example4_images/info_icon.png>
<span>
$f->type $c
</span>
@ -64,7 +64,7 @@ function job_show($job, $inst, $user) {
</span>
";
echo "
<a href=bossa_example4.php?bji=$inst->id&action=delete&index=$i><img border=0 align=right src=images/close_button.jpg></a>
<a href=bossa_example4.php?bji=$inst->id&action=delete&index=$i><img border=0 align=right src=example4_images/close_button.jpg></a>
</span>
";
$i++;

View File

@ -201,7 +201,7 @@ function show_batches($app_id) {
table_header("ID", "Name", "Calibration?", "Created", "Jobs", "Completed");
foreach ($batches as $batch) {
table_row(
"$batch->id <a href=bossa_admin.php?action=show_batch&batch_id=$batch->id>(show jobs)</a>",
"$batch->id | <a href=bossa_admin.php?action=show_batch&batch_id=$batch->id>show jobs</a> | <a href=bossa_admin.php?action=clear_batch_confirm&batch_id=$batch->id>delete instances</a>",
"$batch->name",
$batch->calibration?"yes":"no",
time_str($batch->create_time),
@ -257,6 +257,28 @@ function show_user() {
page_tail();
}
function clear_batch_confirm($batch_id) {
page_head("Confirm delete instances");
echo "
This will permanently delete all results from this batch.
<p>
Are you sure you want to do this?
<p>
<a href=bossa_admin.php?action=clear_batch&batch_id=$batch_id>Yes</a>
";
page_tail();
}
function clear_batch($batch_id) {
page_head("Deleting instances");
if (BossaJobInst::delete_aux("batch_id=$batch_id")) {
echo "Job instances deleted.";
} else {
echo "Database error.";
}
page_tail();
}
$user = get_logged_in_user();
$db = BossaDb::get();
@ -320,15 +342,15 @@ case 'show_user':
show_user();
exit;
case 'show_batches':
$app_id = $_GET['app_id'];
$app_id = get_int('app_id');
show_batches($app_id);
exit;
case 'show_batch':
$batch_id = $_GET['batch_id'];
$batch_id = get_int('batch_id');
show_batch($batch_id);
exit;
case 'job_show_insts':
$job_id = $_GET['job_id'];
$job_id = get_int('job_id');
job_show_insts($job_id);
exit;
case 'hide':
@ -343,6 +365,14 @@ case 'unhide':
if (!$app) error_page("no such app");
$app->update("hidden=0");
break;
case 'clear_batch_confirm':
$batch_id = get_int('batch_id');
clear_batch_confirm($batch_id);
exit;
case 'clear_batch':
$batch_id = get_int('batch_id');
clear_batch($batch_id);
exit;
case '':
show_all();
exit;

View File

@ -494,11 +494,11 @@ int boinc_copy(const char* orig, const char* newf) {
#elif defined(__EMX__)
char cmd[1024];
sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
return system(cmd_esc);
return system(cmd);
#else
char cmd[1024], cmd_esc[1024];
sprintf(cmd, "cp \"%s\" \"%s\"", orig, newf);
return system(cmd_esc);
return system(cmd);
#endif
}