From 12f7c6e04e0cd365ec39cf85022cb5686b3f349a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 8 Aug 2011 06:12:17 +0000 Subject: [PATCH] - web: when sending emails to other users, don't translate anything (since they don't necessarily speak our language) svn path=/trunk/boinc/; revision=23948 --- checkin_notes | 11 +++++++ html/inc/pm.inc | 2 +- html/inc/submit.inc | 70 ++++++++++++++++++++++++++------------------- html/ops/index.php | 1 + 4 files changed, 53 insertions(+), 31 deletions(-) diff --git a/checkin_notes b/checkin_notes index 9de5ec82e8..dce7726577 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4712,3 +4712,14 @@ David 7 Aug 2011 html/user/ submit_example.php submit.php + +David 7 Aug 2011 + - web: when sending emails to other users, don't translate anything + (since they don't necessarily speak our language) + + html/ + ops/ + index.php + inc/ + pm.inc + submit.inc diff --git a/html/inc/pm.inc b/html/inc/pm.inc index c699a2d306..50fc57d033 100644 --- a/html/inc/pm.inc +++ b/html/inc/pm.inc @@ -112,7 +112,7 @@ To change email preferences, visit: ".URL_BASE."edit_forum_preferences_form.php Do not reply to this message. " ; - send_email($to_user, "[".PROJECT."] ".tra("- private message"), $message); + send_email($to_user, "[".PROJECT."] - private message", $message); } function pm_email_line($notify) { diff --git a/html/inc/submit.inc b/html/inc/submit.inc index ffc644000c..d171102811 100644 --- a/html/inc/submit.inc +++ b/html/inc/submit.inc @@ -16,7 +16,17 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . -// remote job submission API +// Remote job submission API. +// Functions: +// boinc_estimate_batch(); esimate completion time of a batch of jobs +// boinc_submit_batch(): submit a batch +// boinc_query_batches(): get list of batches +// boinc_query_batch(): get detaills of a batch +// boinc_query_job(): get details of a job +// boinc_abort_batch(): abort a batch +// boinc_get_output_file(): get the URL for an output file +// boinc_get_output_files(): get the URL for zipped batch output +// boinc_retire_batch(): retire a batch; delete output files //// Implementation stuff follows @@ -79,7 +89,35 @@ function do_batch_op($req, $op) { return do_http_op($req->project, $xml); } -//// Interface functions follow +function batch_xml_to_object($batch) { + $b = null; + $b->id = (int)($batch->id); + $b->create_time = (double)($batch->create_time); + $b->est_completion_time = (double)($batch->est_completion_time); + $b->njobs = (int)($batch->njobs); + $b->fraction_done = (double) $batch->fraction_done; + $b->nerror_jobs = (int)($batch->nerror_jobs); + $b->state = (int)($batch->state); + $b->completion_time = (double)($batch->completion_time); + $b->credit_estimate = (double)($batch->credit_estimate); + $b->credit_canonical = (double)($batch->credit_canonical); + $b->name = (string)($batch->name); + $b->app_name = (string)($batch->app_name); + return $b; +} + +function batch_state_string($state) { + switch ($state) { + case BATCH_STATE_INIT: return "new"; + case BATCH_STATE_IN_PROGRESS: return "in progress"; + case BATCH_STATE_COMPLETE: return "completed"; + case BATCH_STATE_ABORTED: return "aborted"; + case BATCH_STATE_RETIRED: return "retired"; + } + return "unknown state $state"; +} + +//// API functions follow function boinc_estimate_batch($req) { list($reply, $errmsg) = do_batch_op($req, "estimate_batch"); @@ -107,23 +145,6 @@ function boinc_submit_batch($req) { } } -function batch_xml_to_object($batch) { - $b = null; - $b->id = (int)($batch->id); - $b->create_time = (double)($batch->create_time); - $b->est_completion_time = (double)($batch->est_completion_time); - $b->njobs = (int)($batch->njobs); - $b->fraction_done = (double) $batch->fraction_done; - $b->nerror_jobs = (int)($batch->nerror_jobs); - $b->state = (int)($batch->state); - $b->completion_time = (double)($batch->completion_time); - $b->credit_estimate = (double)($batch->credit_estimate); - $b->credit_canonical = (double)($batch->credit_canonical); - $b->name = (string)($batch->name); - $b->app_name = (string)($batch->app_name); - return $b; -} - function boinc_query_batches($req) { $req_xml = " $req->authenticator @@ -229,17 +250,6 @@ function boinc_retire_batch($req) { return null; } -function batch_state_string($state) { - switch ($state) { - case BATCH_STATE_INIT: return "new"; - case BATCH_STATE_IN_PROGRESS: return "in progress"; - case BATCH_STATE_COMPLETE: return "completed"; - case BATCH_STATE_ABORTED: return "aborted"; - case BATCH_STATE_RETIRED: return "retired"; - } - return "unknown state $state"; -} - //// example usage follows $req->project = "http://isaac.ssl.berkeley.edu/test/"; diff --git a/html/ops/index.php b/html/ops/index.php index 66cdfecd91..8e05fa4731 100644 --- a/html/ops/index.php +++ b/html/ops/index.php @@ -151,6 +151,7 @@ echo "