Completed
Push — master ( 3d1160...c03764 )
by Kevin
12:33
created
html/user/submit_rpc_handler.php 1 patch
Doc Comments   +28 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@  discard block
 block discarded – undo
30 30
 ini_set('display_errors', true);
31 31
 ini_set('display_startup_errors', true);
32 32
 
33
+/**
34
+ * @param string $name
35
+ */
33 36
 function get_wu($name) {
34 37
     $name = BoincDb::escape_string($name);
35 38
     $wu = BoincWorkunit::lookup("name='$name'");
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
     return $wu;
38 41
 }
39 42
 
43
+/**
44
+ * @param string $name
45
+ */
40 46
 function get_submit_app($name) {
41 47
     $name = BoincDb::escape_string($name);
42 48
     $app = BoincApp::lookup("name='$name'");
@@ -76,6 +82,9 @@  discard block
 block discarded – undo
76 82
     return $y;
77 83
 }
78 84
 
85
+/**
86
+ * @param SimpleXMLElement|null $template
87
+ */
79 88
 function est_elapsed_time($r, $template) {
80 89
     // crude estimate: batch FLOPs / project FLOPS
81 90
     //
@@ -131,6 +140,9 @@  discard block
 block discarded – undo
131 140
 // The arg is the batch-level template, if any.
132 141
 // Jobs may have their own templates.
133 142
 //
143
+/**
144
+ * @param SimpleXMLElement $template
145
+ */
134 146
 function validate_batch($jobs, $template) {
135 147
     $i = 0;
136 148
     $n = count($template->file_info);
@@ -200,6 +212,13 @@  discard block
 block discarded – undo
200 212
 
201 213
 // submit a list of jobs with a single create_work command.
202 214
 //
215
+/**
216
+ * @param stdClass $job_params
217
+ * @param double $priority
218
+ * @param integer $app_version_num
219
+ * @param string $input_template_filename
220
+ * @param string $output_template_filename
221
+ */
203 222
 function submit_jobs(
204 223
     $jobs, $job_params, $app, $batch_id, $priority, $app_version_num,
205 224
     $input_template_filename,        // batch-level; can also specify per job
@@ -294,6 +313,9 @@  discard block
 block discarded – undo
294 313
 // Check whether the template is already in our map.
295 314
 // If not, write it to a temp file.
296 315
 //
316
+/**
317
+ * @param stdClass $job
318
+ */
297 319
 function make_input_template($job) {
298 320
     global $input_templates;
299 321
     if (!array_key_exists($job->input_template_xml, $input_templates)) {
@@ -310,6 +332,9 @@  discard block
 block discarded – undo
310 332
 // A little different because these have to exist for life of job.
311 333
 // Store them in templates/tmp/, with content-based filenames
312 334
 //
335
+/**
336
+ * @param stdClass $job
337
+ */
313 338
 function make_output_template($job) {
314 339
     global $output_templates;
315 340
     if (!array_key_exists($job->output_template_xml, $output_templates)) {
@@ -508,6 +533,9 @@  discard block
 block discarded – undo
508 533
     ";
509 534
 }
510 535
 
536
+/**
537
+ * @param integer $get_cpu_time
538
+ */
511 539
 function print_batch_params($batch, $get_cpu_time) {
512 540
     $app = BoincApp::lookup_id($batch->app_id);
513 541
     if (!$app) $app->name = "none";
Please login to merge, or discard this patch.