Completed
Pull Request — master (#1844)
by Christian
09:38
created
drupal/sites/default/boinc/modules/contrib/wysiwyg/wysiwyg.module 1 patch
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -674,6 +674,7 @@  discard block
 block discarded – undo
674 674
 
675 675
 /**
676 676
  * Remove a profile from the database.
677
+ * @param stdClass $wysiwyg
677 678
  */
678 679
 function wysiwyg_profile_delete($wysiwyg) {
679 680
   if (!isset($wysiwyg->format)) {
@@ -922,7 +923,7 @@  discard block
 block discarded – undo
922 923
  *   Whether to prefix the resulting path with base_path().
923 924
  *
924 925
  * @return
925
- *   The path to the specified library.
926
+ string   The path to the specified library.
926 927
  *
927 928
  * @ingroup libraries
928 929
  */
@@ -1014,7 +1015,7 @@  discard block
 block discarded – undo
1014 1015
 /**
1015 1016
  * Return a list of directories by modules implementing wysiwyg_include_directory().
1016 1017
  *
1017
- * @param $plugintype
1018
+ * @param string $plugintype
1018 1019
  *   The type of a plugin; can be 'editors'.
1019 1020
  *
1020 1021
  * @return
@@ -1039,10 +1040,11 @@  discard block
 block discarded – undo
1039 1040
  *
1040 1041
  * @param $module
1041 1042
  *   The module that owns the hook.
1042
- * @param $identifier
1043
+ * @param string $identifier
1043 1044
  *   Either the module or 'wysiwyg_' . $file->name
1044
- * @param $hook
1045
+ * @param string $hook
1045 1046
  *   The name of the hook being invoked.
1047
+ * @param string $path
1046 1048
  */
1047 1049
 function _wysiwyg_process_include($module, $identifier, $path, $hook) {
1048 1050
   $function = $identifier . '_' . $hook;
Please login to merge, or discard this patch.
html/inc/account.inc 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -18,6 +18,10 @@  discard block
 block discarded – undo
18 18
 
19 19
 // forms for account creation and login
20 20
 
21
+/**
22
+ * @param integer $teamid
23
+ * @param string $next_url
24
+ */
21 25
 function create_account_form($teamid, $next_url) {
22 26
     global $recaptcha_public_key;
23 27
     echo "
@@ -92,6 +96,9 @@  discard block
 block discarded – undo
92 96
     echo "</form>\n";
93 97
 }
94 98
 
99
+/**
100
+ * @param string $next_url
101
+ */
95 102
 function login_form($next_url) {
96 103
     echo "
97 104
         <form name=\"f\" method=\"post\" action=\"".secure_url_base()."/login_action.php\">
Please login to merge, or discard this patch.
html/inc/akismet.inc 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
     }
53 53
 }
54 54
 
55
+/**
56
+ * @param string $path
57
+ */
55 58
 function akismet_request($request, $host, $path, $port = 80) {
56 59
     $http_request  = "POST $path HTTP/1.0\r\n";
57 60
     $http_request .= "Host: $host\r\n";
Please login to merge, or discard this patch.
html/inc/boinc_db.inc 1 patch
Doc Comments   +107 added lines patch added patch discarded remove patch
@@ -40,6 +40,10 @@  discard block
 block discarded – undo
40 40
     // 2: only use replica_db_user, only try replica_db_host
41 41
     // can be set projectwide using <replica_fallback_mode>
42 42
     //
43
+
44
+    /**
45
+     * @param boolean $readonly
46
+     */
43 47
     static function get_aux($readonly, $fallback_mode = 0) {
44 48
         $config = get_config();
45 49
         $user = parse_config($config, '<db_user>');
@@ -204,6 +208,10 @@  discard block
 block discarded – undo
204 208
         $db = BoincDb::get();
205 209
         return $db->count('user', $clause);
206 210
     }
211
+
212
+    /**
213
+     * @param string $field
214
+     */
207 215
     static function max($field) {
208 216
         $db = BoincDb::get();
209 217
         return $db->max('user', $field);
@@ -216,6 +224,10 @@  discard block
 block discarded – undo
216 224
         $db = BoincDb::get();
217 225
         return $db->enum('user', 'BoincUser', $where_clause, $order_clause);
218 226
     }
227
+
228
+    /**
229
+     * @param string $fields
230
+     */
219 231
     static function enum_fields($fields, $where_clause, $order_clause=null) {
220 232
         $db = BoincDb::get();
221 233
         return $db->enum_fields(
@@ -233,10 +245,19 @@  discard block
 block discarded – undo
233 245
         $db->delete_aux('profile', "userid=$this->id");
234 246
         return $db->delete($this, 'user');
235 247
     }
248
+
249
+    /**
250
+     * @param string $field
251
+     */
236 252
     static function sum($field) {
237 253
         $db = BoincDb::get();
238 254
         return $db->sum('user', $field);
239 255
     }
256
+
257
+    /**
258
+     * @param string $field
259
+     * @param string $clause
260
+     */
240 261
     static function percentile($field, $clause, $pct) {
241 262
         $db = BoincDb::get();
242 263
         return $db->percentile('user', $field, $clause, $pct);
@@ -245,6 +266,10 @@  discard block
 block discarded – undo
245 266
 
246 267
 class BoincTeam {
247 268
     static $cache;
269
+
270
+    /**
271
+     * @param string $clause
272
+     */
248 273
     static function insert($clause) {
249 274
         $db = BoincDb::get();
250 275
         $ret = $db->insert('team', $clause);
@@ -282,14 +307,27 @@  discard block
 block discarded – undo
282 307
         $db = BoincDb::get();
283 308
         return $db->delete($this, 'team');
284 309
     }
310
+
311
+    /**
312
+     * @param string $field
313
+     * @param string $clause
314
+     */
285 315
     static function percentile($field, $clause, $pct) {
286 316
         $db = BoincDb::get();
287 317
         return $db->percentile('team', $field, $clause, $pct);
288 318
     }
319
+
320
+    /**
321
+     * @param string $field
322
+     */
289 323
     static function max($field) {
290 324
         $db = BoincDb::get();
291 325
         return $db->max('team', $field);
292 326
     }
327
+
328
+    /**
329
+     * @param string $fields
330
+     */
293 331
     static function enum_fields($fields, $where_clause, $order_clause=null) {
294 332
         $db = BoincDb::get();
295 333
         return $db->enum_fields(
@@ -326,6 +364,12 @@  discard block
 block discarded – undo
326 364
         $db = BoincDb::get();
327 365
         return $db->enum('host', 'BoincHost', $where_clause, $order_clause);
328 366
     }
367
+
368
+    /**
369
+     * @param string $fields
370
+     * @param string $where_clause
371
+     * @param string $order_clause
372
+     */
329 373
     static function enum_fields($fields, $where_clause, $order_clause=null) {
330 374
         $db = BoincDb::get();
331 375
         return $db->enum_fields(
@@ -358,6 +402,10 @@  discard block
 block discarded – undo
358 402
         $db = BoincDb::get();
359 403
         return $db->enum('result', 'BoincResult', $where_clause);
360 404
     }
405
+
406
+	/**
407
+	 * @param string $fields
408
+	 */
361 409
 	static function enum_fields($fields, $where_clause, $order_clause) {
362 410
         $db = BoincDb::get();
363 411
 		return $db->enum_fields('result', 'BoincResult', $fields, $where_clause, $order_clause);
@@ -412,6 +460,10 @@  discard block
 block discarded – undo
412 460
         $db = BoincDb::get();
413 461
         return $db->update_aux('workunit', $clause);
414 462
     }
463
+
464
+    /**
465
+     * @param string $clause
466
+     */
415 467
     static function count($clause) {
416 468
         $db = BoincDb::get();
417 469
         return $db->count('workunit', $clause);
@@ -427,6 +479,10 @@  discard block
 block discarded – undo
427 479
         $db = BoincDb::get();
428 480
         return $db->lookup('app', 'BoincApp', $clause);
429 481
     }
482
+
483
+    /**
484
+     * @param string $where_clause
485
+     */
430 486
     static function enum($where_clause) {
431 487
         $db = BoincDb::get();
432 488
         return $db->enum('app', 'BoincApp', $where_clause);
@@ -441,6 +497,11 @@  discard block
 block discarded – undo
441 497
         $db = BoincDb::get();
442 498
         return $db->update($this, 'app', $clause);
443 499
     }
500
+
501
+    /**
502
+     * @param string $field
503
+     * @param string $clause
504
+     */
444 505
     static function sum($field, $clause=null) {
445 506
         $db = BoincDb::get();
446 507
         return $db->sum('app', $field, $clause);
@@ -473,6 +534,10 @@  discard block
 block discarded – undo
473 534
 }
474 535
 
475 536
 class BoincProfile {
537
+
538
+    /**
539
+     * @param string $fields
540
+     */
476 541
     static function lookup_fields($fields, $clause) {
477 542
         $db = BoincDb::get();
478 543
         return $db->lookup_fields('profile', 'BoincProfile', $fields, $clause);
@@ -489,18 +554,37 @@  discard block
 block discarded – undo
489 554
         $db = BoincDb::get();
490 555
         return $db->update_aux('profile', $clause.' where userid='.$this->userid);
491 556
     }
557
+
558
+    /**
559
+     * @param string $clause
560
+     */
492 561
     static function update_aux($clause) {
493 562
         $db = BoincDb::get();
494 563
         return $db->update_aux('profile', $clause);
495 564
     }
565
+
566
+    /**
567
+     * @param string $clause
568
+     */
496 569
     static function insert($clause) {
497 570
         $db = BoincDb::get();
498 571
         return $db->insert('profile', $clause);
499 572
     }
573
+
574
+    /**
575
+     * @param string $where_clause
576
+     * @param string $order_clause
577
+     */
500 578
     static function enum($where_clause=null, $order_clause=null) {
501 579
         $db = BoincDb::get();
502 580
         return $db->enum('profile', 'BoincProfile', $where_clause, $order_clause);
503 581
     }
582
+
583
+    /**
584
+     * @param string $fields
585
+     * @param string $where_clause
586
+     * @param string $order_clause
587
+     */
504 588
     static function enum_fields($fields, $where_clause=null, $order_clause=null) {
505 589
         $db = BoincDb::get();
506 590
         return $db->enum_fields('profile', 'BoincProfile', $fields, $where_clause, $order_clause);
@@ -568,6 +652,10 @@  discard block
 block discarded – undo
568 652
 }
569 653
 
570 654
 class BoincPlatform {
655
+
656
+    /**
657
+     * @param string $where_clause
658
+     */
571 659
     static function enum($where_clause) {
572 660
         $db = BoincDb::get();
573 661
         return $db->enum('platform', 'BoincPlatform', $where_clause);
@@ -648,6 +736,10 @@  discard block
 block discarded – undo
648 736
 }
649 737
 
650 738
 class BoincBadge {
739
+
740
+    /**
741
+     * @param string $where_clause
742
+     */
651 743
     static function enum($where_clause) {
652 744
         $db = BoincDb::get();
653 745
         return $db->enum('badge', 'BoincBadge', $where_clause);
@@ -743,6 +835,11 @@  discard block
 block discarded – undo
743 835
         $db = BoincDb::get();
744 836
         return $db->enum('credit_user', 'BoincCreditUser', $where_clause);
745 837
     }
838
+
839
+    /**
840
+     * @param string $field
841
+     * @param string $clause
842
+     */
746 843
     static function sum($field, $clause) {
747 844
         $db = BoincDb::get();
748 845
         return $db->sum('credit_user', $field, $clause);
@@ -766,6 +863,11 @@  discard block
 block discarded – undo
766 863
         $db = BoincDb::get();
767 864
         return $db->enum('credit_team', 'BoincCreditTeam', $where_clause);
768 865
     }
866
+
867
+    /**
868
+     * @param string $field
869
+     * @param string $clause
870
+     */
769 871
     static function sum($field, $clause) {
770 872
         $db = BoincDb::get();
771 873
         return $db->sum('credit_team', $field, $clause);
@@ -780,6 +882,11 @@  discard block
 block discarded – undo
780 882
 // 
781 883
 // apply this to any user-supplied strings used in queries
782 884
 // 
885
+/**
886
+ * @param string $x
887
+ *
888
+ * @return string
889
+ */
783 890
 function boinc_real_escape_string($x) {
784 891
     if (version_compare(phpversion(),"4.3.0")>=0) {
785 892
         return BoincDb::escape_string($x);
Please login to merge, or discard this patch.
html/inc/bolt.inc 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -246,6 +246,9 @@  discard block
 block discarded – undo
246 246
 
247 247
 }
248 248
 
249
+/**
250
+ * @param string $n
251
+ */
249 252
 function name($n) {
250 253
     return array('name', $n);
251 254
 }
@@ -254,10 +257,16 @@  discard block
 block discarded – undo
254 257
     return array('title', $n);
255 258
 }
256 259
 
260
+/**
261
+ * @param integer $n
262
+ */
257 263
 function number($n) {
258 264
     return array('number', $n);
259 265
 }
260 266
 
267
+/**
268
+ * @param string $n
269
+ */
261 270
 function filename($n) {
262 271
     return array('filename', $n);
263 272
 }
Please login to merge, or discard this patch.
html/inc/bolt_ex.inc 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -240,6 +240,10 @@  discard block
 block discarded – undo
240 240
 
241 241
 class BoltFitbField {
242 242
     public $textarea, $nrows, $ncols;
243
+
244
+    /**
245
+     * @param boolean $textarea
246
+     */
243 247
     function __construct($textarea, $nrows, $ncols) {
244 248
         $this->textarea = $textarea;
245 249
         $this->nrows = $nrows;
@@ -258,6 +262,10 @@  discard block
 block discarded – undo
258 262
 class BoltFitbAnswer {
259 263
     public $type;   // 0=constant, 1=regexp, 2=func
260 264
     public $ans;
265
+
266
+    /**
267
+     * @param integer $type
268
+     */
261 269
     function __construct($type, $ans) {
262 270
         $this->type = $type;
263 271
         $this->ans = $ans;
Please login to merge, or discard this patch.
html/inc/bolt_select.inc 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
     }
53 53
 }
54 54
 
55
+/**
56
+ * @param string $n
57
+ */
55 58
 function valuator($n) {
56 59
     return array('valuator', $n);
57 60
 }
Please login to merge, or discard this patch.
html/inc/bolt_snap.inc 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@  discard block
 block discarded – undo
45 45
     return "../bolt_snap/compare_snapshot_$x";
46 46
 }
47 47
 
48
+/**
49
+ * @param null|integer $dur
50
+ */
48 51
 function write_compare_snapshot($course_id, $select_name, $xset_name, $dur) {
49 52
     $now = time();
50 53
     $start = $now - $dur*86400;
@@ -127,6 +130,9 @@  discard block
 block discarded – undo
127 130
     return "../bolt_snap/map_snapshot_".$course_id;
128 131
 }
129 132
 
133
+/**
134
+ * @param null|integer $dur
135
+ */
130 136
 function write_map_snapshot($course_id, $dur) {
131 137
     $now = time();
132 138
     $start = $now - $dur*86400;
Please login to merge, or discard this patch.
html/inc/bolt_util_ops.inc 1 patch
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@  discard block
 block discarded – undo
23 23
 
24 24
 // get names of units of a given type
25 25
 
26
+/**
27
+ * @param string $type
28
+ */
26 29
 function units_of_type($unit, $type) {
27 30
     $names = array();
28 31
     if (get_class($unit) == $type) {
@@ -118,6 +121,10 @@  discard block
 block discarded – undo
118 121
 
119 122
 //////////// graph drawing
120 123
 
124
+/**
125
+ * @param integer $n
126
+ * @param integer $width
127
+ */
121 128
 function compare_bar($title, $n, $width, $lo, $hi) {
122 129
     $x1 = $width*$lo;
123 130
     $x2 = $width*($hi-$lo);
@@ -137,6 +144,9 @@  discard block
 block discarded – undo
137 144
     ";
138 145
 }
139 146
 
147
+/**
148
+ * @param integer $width
149
+ */
140 150
 function compare_bar_insuff($title, $width) {
141 151
     return "
142 152
         <tr>
@@ -150,6 +160,10 @@  discard block
 block discarded – undo
150 160
     ";
151 161
 }
152 162
 
163
+/**
164
+ * @param integer[] $x
165
+ * @param integer $width
166
+ */
153 167
 function outcome_graph($x, $width) {
154 168
     $n = $x[0]+$x[1]+$x[2];
155 169
     if (!$n) return empty_cell();
@@ -182,6 +196,9 @@  discard block
 block discarded – undo
182 196
     return $s;
183 197
 }
184 198
 
199
+/**
200
+ * @param integer $w
201
+ */
185 202
 function time_graph($t, $w) {
186 203
     if ($t == 0) return "<td>---</td>";
187 204
     $x = (log10($t)+2)*$w/4;
@@ -193,6 +210,10 @@  discard block
 block discarded – undo
193 210
     </td>";
194 211
 }
195 212
 
213
+/**
214
+ * @param integer $t
215
+ * @param integer $w
216
+ */
196 217
 function score_graph($t, $w) {
197 218
     if ($t == 0) return "<td>---</td>";
198 219
     $x = $t*$w;
Please login to merge, or discard this patch.