Completed
Pull Request — master (#2667)
by Christian
11:13
created
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.helpers.inc 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -26,6 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 /**
28 28
  * Get an image object from a given file and cck field
29
+ * @param string $field_name
30
+ * @param string $content_type
29 31
  */ 
30 32
 function get_cck_image_object($image_path, $field_name, $content_type, $ignore_resolution = FALSE) {
31 33
   $field = content_fields($field_name, $content_type); 
@@ -277,6 +279,7 @@  discard block
 block discarded – undo
277 279
 /**
278 280
  * Ignore certain paths. Returns true of path is in the
279 281
  * paths_to_ignore array of regular expressions patterns.
282
+ * @param string[] $paths_to_ignore
280 283
  */
281 284
 function _boincuser_ignore_paths($path, $paths_to_ignore) {
282 285
 
@@ -317,6 +320,7 @@  discard block
 block discarded – undo
317 320
 /**
318 321
  * Include BOINC code
319 322
  * The path from the BOINC html root must be included (e.g. user/file.php)
323
+ * @param string $file
320 324
  */
321 325
 function include_boinc($file) {
322 326
   if ($include_dir = boinc_get_path()) {
@@ -332,6 +336,7 @@  discard block
 block discarded – undo
332 336
 
333 337
 /**
334 338
  * Get the BOINC include path
339
+ * @return string
335 340
  */
336 341
 function boinc_get_path($type = 'root') {
337 342
   $dir = "boinc_{$type}_dir";
Please login to merge, or discard this patch.
html/project.sample/project.inc 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -116,6 +116,10 @@  discard block
 block discarded – undo
116 116
 // If you include any links, prepend URL with $prefix
117 117
 // if you need to open divs here close them in project_footer()
118 118
 //
119
+/**
120
+ * @param string $prefix
121
+ * @param boolean $is_main
122
+ */
119 123
 function project_banner($title, $prefix, $is_main) {
120 124
     if ($is_main) {
121 125
         echo '<img class="img-responsive" style="width:100%" src="img/water.jpg">';
@@ -127,6 +131,11 @@  discard block
 block discarded – undo
127 131
 }
128 132
 //$fixed_navbar = true;
129 133
 
134
+/**
135
+ * @param boolean $show_return
136
+ * @param boolean $show_date
137
+ * @param string $prefix
138
+ */
130 139
 function project_footer($show_return, $show_date, $prefix) {
131 140
     // If you include any links, prepend URL with $prefix
132 141
     //
Please login to merge, or discard this patch.
html/inc/token.inc 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -27,6 +27,10 @@  discard block
 block discarded – undo
27 27
 define("TOKEN_DURATION_ONE_DAY", 86400);
28 28
 define("TOKEN_DURATION_ONE_WEEK", 604800);
29 29
 
30
+/**
31
+ * @param string $type
32
+ * @param integer $duration
33
+ */
30 34
 function create_token($userid, $type, $duration) {
31 35
     $token = random_string();
32 36
     $now = time();
@@ -39,6 +43,9 @@  discard block
 block discarded – undo
39 43
     return $token;
40 44
 }
41 45
 
46
+/**
47
+ * @param string $type
48
+ */
42 49
 function delete_token($userid, $token, $type) {
43 50
     $token = BoincDb::escape_string($token);
44 51
     $type = BoincDb::escape_string($type);
@@ -46,6 +53,9 @@  discard block
 block discarded – undo
46 53
     return $result;
47 54
 }
48 55
 
56
+/**
57
+ * @param string $type
58
+ */
49 59
 function is_valid_token($userid, $token, $type) {
50 60
     $boincToken = BoincToken::lookup_valid_token($userid, $token, $type);
51 61
     if ( $boincToken == null ) {
Please login to merge, or discard this patch.
html/inc/forum.inc 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -224,6 +224,9 @@  discard block
 block discarded – undo
224 224
 // (to accommodate long [pre] lines)
225 225
 // and the left column (author info) has fixed size
226 226
 //
227
+/**
228
+ * @param string[] $headings
229
+ */
227 230
 function start_forum_table($headings) {
228 231
     $a = array();
229 232
     foreach ($headings as $h) {
@@ -504,6 +507,9 @@  discard block
 block discarded – undo
504 507
 // Display an individual post.
505 508
 // Generates a table row with two cells: author and message
506 509
 //
510
+/**
511
+ * @param integer $controls
512
+ */
507 513
 function show_post(
508 514
     $post, $thread, $forum, $logged_in_user, $start=0,
509 515
     $latest_viewed=0, $controls=FORUM_CONTROLS, $filter=true
@@ -879,6 +885,9 @@  discard block
 block discarded – undo
879 885
 // These take care of counts and timestamps.
880 886
 // Don't do these things directly - use these functions
881 887
 //
888
+/**
889
+ * @param integer $parent_id
890
+ */
882 891
 function create_post($content, $parent_id, $user, $forum, $thread, $signature) {
883 892
     global $forum_error;
884 893
     if (POST_MAX_LINKS
@@ -1133,6 +1142,9 @@  discard block
 block discarded – undo
1133 1142
 // $sort_style - string (checked by switch statement)
1134 1143
 // $show_hidden - bool (not directly passed to SQL)
1135 1144
 //
1145
+/**
1146
+ * @param boolean $show_hidden
1147
+ */
1136 1148
 function get_thread_posts($threadid, $sort_style, $show_hidden) {
1137 1149
     $sql = "thread=$threadid";
1138 1150
     if (!$show_hidden) {
@@ -1158,6 +1170,9 @@  discard block
 block discarded – undo
1158 1170
 // Show links for post moderation actions;
1159 1171
 // logged in user has moderation rights.
1160 1172
 //
1173
+/**
1174
+ * @param string $config
1175
+ */
1161 1176
 function show_post_moderation_links(
1162 1177
     $config, $logged_in_user, $post, $forum, $tokens
1163 1178
 ){
Please login to merge, or discard this patch.