Passed
Push — master ( 8ae81c...db94a5 )
by Kevin
11:44 queued 03:12
created
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module 2 patches
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -280,12 +280,12 @@  discard block
 block discarded – undo
280 280
   }
281 281
 
282 282
   switch ($op) {
283
-    case 'delete':
284
-      // Only call delete function on certain node types
285
-      if (in_array( $node->type, $node_types)) {
286
-        boinc_solr_comments_delete($node);
287
-      }
288
-      break;
283
+  case 'delete':
284
+    // Only call delete function on certain node types
285
+    if (in_array( $node->type, $node_types)) {
286
+      boinc_solr_comments_delete($node);
287
+    }
288
+    break;
289 289
   } //switch
290 290
 }
291 291
 
@@ -335,13 +335,13 @@  discard block
 block discarded – undo
335 335
  */
336 336
 function boinc_solr_comments_comment(&$a1, $op) {
337 337
   switch ($op) {
338
-    case 'view':
339
-    case 'update':
340
-      break;
341
-    case 'delete':
342
-      // $a1 should be a comment object
343
-      boinc_solr_comments_deletecomment($a1);
344
-      break;
338
+  case 'view':
339
+  case 'update':
340
+    break;
341
+  case 'delete':
342
+    // $a1 should be a comment object
343
+    boinc_solr_comments_deletecomment($a1);
344
+    break;
345 345
   }// switch
346 346
 }
347 347
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
   foreach ($documents as $document) {
79 79
     //dd($document, "index documents alter - document");
80 80
 
81
-    $to_process = ( array_key_exists($document->bundle, $node_types) AND $node_types[$document->bundle] );
82
-    if ( $document->entity_type=='node' AND $to_process) {
81
+    $to_process = (array_key_exists($document->bundle, $node_types) AND $node_types[$document->bundle]);
82
+    if ($document->entity_type == 'node' AND $to_process) {
83 83
       
84 84
       // Remove ts_comments if present.
85 85
       if (isset($document->ts_comments)) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $comment_document->bundle = 'Comment';
111 111
         $comment_document->bundle_name = 'Comment';
112 112
 
113
-        $comment_document->path = 'goto/comment/' . $comment->cid;
113
+        $comment_document->path = 'goto/comment/'.$comment->cid;
114 114
         $comment_document->url = url($comment_document->path, $url_options);
115 115
 
116 116
         // Comment object has no language
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         // Index formatted username so it can be searched and sorted
142 142
         // on.
143
-        $account = (object) array('uid' => $comment->uid, 'name' => $comment->name);
143
+        $account = (object)array('uid' => $comment->uid, 'name' => $comment->name);
144 144
         $username = check_plain($account->name);
145 145
         $comment_document->ss_name_formatted = $username;
146 146
         $comment_document->tos_name_formatted = $username;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
           // Copy over fields [im_taxonomy_vid_1], [tid], [im_vid_1],
186 186
           // [im_vid_Forums], [tm_vid_1_names]
187
-          if ( ( preg_match('/tid/', $fieldName) OR preg_match('/vid/', $fieldName) ) AND is_array($fieldValue) ) {
187
+          if ((preg_match('/tid/', $fieldName) OR preg_match('/vid/', $fieldName)) AND is_array($fieldValue)) {
188 188
             foreach ($fieldValue as $subkey => $subvalue) {
189 189
               $comment_document->addField($fieldName, $subvalue);
190 190
             }
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
  */
227 227
 function boinc_solr_comments_apachesolr_process_results(&$results, DrupalSolrQueryInterface $query) {
228 228
   //dpm($query->getSolrParams(), "process_results query getSolrParams");
229
-  foreach($results as $id => $result) {
230
-    if ($result['entity_type']=='comment') {
229
+  foreach ($results as $id => $result) {
230
+    if ($result['entity_type'] == 'comment') {
231 231
         $results[$id]['type'] = 'Comment';
232 232
         $results[$id]['date'] = $result['fields']['changed'];
233 233
         if (isset($result['fields']['is_uid'])) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
  */
253 253
 function boinc_solr_comments_apachesolr_query_alter($query) {
254 254
   // Add custom field to query results
255
-  $query->addParam('fl','tos_content_extra');
255
+  $query->addParam('fl', 'tos_content_extra');
256 256
 }
257 257
 
258 258
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
   switch ($op) {
283 283
     case 'delete':
284 284
       // Only call delete function on certain node types
285
-      if (in_array( $node->type, $node_types)) {
285
+      if (in_array($node->type, $node_types)) {
286 286
         boinc_solr_comments_delete($node);
287 287
       }
288 288
       break;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
   try {
315 315
     $solr = apachesolr_get_solr($env_id);
316 316
     // Custom query to find all comments with parent nid of the node bing deleted.
317
-    $query = "entity_type:comment AND tos_content_extra:" . $node->nid;
317
+    $query = "entity_type:comment AND tos_content_extra:".$node->nid;
318 318
     $solr->deleteByQuery($query);
319 319
     // Log the query used for deletion.
320 320
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
  */
400 400
 
401 401
 function boinc_solr_comments_enable() {
402
-  drupal_set_message( bts('Warning: Your content <a href="@url">must be re-indexed</a> before Apache Solr will search comments.', array('@url' => url('admin/settings/apachesolr/index')), NULL, 'boinc:admin-solr-index-comments-message'), 'warning');
402
+  drupal_set_message(bts('Warning: Your content <a href="@url">must be re-indexed</a> before Apache Solr will search comments.', array('@url' => url('admin/settings/apachesolr/index')), NULL, 'boinc:admin-solr-index-comments-message'), 'warning');
403 403
 }
404 404
 
405 405
 /** 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
  *   The comment to be published (unhidden).
411 411
  */
412 412
 function boinc_solr_comments_publish($comment) {
413
-  if ( ($comment->cid) AND ($comment->nid) ) {
413
+  if (($comment->cid) AND ($comment->nid)) {
414 414
     $node = node_load($comment->nid);
415 415
     // Tell Solr that the node has been updated, so the comment can be
416 416
     // indexed.
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
  *   The comment to be unpublished (hidden). 
427 427
  */
428 428
 function boinc_solr_comments_unpublish($comment) {
429
-  if ( ($comment->cid) ) {
429
+  if (($comment->cid)) {
430 430
     // Call the deletecomment function for hook comment.
431 431
     boinc_solr_comments_deletecomment($comment);
432 432
   }
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc 2 patches
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
   foreach (content_types() as $key => $info) {
20 20
     // Exclude node types profile, team, and panel
21 21
     switch ($key) {
22
-      case 'profile':
23
-      case 'team':
24
-      case 'panel':
25
-        continue 2;
22
+    case 'profile':
23
+    case 'team':
24
+    case 'panel':
25
+      continue 2;
26 26
     }// switch key
27 27
     $options[$key] = $info['name'];
28 28
   }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     'boinc_solr_comments_nodetypes' => variable_get('boinc_solr_comments_nodetypes', ''),
34 34
   );
35 35
   if (empty($default['boinc_solr_comments_nodetypes'])) {
36
-    $default['boinc_solr_comments_nodetypes'] = array('forum','team_forum','news','page','story');
36
+    $default['boinc_solr_comments_nodetypes'] = array('forum', 'team_forum', 'news', 'page', 'story');
37 37
   }
38 38
   
39 39
   // Define the form
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/boincteam.views.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,7 @@
 block discarded – undo
444 444
 function boincteam_views_handlers() {
445 445
   return array(
446 446
     'info' => array(
447
-      'path' => drupal_get_path('module', 'boincteam') . '/views',
447
+      'path' => drupal_get_path('module', 'boincteam').'/views',
448 448
     ),
449 449
     'handlers' => array(
450 450
       'views_handler_argument_boincteam_id' => array(
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.admin.inc 2 patches
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
   */
66 66
 function boincwork_admin_prefs_upload_form_validate($form, &$form_state) {
67 67
   
68
-  $xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
68
+  $xsd = './'.drupal_get_path('module', 'boincwork').'/includes/projectprefs.xsd';
69 69
   libxml_use_internal_errors(true);
70 70
   $xml = new DomDocument();
71 71
   $xml->loadXML($form_state['values']['prefs_xml'], LIBXML_NOBLANKS);
72 72
   if (!$xml->schemaValidate($xsd)) {
73 73
     $errors = libxml_get_errors();
74 74
     $lines = explode("\r", $form_state['values']['prefs_xml']);
75
-    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
76
-      ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
75
+    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}".
76
+      ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), 'error');
77 77
     form_set_error('upload', t('XML file failed validation'));
78 78
   }
79 79
 }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
       "{$path}/minimum" => t('Minimum')
102 102
     );
103 103
     variable_set('jump_use_js_presets-Array', 1);
104
-    drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
104
+    drupal_add_js(drupal_get_path('module', 'jump').'/jump.js');
105 105
     $output .= '<div class="simple-form-controls"><div class="form-item venue">';
106 106
     $output .= '<label>Preset:</label>';
107 107
     $output .= jump_quickly($preset_options, 'presets');
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     '#type' => 'submit',
151 151
     '#value' => t('Save configuration')
152 152
   );
153
-  $form['saveuseconfigxml'] = array (
153
+  $form['saveuseconfigxml'] = array(
154 154
       '#type' => 'submit',
155 155
       '#value' => t('Save configuration with disk usage settings from config.xml'),
156 156
       '#validate' => array('boincwork_admin_prefs_preset_saveuseconfigxml'),
@@ -175,33 +175,33 @@  discard block
 block discarded – undo
175 175
   // Verify all non-boolean user input values and notify form API of failures
176 176
   
177 177
   // Processing preferences
178
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for') . " \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for') . " \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for') . " \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for') . " \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for') . " \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for') . " \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for') . " \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for') . " \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
178
+  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for')." \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
+  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for')." \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
+  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for')." \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
+  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for')." \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
+  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for')." \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
+  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for')." \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
+  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for')." \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
+  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for')." \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
186 186
 
187 187
   // Storage preferences
188
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for') . " \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for') . " \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
188
+  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for')." \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
+  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for')." \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
+  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for')." \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
+  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for')." \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
+  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for')." \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
+  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for')." \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
+  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for')." \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
195 195
 
196 196
   // Network preferences
197
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for') . " \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for') . " \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for') . " \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for') . " \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
197
+  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for')." \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
+  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for')." \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
+  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for')." \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
+  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for')." \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
+  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for')." \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
+  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for')." \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
+  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for')." \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
+  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for')." \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
205 205
 }
206 206
 
207 207
 /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
   // Processing preferences
218 218
   $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
219 219
   $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
220
-  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0: 1;
220
+  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
221 221
   $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
222 222
   $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
223 223
   $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
   
268 268
   // Get the full configuration
269 269
   $all_presets = boincwork_get_preset_prefs();
270
-  $all_presets = (array) $all_presets['general_preferences'];
270
+  $all_presets = (array)$all_presets['general_preferences'];
271 271
   
272 272
   // Check for sane config
273 273
   if (isset($all_presets['preset'])) {
Please login to merge, or discard this patch.
Switch Indentation   +199 added lines, -199 removed lines patch added patch discarded remove patch
@@ -10,20 +10,20 @@  discard block
 block discarded – undo
10 10
  * Allow configuration of general options for preference pages
11 11
  */
12 12
 function boincwork_admin_prefs_options_form(&$form_state) {
13
-  $form = array(); 
14
-  $form['beta'] = array(
15
-    '#type' => 'checkbox',
16
-    '#title' => t('Allow users to opt in to test beta applications'),
17
-    '#default_value' => variable_get('boinc_prefs_options_beta', 0),
18
-    '#required' => TRUE
19
-  );
20
-  $form['submit'] = array(
21
-    '#type' => 'submit',
22
-    '#value' => t('Submit')
23
-  );
24
-  // Add the official mechanical things and return
25
-  //drupal_prepare_form('boincwork_admin_prefs_upload_form', $form, $form_state);
26
-  return $form;
13
+$form = array(); 
14
+$form['beta'] = array(
15
+'#type' => 'checkbox',
16
+'#title' => t('Allow users to opt in to test beta applications'),
17
+'#default_value' => variable_get('boinc_prefs_options_beta', 0),
18
+'#required' => TRUE
19
+);
20
+$form['submit'] = array(
21
+'#type' => 'submit',
22
+'#value' => t('Submit')
23
+);
24
+// Add the official mechanical things and return
25
+//drupal_prepare_form('boincwork_admin_prefs_upload_form', $form, $form_state);
26
+return $form;
27 27
 } 
28 28
 
29 29
 /**
@@ -36,28 +36,28 @@  discard block
 block discarded – undo
36 36
   * Handle submission of preference general settings form.
37 37
   */
38 38
 function boincwork_admin_prefs_options_form_submit($form, &$form_state) {
39
-  variable_set('boinc_prefs_options_beta', $form_state['values']['beta']);
40
-  drupal_set_message('Preference options have been updated.');
39
+variable_set('boinc_prefs_options_beta', $form_state['values']['beta']);
40
+drupal_set_message('Preference options have been updated.');
41 41
 }
42 42
 
43 43
 /**
44 44
  * 
45 45
  */
46 46
 function boincwork_admin_prefs_upload_form(&$form_state) {
47
-  $form = array(); 
48
-  $form['prefs_xml'] = array(
49
-    '#type' => 'textarea',
50
-    '#title' => t('Project specific preferences XML'),
51
-    '#default_value' => variable_get('boinc_project_specific_prefs_config', "<project_specific_preferences>\n\n</project_specific_preferences>"),
52
-    '#required' => TRUE
53
-  );
54
-  $form['submit'] = array(
55
-    '#type' => 'submit',
56
-    '#value' => t('Submit')
57
-  );
58
-  // Add the official mechanical things and return
59
-  //drupal_prepare_form('boincwork_admin_prefs_upload_form', $form, $form_state);
60
-  return $form;
47
+$form = array(); 
48
+$form['prefs_xml'] = array(
49
+'#type' => 'textarea',
50
+'#title' => t('Project specific preferences XML'),
51
+'#default_value' => variable_get('boinc_project_specific_prefs_config', "<project_specific_preferences>\n\n</project_specific_preferences>"),
52
+'#required' => TRUE
53
+);
54
+$form['submit'] = array(
55
+'#type' => 'submit',
56
+'#value' => t('Submit')
57
+);
58
+// Add the official mechanical things and return
59
+//drupal_prepare_form('boincwork_admin_prefs_upload_form', $form, $form_state);
60
+return $form;
61 61
 } 
62 62
 
63 63
 /**
@@ -65,25 +65,25 @@  discard block
 block discarded – undo
65 65
   */
66 66
 function boincwork_admin_prefs_upload_form_validate($form, &$form_state) {
67 67
   
68
-  $xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
69
-  libxml_use_internal_errors(true);
70
-  $xml = new DomDocument();
71
-  $xml->loadXML($form_state['values']['prefs_xml'], LIBXML_NOBLANKS);
72
-  if (!$xml->schemaValidate($xsd)) {
73
-    $errors = libxml_get_errors();
74
-    $lines = explode("\r", $form_state['values']['prefs_xml']);
75
-    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
76
-      ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
77
-    form_set_error('upload', t('XML file failed validation'));
78
-  }
68
+$xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
69
+libxml_use_internal_errors(true);
70
+$xml = new DomDocument();
71
+$xml->loadXML($form_state['values']['prefs_xml'], LIBXML_NOBLANKS);
72
+if (!$xml->schemaValidate($xsd)) {
73
+$errors = libxml_get_errors();
74
+$lines = explode("\r", $form_state['values']['prefs_xml']);
75
+drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
76
+  ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
77
+form_set_error('upload', t('XML file failed validation'));
78
+}
79 79
 }
80 80
 
81 81
 /**
82 82
   * Handle submission of preference upload form.
83 83
   */
84 84
 function boincwork_admin_prefs_upload_form_submit($form, &$form_state) {
85
-  variable_set('boinc_project_specific_prefs_config', $form_state['values']['prefs_xml']);
86
-  drupal_set_message('The XML has been validated and any changes to
85
+variable_set('boinc_project_specific_prefs_config', $form_state['values']['prefs_xml']);
86
+drupal_set_message('The XML has been validated and any changes to
87 87
       preferences are now in place.');
88 88
 }
89 89
 
@@ -91,30 +91,30 @@  discard block
 block discarded – undo
91 91
  * 
92 92
  */
93 93
 function boincwork_admin_prefs_presets_page($preset = 'standard') {
94
-  // Configure preference presets
95
-  if (function_exists('jump_quickly')) {
96
-    $path = 'admin/boinc/prefs/presets';
97
-    $preset_options = array(
98
-      "{$path}/standard" => t('Standard'),
99
-      "{$path}/maximum" => t('Maximum'),
100
-      "{$path}/green" => t('Green'),
101
-      "{$path}/minimum" => t('Minimum')
102
-    );
103
-    variable_set('jump_use_js_presets-Array', 1);
104
-    drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
105
-    $output .= '<div class="simple-form-controls"><div class="form-item venue">';
106
-    $output .= '<label>Preset:</label>';
107
-    $output .= jump_quickly($preset_options, 'presets');
108
-    $output .= '</div></div>';
109
-  }
110
-  $output .= drupal_get_form('boincwork_admin_prefs_presets_form', $preset);
94
+// Configure preference presets
95
+if (function_exists('jump_quickly')) {
96
+$path = 'admin/boinc/prefs/presets';
97
+$preset_options = array(
98
+  "{$path}/standard" => t('Standard'),
99
+  "{$path}/maximum" => t('Maximum'),
100
+  "{$path}/green" => t('Green'),
101
+  "{$path}/minimum" => t('Minimum')
102
+);
103
+variable_set('jump_use_js_presets-Array', 1);
104
+drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
105
+$output .= '<div class="simple-form-controls"><div class="form-item venue">';
106
+$output .= '<label>Preset:</label>';
107
+$output .= jump_quickly($preset_options, 'presets');
108
+$output .= '</div></div>';
109
+}
110
+$output .= drupal_get_form('boincwork_admin_prefs_presets_form', $preset);
111 111
 
112
-  $output .= '<div>';
113
-  $output .= bts('Usage: \'Save configuration\' will save the above preferences into the drupal database. These will be the preset computing (global) preferences that will fill in the preferences form once a user loads the Account Preferences page.', array(), NULL, 'boinc:admin-boinc-preference-presets');
114
-  $output .= '<p>';
115
-  $output .= bts('\'Save configuration with disk usage settings from config.xml\' will save the above preferences into the drupal database, but also load disk usage settings from the BOINC project\'s config.xml file. These will overwrite any disk usage settings you have placed above. Caution: A user\'s personal preferences will not change if you load the disk usage settings from config.xml here into the drupal database. They must change their preference settings manually.', array(), NULL, 'boinc:admin-boinc-preference-presets');
116
-  $output .= '</div>';
117
-  return $output;
112
+$output .= '<div>';
113
+$output .= bts('Usage: \'Save configuration\' will save the above preferences into the drupal database. These will be the preset computing (global) preferences that will fill in the preferences form once a user loads the Account Preferences page.', array(), NULL, 'boinc:admin-boinc-preference-presets');
114
+$output .= '<p>';
115
+$output .= bts('\'Save configuration with disk usage settings from config.xml\' will save the above preferences into the drupal database, but also load disk usage settings from the BOINC project\'s config.xml file. These will overwrite any disk usage settings you have placed above. Caution: A user\'s personal preferences will not change if you load the disk usage settings from config.xml here into the drupal database. They must change their preference settings manually.', array(), NULL, 'boinc:admin-boinc-preference-presets');
116
+$output .= '</div>';
117
+return $output;
118 118
 }
119 119
 
120 120
 /**
@@ -122,142 +122,142 @@  discard block
 block discarded – undo
122 122
  */
123 123
 function boincwork_admin_prefs_presets_form(&$form_state, $preset = 'standard') {
124 124
 
125
-  // Check database for preset prefs
126
-  if (!variable_get('boincwork_preset_prefs', null))
127
-    drupal_set_message(bts('No presets found in database, loading a default set of preferences for each preset. These will be saved to the database once you click \'Save configuration\'.', array(), NULL, 'boinc:admin-boinc-preference-presets'), 'status');
125
+// Check database for preset prefs
126
+if (!variable_get('boincwork_preset_prefs', null))
127
+drupal_set_message(bts('No presets found in database, loading a default set of preferences for each preset. These will be saved to the database once you click \'Save configuration\'.', array(), NULL, 'boinc:admin-boinc-preference-presets'), 'status');
128 128
 
129
-  // Load a copy of the general prefs form
130
-  $form = boincwork_generalprefs_form($form_state, NULL, $preset);
131
-  if ($key = array_search('boincwork_generalprefs_form_submit', $form['#submit'])) {
132
-    unset($form['#submit'][$key]);
133
-  }
134
-  $form['#submit'][] = 'boincwork_admin_prefs_presets_form_submit';
129
+// Load a copy of the general prefs form
130
+$form = boincwork_generalprefs_form($form_state, NULL, $preset);
131
+if ($key = array_search('boincwork_generalprefs_form_submit', $form['#submit'])) {
132
+unset($form['#submit'][$key]);
133
+}
134
+$form['#submit'][] = 'boincwork_admin_prefs_presets_form_submit';
135 135
   
136
-  // Just keep the necessary items
137
-  $form['processor'] = $form['prefs']['advanced']['processor'];
138
-  $form['storage'] = $form['prefs']['advanced']['storage'];
139
-  $form['network'] = $form['prefs']['advanced']['network'];
140
-  unset($form['prefs']);
136
+// Just keep the necessary items
137
+$form['processor'] = $form['prefs']['advanced']['processor'];
138
+$form['storage'] = $form['prefs']['advanced']['storage'];
139
+$form['network'] = $form['prefs']['advanced']['network'];
140
+unset($form['prefs']);
141 141
   
142
-  // Tweak some things so it behaves a little better
143
-  $form['#tree'] = TRUE;
144
-  $form['processor']['#collapsible'] = TRUE;
145
-  $form['storage']['#collapsible'] = TRUE;
146
-  $form['network']['#collapsible'] = TRUE;
142
+// Tweak some things so it behaves a little better
143
+$form['#tree'] = TRUE;
144
+$form['processor']['#collapsible'] = TRUE;
145
+$form['storage']['#collapsible'] = TRUE;
146
+$form['network']['#collapsible'] = TRUE;
147 147
   
148
-  // Add a submit button and a hidden field to pass the preset
149
-  $form['submit'] = array(
150
-    '#type' => 'submit',
151
-    '#value' => t('Save configuration')
152
-  );
153
-  $form['saveuseconfigxml'] = array (
154
-      '#type' => 'submit',
155
-      '#value' => t('Save configuration with disk usage settings from config.xml'),
156
-      '#validate' => array('boincwork_admin_prefs_preset_saveuseconfigxml'),
157
-  );
158
-  $form['preset'] = array(
159
-    '#type' => 'hidden',
160
-    '#value' => $preset
161
-  );
148
+// Add a submit button and a hidden field to pass the preset
149
+$form['submit'] = array(
150
+'#type' => 'submit',
151
+'#value' => t('Save configuration')
152
+);
153
+$form['saveuseconfigxml'] = array (
154
+  '#type' => 'submit',
155
+  '#value' => t('Save configuration with disk usage settings from config.xml'),
156
+  '#validate' => array('boincwork_admin_prefs_preset_saveuseconfigxml'),
157
+);
158
+$form['preset'] = array(
159
+'#type' => 'hidden',
160
+'#value' => $preset
161
+);
162 162
   
163
-  // Add the official mechanical things and return
164
-  drupal_prepare_form('boincwork_admin_prefs_presets_form', $form, $form_state);
165
-  return $form;
163
+// Add the official mechanical things and return
164
+drupal_prepare_form('boincwork_admin_prefs_presets_form', $form, $form_state);
165
+return $form;
166 166
 }
167 167
 
168 168
 /**
169 169
   * Validate the preference presets form.
170 170
   */
171 171
 function boincwork_admin_prefs_presets_form_validate($form, &$form_state) {
172
-  require_boinc('util');
173
-  $values = $form_state['values'];
172
+require_boinc('util');
173
+$values = $form_state['values'];
174 174
   
175
-  // Verify all non-boolean user input values and notify form API of failures
175
+// Verify all non-boolean user input values and notify form API of failures
176 176
   
177
-  // Processing preferences
178
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for') . " \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for') . " \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for') . " \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for') . " \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for') . " \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for') . " \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for') . " \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for') . " \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
177
+// Processing preferences
178
+if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', t('Invalid setting for') . " \"{$form['processor']['idle_time_to_run']['#title']} [x] {$form['processor']['idle_time_to_run']['#field_suffix']}\"");
179
+if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', t('Invalid setting for') . " \"{$form['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['processor']['suspend_if_no_recent_input']['#field_suffix']}\"");
180
+if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', t('Invalid setting for') . " \"{$form['processor']['suspend_cpu_usage']['#title']} [x] {$form['processor']['suspend_cpu_usage']['#field_suffix']}\"");
181
+if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', t('Invalid setting for') . " \"{$form['processor']['start_hour']['#title']} [x] {$form['processor']['start_hour']['#field_suffix']}\"");
182
+if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', t('Invalid setting for') . " \"{$form['processor']['end_hour']['#title']} [x] {$form['processor']['end_hour']['#field_suffix']}\"");
183
+if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', t('Invalid setting for') . " \"{$form['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['processor']['cpu_scheduling_period_minutes']['#field_suffix']}\"");
184
+if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', t('Invalid setting for') . " \"{$form['processor']['max_ncpus_pct']['#title']} [x] {$form['processor']['max_ncpus_pct']['#field_suffix']}\"");
185
+if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', t('Invalid setting for') . " \"{$form['processor']['cpu_usage_limit']['#title']} [x] {$form['processor']['cpu_usage_limit']['#field_suffix']}\"");
186 186
 
187
-  // Storage preferences
188
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for') . " \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for') . " \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
187
+// Storage preferences
188
+if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_gb']['#title']} [x] {$form['storage']['disk_max_used_gb']['#field_suffix']}\"");
189
+if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', t('Invalid setting for') . " \"{$form['storage']['disk_min_free_gb']['#title']} [x] {$form['storage']['disk_min_free_gb']['#field_suffix']}\"");
190
+if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['disk_max_used_pct']['#title']} [x] {$form['storage']['disk_max_used_pct']['#field_suffix']}\"");
191
+if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', t('Invalid setting for') . " \"{$form['storage']['disk_interval']['#title']} [x] {$form['storage']['disk_interval']['#field_suffix']}\"");
192
+if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', t('Invalid setting for') . " \"{$form['storage']['vm_max_used_pct']['#title']} [x] {$form['storage']['vm_max_used_pct']['#field_suffix']}\"");
193
+if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['storage']['ram_max_used_busy_pct']['#field_suffix']}\"");
194
+if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', t('Invalid setting for') . " \"{$form['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['storage']['ram_max_used_idle_pct']['#field_suffix']}\"");
195 195
 
196
-  // Network preferences
197
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for') . " \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for') . " \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for') . " \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for') . " \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
196
+// Network preferences
197
+if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', t('Invalid setting for') . " \"{$form['network']['work_buf_min_days']['#title']} [x] {$form['network']['work_buf_min_days']['#field_suffix']}\"");
198
+if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', t('Invalid setting for') . " \"{$form['network']['work_buf_additional_days']['#title']} [x] {$form['network']['work_buf_additional_days']['#field_suffix']}\"");
199
+if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_down']['#title']} [x] {$form['network']['max_bytes_sec_down']['#field_suffix']}\"");
200
+if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', t('Invalid setting for') . " \"{$form['network']['max_bytes_sec_up']['#title']} [x] {$form['network']['max_bytes_sec_up']['#field_suffix']}\"");
201
+if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', t('Invalid setting for') . " \"{$form['network']['net_start_hour']['#title']} [x] {$form['network']['net_start_hour']['#field_suffix']}\"");
202
+if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', t('Invalid setting for') . " \"{$form['network']['net_end_hour']['#title']} [x] {$form['network']['net_end_hour']['#field_suffix']}\"");
203
+if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
204
+if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', t('Invalid setting for') . " \"{$form['network']['daily_xfer_limit_mb']['#title']} [x] {$form['network']['daily_xfer_limit_mb']['#field_suffix']}\"");
205 205
 }
206 206
 
207 207
 /**
208 208
   * Handle post-validation submission of preference presets form.
209 209
   */
210 210
 function boincwork_admin_prefs_presets_form_submit($form, &$form_state) {
211
-  $values = $form_state['values'];
212
-  $preset = $form_state['values']['preset'];
211
+$values = $form_state['values'];
212
+$preset = $form_state['values']['preset'];
213 213
   
214
-  // Load baseline settings from configuration
215
-  $prefs = boincwork_get_preset_prefs($preset);
214
+// Load baseline settings from configuration
215
+$prefs = boincwork_get_preset_prefs($preset);
216 216
   
217
-  // Processing preferences
218
-  $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
219
-  $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
220
-  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0: 1;
221
-  $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
222
-  $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
223
-  $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
224
-  $prefs['start_hour'] = $values['processor']['start_hour'];
225
-  $prefs['end_hour'] = $values['processor']['end_hour'];
226
-  $prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
227
-  $prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
228
-  $prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
229
-  $prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
217
+// Processing preferences
218
+$prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
219
+$prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
220
+$prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0: 1;
221
+$prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
222
+$prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
223
+$prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
224
+$prefs['start_hour'] = $values['processor']['start_hour'];
225
+$prefs['end_hour'] = $values['processor']['end_hour'];
226
+$prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
227
+$prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
228
+$prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
229
+$prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
230 230
   
231
-  // Storage preferences
232
-  $prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
233
-  $prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
234
-  $prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
235
-  $prefs['disk_interval'] = $values['storage']['disk_interval'];
236
-  $prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
237
-  $prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
238
-  $prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
231
+// Storage preferences
232
+$prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
233
+$prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
234
+$prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
235
+$prefs['disk_interval'] = $values['storage']['disk_interval'];
236
+$prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
237
+$prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
238
+$prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
239 239
   
240
-  // Network preferences
241
-  $prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
242
-  $prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
243
-  $prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
244
-  $prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
245
-  $prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
246
-  $prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
247
-  $prefs['net_start_hour'] = $values['network']['net_start_hour'];
248
-  $prefs['net_end_hour'] = $values['network']['net_end_hour'];
249
-  $prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
250
-  $prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
251
-  $prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
240
+// Network preferences
241
+$prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
242
+$prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
243
+$prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
244
+$prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
245
+$prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
246
+$prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
247
+$prefs['net_start_hour'] = $values['network']['net_start_hour'];
248
+$prefs['net_end_hour'] = $values['network']['net_end_hour'];
249
+$prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
250
+$prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
251
+$prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
252 252
   
253
-  //Remove @attributes to match new format (see boincwork.forms.inc
254
-  //function boincwork_generalprefs_form)
255
-  unset($prefs['@attributes']['preset']);
253
+//Remove @attributes to match new format (see boincwork.forms.inc
254
+//function boincwork_generalprefs_form)
255
+unset($prefs['@attributes']['preset']);
256 256
   
257
-  // Update the configuration
258
-  boincwork_save_preset_prefs($prefs, $preset);
259
-  drupal_set_message(t('The "@name" preset has been updated.',
260
-    array('@name' => $preset)));
257
+// Update the configuration
258
+boincwork_save_preset_prefs($prefs, $preset);
259
+drupal_set_message(t('The "@name" preset has been updated.',
260
+array('@name' => $preset)));
261 261
 }
262 262
 
263 263
 /**
@@ -265,26 +265,26 @@  discard block
 block discarded – undo
265 265
  */
266 266
 function boincwork_save_preset_prefs($updated_prefs, $preset = 'standard') {
267 267
   
268
-  // Get the full configuration
269
-  $all_presets = boincwork_get_preset_prefs();
270
-  $all_presets = (array) $all_presets['general_preferences'];
268
+// Get the full configuration
269
+$all_presets = boincwork_get_preset_prefs();
270
+$all_presets = (array) $all_presets['general_preferences'];
271 271
   
272
-  // Check for sane config
273
-  if (isset($all_presets['preset'])) {
274
-    if (!is_numeric(key($all_presets['preset']))) {
275
-      $all_presets['preset'] = array($all_presets['preset']);
276
-    }
277
-    foreach ($all_presets['preset'] as $key => $old_preset) {
278
-      // Find the preset being updated and... update it
279
-      if (isset($old_preset['@attributes']['name']) AND $old_preset['@attributes']['name'] == $preset) {
280
-        $all_presets['preset'][$key] = $updated_prefs + $old_preset;
281
-      }
282
-    }
272
+// Check for sane config
273
+if (isset($all_presets['preset'])) {
274
+if (!is_numeric(key($all_presets['preset']))) {
275
+  $all_presets['preset'] = array($all_presets['preset']);
276
+}
277
+foreach ($all_presets['preset'] as $key => $old_preset) {
278
+  // Find the preset being updated and... update it
279
+  if (isset($old_preset['@attributes']['name']) AND $old_preset['@attributes']['name'] == $preset) {
280
+    $all_presets['preset'][$key] = $updated_prefs + $old_preset;
283 281
   }
282
+}
283
+}
284 284
   
285
-  // Convert prefs back to XML and save to database
286
-  $all_presets = array('general_preferences' => $all_presets);
287
-  variable_set('boincwork_preset_prefs', save_configuration($all_presets));
285
+// Convert prefs back to XML and save to database
286
+$all_presets = array('general_preferences' => $all_presets);
287
+variable_set('boincwork_preset_prefs', save_configuration($all_presets));
288 288
 }
289 289
 
290 290
 /**
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
  * overwrites whatever values are is in form.
293 293
  */
294 294
 function boincwork_admin_prefs_preset_saveuseconfigxml($form, &$form_state) {
295
-    require_boinc(array('db', 'prefs'));
296
-    $disk_space_config = get_disk_space_config();
295
+require_boinc(array('db', 'prefs'));
296
+$disk_space_config = get_disk_space_config();
297 297
 
298
-    $form_state['values']['storage']['disk_max_used_gb']  = $disk_space_config->disk_max_used_gb;
299
-    $form_state['values']['storage']['disk_min_free_gb']  = $disk_space_config->disk_min_free_gb;
300
-    $form_state['values']['storage']['disk_max_used_pct'] = $disk_space_config->disk_max_used_pct;
298
+$form_state['values']['storage']['disk_max_used_gb']  = $disk_space_config->disk_max_used_gb;
299
+$form_state['values']['storage']['disk_min_free_gb']  = $disk_space_config->disk_min_free_gb;
300
+$form_state['values']['storage']['disk_max_used_pct'] = $disk_space_config->disk_max_used_pct;
301 301
 
302
-    //Run the form validate function
303
-    boincwork_admin_prefs_presets_form_validate($form, $form_state);
302
+//Run the form validate function
303
+boincwork_admin_prefs_presets_form_validate($form, $form_state);
304 304
 }
305 305
\ No newline at end of file
Please login to merge, or discard this patch.
modules/boincwork/views/views_handler_field_boincwork_host_app_et_avg.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
   function render($values) {
14 14
     $gflops = 0;
15 15
     if ($values->host_app_version_et_avg) {
16
-      $gflops = 1e-9 / $values->host_app_version_et_avg;
16
+      $gflops = 1e-9/$values->host_app_version_et_avg;
17 17
     }
18
-    return round($gflops, 2) . ' GFLOPS';
18
+    return round($gflops, 2).' GFLOPS';
19 19
   }
20 20
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_host_app_turnaround_avg.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
   }
12 12
 
13 13
   function render($values) {
14
-    $time_in_days = $values->host_app_version_turnaround_avg / (24*60*60);
15
-    return round($time_in_days, 2) . ' ' . t('days');
14
+    $time_in_days = $values->host_app_version_turnaround_avg/(24*60*60);
15
+    return round($time_in_days, 2).' '.t('days');
16 16
   }
17 17
 }
Please login to merge, or discard this patch.
boincwork/views/views_handler_field_boincwork_app_version_number.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,6 @@
 block discarded – undo
11 11
   }
12 12
 
13 13
   function render($values) {
14
-    return sprintf("%01.2f", $values->app_version_host_app_version_version_num / 100);
14
+    return sprintf("%01.2f", $values->app_version_host_app_version_version_num/100);
15 15
   }
16 16
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.views.inc 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1637,7 +1637,7 @@
 block discarded – undo
1637 1637
   
1638 1638
   return array(
1639 1639
     'info' => array(
1640
-      'path' => drupal_get_path('module', 'boincwork') . '/views',
1640
+      'path' => drupal_get_path('module', 'boincwork').'/views',
1641 1641
     ),
1642 1642
     'handlers' => array(
1643 1643
       'views_handler_argument_boincuser_id' => array(
Please login to merge, or discard this patch.
Switch Indentation   +1607 added lines, -1607 removed lines patch added patch discarded remove patch
@@ -13,1660 +13,1660 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function boincwork_views_data() {
15 15
   
16
-  // -----------------------------------------------------------------------------------------------
17
-  // Definition for host table
18
-  // -----------------------------------------------------------------------------------------------
16
+// -----------------------------------------------------------------------------------------------
17
+// Definition for host table
18
+// -----------------------------------------------------------------------------------------------
19 19
   
20
-  $data['host']['table']['group'] = t('BOINC');
20
+$data['host']['table']['group'] = t('BOINC');
21 21
   
22
-  $data['host']['table']['base'] = array(
23
-      'field' => 'id',
24
-      'title' => t('BOINC host'),
25
-      'help' => t('Computers attached to BOINC'),
26
-      'database' => 'boinc_ro'
27
-  );
22
+$data['host']['table']['base'] = array(
23
+  'field' => 'id',
24
+  'title' => t('BOINC host'),
25
+  'help' => t('Computers attached to BOINC'),
26
+  'database' => 'boinc_ro'
27
+);
28 28
   
29
-  // This table references the {user} table.
30
-  // This join creates an 'implicit' relationship to the user table, so that when
31
-  // "User" is the base table, the fields are automatically available.
29
+// This table references the {user} table.
30
+// This join creates an 'implicit' relationship to the user table, so that when
31
+// "User" is the base table, the fields are automatically available.
32 32
   
33
-  // Index this array by the table name to which this table refers.
34
-  // 'left_field' is the primary key in the referenced table.
35
-  // 'field' is the foreign key in this table.
33
+// Index this array by the table name to which this table refers.
34
+// 'left_field' is the primary key in the referenced table.
35
+// 'field' is the foreign key in this table.
36 36
   
37
-  $data['host']['table']['join'] = array(
38
-    'user' => array(
39
-      'left_field' => 'id',
40
-      'field' => 'userid',
41
-    )
42
-  );
37
+$data['host']['table']['join'] = array(
38
+'user' => array(
39
+  'left_field' => 'id',
40
+  'field' => 'userid',
41
+)
42
+);
43 43
 
44
-  // Describe each of the individual fields in this table to Views. For
45
-  // each field, you may define what field, sort, argument, and/or filter
46
-  // handlers it supports. This will determine where in the Views interface you
47
-  // may use the field.
44
+// Describe each of the individual fields in this table to Views. For
45
+// each field, you may define what field, sort, argument, and/or filter
46
+// handlers it supports. This will determine where in the Views interface you
47
+// may use the field.
48 48
   
49
-  // Primary keys allowed as arguments
49
+// Primary keys allowed as arguments
50 50
   
51
-  $data['host']['id'] = array(
52
-    'title' => bts('Computer ID', array(), NULL, 'boinc:host-list'),
53
-    'help' => t('The ID number of this host.'),
54
-    'field' => array(
55
-      'handler' => 'views_handler_field_numeric',
56
-      'click sortable' => TRUE
57
-    ),
58
-    'argument' => array(
59
-      'handler' => 'views_handler_argument',
60
-      'name field' => 'title',
61
-      'numeric' => TRUE,
62
-      'validate type' => 'id'
63
-    ),
64
-    'filter' => array(
65
-      'handler' => 'views_handler_filter_numeric'
66
-    ),
67
-    'sort' => array(
68
-      'handler' => 'views_handler_sort_numeric'
69
-    )
70
-  );
71
-  $data['host']['venue'] = array(
72
-    'title' => bts('Location', array(), NULL, 'boinc:host-list'),
73
-    'help' => t('The name of the preference set assigned to this host.'),
74
-    'field' => array(
75
-      'handler' => 'views_handler_field',
76
-      'click sortable' => TRUE
77
-    ),
78
-    'argument' => array(
79
-      'handler' => 'views_handler_argument',
80
-      'name field' => 'title'
81
-    ),
82
-    'filter' => array(
83
-      'handler' => 'views_handler_filter_string'
84
-    ),
85
-    'sort' => array(
86
-      'handler' => 'views_handler_sort_string'
87
-    )
88
-  );
51
+$data['host']['id'] = array(
52
+'title' => bts('Computer ID', array(), NULL, 'boinc:host-list'),
53
+'help' => t('The ID number of this host.'),
54
+'field' => array(
55
+  'handler' => 'views_handler_field_numeric',
56
+  'click sortable' => TRUE
57
+),
58
+'argument' => array(
59
+  'handler' => 'views_handler_argument',
60
+  'name field' => 'title',
61
+  'numeric' => TRUE,
62
+  'validate type' => 'id'
63
+),
64
+'filter' => array(
65
+  'handler' => 'views_handler_filter_numeric'
66
+),
67
+'sort' => array(
68
+  'handler' => 'views_handler_sort_numeric'
69
+)
70
+);
71
+$data['host']['venue'] = array(
72
+'title' => bts('Location', array(), NULL, 'boinc:host-list'),
73
+'help' => t('The name of the preference set assigned to this host.'),
74
+'field' => array(
75
+  'handler' => 'views_handler_field',
76
+  'click sortable' => TRUE
77
+),
78
+'argument' => array(
79
+  'handler' => 'views_handler_argument',
80
+  'name field' => 'title'
81
+),
82
+'filter' => array(
83
+  'handler' => 'views_handler_filter_string'
84
+),
85
+'sort' => array(
86
+  'handler' => 'views_handler_sort_string'
87
+)
88
+);
89 89
   
90
-  // Foreign key fields
90
+// Foreign key fields
91 91
   
92
-  $data['host']['userid'] = array(
93
-    'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
94
-    'help' => t('The owner of this host.'),
95
-    // Because this is a foreign key to the {user} table. This allows us to
96
-    // have, when the view is configured with this relationship, all the fields
97
-    // for the related node available.
98
-    'argument' => array(
99
-      'handler' => 'views_handler_argument_boincuser_id',
100
-      'name field' => 'title',
101
-      'numeric' => TRUE,
102
-      'validate type' => 'id'
103
-    ),
104
-    'relationship' => array(
105
-      'base' => 'user',
106
-      'field' => 'userid',
107
-      'handler' => 'views_handler_relationship',
108
-      'label' => t('User')
109
-    ),
110
-    'field' => array(
111
-      'handler' => 'views_handler_field_numeric',
112
-      'click sortable' => TRUE
113
-    ),
114
-    'filter' => array(
115
-      'handler' => 'views_handler_filter_numeric'
116
-    ),
117
-    'sort' => array(
118
-      'handler' => 'views_handler_sort_numeric'
119
-    )
120
-  );
92
+$data['host']['userid'] = array(
93
+'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
94
+'help' => t('The owner of this host.'),
95
+// Because this is a foreign key to the {user} table. This allows us to
96
+// have, when the view is configured with this relationship, all the fields
97
+// for the related node available.
98
+'argument' => array(
99
+  'handler' => 'views_handler_argument_boincuser_id',
100
+  'name field' => 'title',
101
+  'numeric' => TRUE,
102
+  'validate type' => 'id'
103
+),
104
+'relationship' => array(
105
+  'base' => 'user',
106
+  'field' => 'userid',
107
+  'handler' => 'views_handler_relationship',
108
+  'label' => t('User')
109
+),
110
+'field' => array(
111
+  'handler' => 'views_handler_field_numeric',
112
+  'click sortable' => TRUE
113
+),
114
+'filter' => array(
115
+  'handler' => 'views_handler_filter_numeric'
116
+),
117
+'sort' => array(
118
+  'handler' => 'views_handler_sort_numeric'
119
+)
120
+);
121 121
   
122
-  // Descriptions of general host fields (alphabetized)
122
+// Descriptions of general host fields (alphabetized)
123 123
   
124
-  $data['host']['active_frac'] = array(
125
-    'title' => bts('While BOINC running, % of time work is allowed', array(), NULL, 'boinc:host-details'),
126
-    'help' => t('The percentage of time that work is allowed.'),
127
-    'field' => array(
128
-      'handler' => 'views_handler_field_numeric',
129
-      'click sortable' => TRUE,
130
-      'float' => TRUE
131
-    ),
132
-    'filter' => array(
133
-      'handler' => 'views_handler_filter_numeric'
134
-    ),
135
-    'sort' => array(
136
-      'handler' => 'views_handler_sort_numeric'
137
-    )
138
-  );
139
-  $data['host']['avg_turnaround'] = array(
140
-    'title' => bts('Average turnaround time', array(), NULL, 'boinc:host-details'),
141
-    'help' => t('The average time required for work to be completed.'),
142
-    'field' => array(
143
-      'handler' => 'views_handler_field_numeric',
144
-      'click sortable' => TRUE,
145
-      'float' => TRUE
146
-    ),
147
-    'filter' => array(
148
-      'handler' => 'views_handler_filter_numeric'
149
-    ),
150
-    'sort' => array(
151
-      'handler' => 'views_handler_sort_numeric'
152
-    )
153
-  );
154
-  $data['host']['create_time'] = array(
155
-    'title' => bts('Created', array(), NULL, 'boinc:host-details'),
156
-    'help' => t('The time the host record was created.'),
157
-    'field' => array(
158
-      'handler' => 'views_handler_field_date',
159
-      'click sortable' => TRUE
160
-    ),
161
-    'filter' => array(
162
-      'handler' => 'views_handler_filter_date'
163
-    ),
164
-    'sort' => array(
165
-      'handler' => 'views_handler_sort_date'
166
-    )
167
-  );
168
-  $data['host']['connected_frac'] = array(
169
-    'title' => bts('While BOINC running, % of time host has an Internet connection', array(), NULL, 'boinc:host-details'),
170
-    'help' => t('The percentage of time that the host has an Internet connection.'),
171
-    'field' => array(
172
-      'handler' => 'views_handler_field_numeric',
173
-      'click sortable' => TRUE,
174
-      'float' => TRUE
175
-    ),
176
-    'filter' => array(
177
-      'handler' => 'views_handler_filter_numeric'
178
-    ),
179
-    'sort' => array(
180
-      'handler' => 'views_handler_sort_numeric'
181
-    )
182
-  );
183
-  $data['host']['cpu_efficiency'] = array(
184
-    'title' => bts('Average CPU efficiency', array(), NULL, 'boinc:host-details'),
185
-    'help' => t('The average efficiency of the host CPU.'),
186
-    'field' => array(
187
-      'handler' => 'views_handler_field_numeric',
188
-      'click sortable' => TRUE,
189
-      'float' => TRUE
190
-    ),
191
-    'filter' => array(
192
-      'handler' => 'views_handler_filter_numeric'
193
-    ),
194
-    'sort' => array(
195
-      'handler' => 'views_handler_sort_numeric'
196
-    )
197
-  );
198
-  $data['host']['d_free'] = array(
199
-    'title' => bts('Free disk space', array(), NULL, 'boinc:host-details'),
200
-    'help' => t('The amount of disk space that is not in use.'),
201
-    'field' => array(
202
-      'handler' => 'views_handler_field_numeric',
203
-      'click sortable' => TRUE
204
-    ),
205
-    'filter' => array(
206
-      'handler' => 'views_handler_filter_numeric'
207
-    ),
208
-    'sort' => array(
209
-      'handler' => 'views_handler_sort_numeric'
210
-    )
211
-  );
212
-  $data['host']['d_total'] = array(
213
-    'title' => bts('Total disk space', array(), NULL, 'boinc:host-details'),
214
-    'help' => t('The size of the disk on which BOINC is installed.'),
215
-    'field' => array(
216
-      'handler' => 'views_handler_field_numeric',
217
-      'click sortable' => TRUE
218
-    ),
219
-    'filter' => array(
220
-      'handler' => 'views_handler_filter_numeric'
221
-    ),
222
-    'sort' => array(
223
-      'handler' => 'views_handler_sort_numeric'
224
-    )
225
-  );
226
-  $data['host']['domain_name'] = array(
227
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
228
-    'help' => t('The name of the host.'),
229
-    'field' => array(
230
-      'handler' => 'views_handler_field',
231
-      'click sortable' => TRUE
232
-    ),
233
-    'filter' => array(
234
-      'handler' => 'views_handler_filter_string'
235
-    ),
236
-    'sort' => array(
237
-      'handler' => 'views_handler_sort_string'
238
-    )
239
-  );
240
-  $data['host']['duration_correction_factor'] = array(
241
-    'title' => bts('Task duration correction factor', array(), NULL, 'boinc:host-details'),
242
-    'help' => t('Task duration correction factor.'),
243
-    'field' => array(
244
-      'handler' => 'views_handler_field_numeric',
245
-      'click sortable' => TRUE,
246
-      'float' => TRUE
247
-    ),
248
-    'filter' => array(
249
-      'handler' => 'views_handler_filter_numeric'
250
-    ),
251
-    'sort' => array(
252
-      'handler' => 'views_handler_sort_numeric'
253
-    )
254
-  );
255
-  $data['host']['expavg_credit'] = array(
256
-    'title' => bts('Avg. credit', array(), NULL, 'boinc:host-details'),
257
-    'help' => t('A decaying average of credit per day.'),
258
-    'field' => array(
259
-      'handler' => 'views_handler_field_numeric',
260
-      'click sortable' => TRUE,
261
-      'float' => TRUE
262
-    ),
263
-    'filter' => array(
264
-      'handler' => 'views_handler_filter_numeric'
265
-    ),
266
-    'sort' => array(
267
-      'handler' => 'views_handler_sort_numeric'
268
-    )
269
-  );
270
-  $data['host']['external_ip_addr'] = array(
271
-    'title' => bts('External IP address', array(), NULL, 'boinc:host-details'),
272
-    'help' => t('The IP address from which the host last communicated.'),
273
-    'field' => array(
274
-      'handler' => 'views_handler_field',
275
-      'click sortable' => TRUE
276
-    ),
277
-    'filter' => array(
278
-      'handler' => 'views_handler_filter_string'
279
-    ),
280
-    'sort' => array(
281
-      'handler' => 'views_handler_sort_string'
282
-    )
283
-  );
284
-  $data['host']['host_cpid'] = array(
285
-    'title' => bts('Cross project ID', array(), NULL, 'boinc:host-details'),
286
-    'help' => t('The consistent identifier of the host across projects.'),
287
-    'field' => array(
288
-      'handler' => 'views_handler_field',
289
-      'click sortable' => TRUE
290
-    ),
291
-    'filter' => array(
292
-      'handler' => 'views_handler_filter_string'
293
-    ),
294
-    'sort' => array(
295
-      'handler' => 'views_handler_sort_string'
296
-    )
297
-  );
298
-  $data['host']['last_ip_addr'] = array(
299
-    'title' => bts('Last IP address', array(), NULL, 'boinc:host-details'),
300
-    'help' => t('The IP address of the host at last communication.'),
301
-    'field' => array(
302
-      'handler' => 'views_handler_field',
303
-      'click sortable' => TRUE
304
-    ),
305
-    'filter' => array(
306
-      'handler' => 'views_handler_filter_string'
307
-    ),
308
-    'sort' => array(
309
-      'handler' => 'views_handler_sort_string'
310
-    )
311
-  );
312
-  $data['host']['m_cache'] = array(
313
-    'title' => bts('Cache', array(), NULL, 'boinc:host-details'),
314
-    'help' => t('The amount of cache on the processor(s).'),
315
-    'field' => array(
316
-      'handler' => 'views_handler_field_numeric',
317
-      'click sortable' => TRUE
318
-    ),
319
-    'filter' => array(
320
-      'handler' => 'views_handler_filter_numeric'
321
-    ),
322
-    'sort' => array(
323
-      'handler' => 'views_handler_sort_numeric'
324
-    )
325
-  );
326
-  $data['host']['m_nbytes'] = array(
327
-    'title' => bts('Memory', array(), NULL, 'boinc:host-details'),
328
-    'help' => t('The amount of memory installed.'),
329
-    'field' => array(
330
-      'handler' => 'views_handler_field_numeric',
331
-      'click sortable' => TRUE
332
-    ),
333
-    'filter' => array(
334
-      'handler' => 'views_handler_filter_numeric'
335
-    ),
336
-    'sort' => array(
337
-      'handler' => 'views_handler_sort_numeric'
338
-    )
339
-  );
340
-  $data['host']['m_swap'] = array(
341
-    'title' => bts('Swap space', array(), NULL, 'boinc:host-details'),
342
-    'help' => t('The amount of swap space configured.'),
343
-    'field' => array(
344
-      'handler' => 'views_handler_field_numeric',
345
-      'click sortable' => TRUE
346
-    ),
347
-    'filter' => array(
348
-      'handler' => 'views_handler_filter_numeric'
349
-    ),
350
-    'sort' => array(
351
-      'handler' => 'views_handler_sort_numeric'
352
-    )
353
-  );
354
-  $data['host']['max_results_day'] = array(
355
-    'title' => bts('Maximum daily WU quota per CPU', array(), NULL, 'boinc:host-details'),
356
-    'help' => t('The maximum number of workunits to be allocated per CPU.'),
357
-    'field' => array(
358
-      'handler' => 'views_handler_field_numeric',
359
-      'click sortable' => TRUE
360
-    ),
361
-    'filter' => array(
362
-      'handler' => 'views_handler_filter_numeric'
363
-    ),
364
-    'sort' => array(
365
-      'handler' => 'views_handler_sort_numeric'
366
-    )
367
-  );
368
-  $data['host']['n_bwdown'] = array(
369
-    'title' => bts('Average download rate', array(), NULL, 'boinc:host-details'),
370
-    'help' => t('The average rate at which new work is downloaded.'),
371
-    'field' => array(
372
-      'handler' => 'views_handler_field_numeric',
373
-      'click sortable' => TRUE,
374
-      'float' => TRUE
375
-    ),
376
-    'filter' => array(
377
-      'handler' => 'views_handler_filter_numeric'
378
-    ),
379
-    'sort' => array(
380
-      'handler' => 'views_handler_sort_numeric'
381
-    )
382
-  );
383
-  $data['host']['n_bwup'] = array(
384
-    'title' => bts('Average upload rate', array(), NULL, 'boinc:host-details'),
385
-    'help' => t('The average rate at which completed work is uploaded.'),
386
-    'field' => array(
387
-      'handler' => 'views_handler_field_numeric',
388
-      'click sortable' => TRUE,
389
-      'float' => TRUE
390
-    ),
391
-    'filter' => array(
392
-      'handler' => 'views_handler_filter_numeric'
393
-    ),
394
-    'sort' => array(
395
-      'handler' => 'views_handler_sort_numeric'
396
-    )
397
-  );
398
-  $data['host']['nsame_ip_addr'] = array(
399
-    'title' => bts('Same IP address count', array(), NULL, 'boinc:host-details'),
400
-    'help' => t('The number of times the last IP address.'),
401
-    'field' => array(
402
-      'handler' => 'views_handler_field',
403
-      'click sortable' => TRUE
404
-    ),
405
-    'filter' => array(
406
-      'handler' => 'views_handler_filter_string'
407
-    ),
408
-    'sort' => array(
409
-      'handler' => 'views_handler_sort_string'
410
-    )
411
-  );
412
-  $data['host']['on_frac'] = array(
413
-    'title' => bts('% of time BOINC client is running', array(), NULL, 'boinc:host-details'),
414
-    'help' => t('The percentage of time that the BOINC client is running.'),
415
-    'field' => array(
416
-      'handler' => 'views_handler_field_numeric',
417
-      'click sortable' => TRUE,
418
-      'float' => TRUE
419
-    ),
420
-    'filter' => array(
421
-      'handler' => 'views_handler_filter_numeric'
422
-    ),
423
-    'sort' => array(
424
-      'handler' => 'views_handler_sort_numeric'
425
-    )
426
-  );
427
-  $data['host']['os_name'] = array(
428
-    'title' => bts('Operating system', array(), NULL, 'boinc:host-details'),
429
-    'help' => t('The name of the host operating system.'),
430
-    'field' => array(
431
-      'handler' => 'views_handler_field',
432
-      'click sortable' => TRUE
433
-    ),
434
-    'filter' => array(
435
-      'handler' => 'views_handler_filter_string'
436
-    ),
437
-    'sort' => array(
438
-      'handler' => 'views_handler_sort_string'
439
-    )
440
-  );  
441
-  $data['host']['os_version'] = array(
442
-    'title' => bts('Operating system version', array(), NULL, 'boinc:host-details'),
443
-    'help' => t('The version of the host operating system.'),
444
-    'field' => array(
445
-      'handler' => 'views_handler_field',
446
-      'click sortable' => TRUE
447
-    ),
448
-    'filter' => array(
449
-      'handler' => 'views_handler_filter_string'
450
-    ),
451
-    'sort' => array(
452
-      'handler' => 'views_handler_sort_string'
453
-    )
454
-  );
455
-  $data['host']['p_fpops'] = array(
456
-    'title' => bts('Measured floating point speed', array(), NULL, 'boinc:host-details'),
457
-    'help' => t('The capability of the host in floating point operations per second.'),
458
-    'field' => array(
459
-      'handler' => 'views_handler_field_numeric',
460
-      'click sortable' => TRUE,
461
-      'float' => TRUE
462
-    ),
463
-    'filter' => array(
464
-      'handler' => 'views_handler_filter_numeric'
465
-    ),
466
-    'sort' => array(
467
-      'handler' => 'views_handler_sort_numeric'
468
-    )
469
-  );
470
-  $data['host']['p_iops'] = array(
471
-    'title' => bts('Measured integer speed', array(), NULL, 'boinc:host-details'),
472
-    'help' => t('The capability of the host in integer operations per second.'),
473
-    'field' => array(
474
-      'handler' => 'views_handler_field_numeric',
475
-      'click sortable' => TRUE,
476
-      'float' => TRUE
477
-    ),
478
-    'filter' => array(
479
-      'handler' => 'views_handler_filter_numeric'
480
-    ),
481
-    'sort' => array(
482
-      'handler' => 'views_handler_sort_numeric'
483
-    )
484
-  );
485
-  $data['host']['p_model'] = array(
486
-    'title' => bts('CPU model', array(), NULL, 'boinc:host-details'),
487
-    'help' => t('The model of the CPU in the host.'),
488
-    'field' => array(
489
-      'handler' => 'views_handler_field',
490
-      'click sortable' => TRUE
491
-    ),
492
-    'filter' => array(
493
-      'handler' => 'views_handler_filter_string'
494
-    ),
495
-    'sort' => array(
496
-      'handler' => 'views_handler_sort_string'
497
-    )
498
-  );
499
-  $data['host']['p_ncpus'] = array(
500
-    'title' => bts('Number of processors', array(), NULL, 'boinc:host-details'),
501
-    'help' => t('The count of CPU cores in the system.'),
502
-    'field' => array(
503
-      'handler' => 'views_handler_field',
504
-      'click sortable' => TRUE
505
-    ),
506
-    'filter' => array(
507
-      'handler' => 'views_handler_filter_string'
508
-    ),
509
-    'sort' => array(
510
-      'handler' => 'views_handler_sort_string'
511
-    )
512
-  );
513
-  $data['host']['p_vendor'] = array(
514
-    'title' => bts('CPU', array(), NULL, 'boinc:host-details'),
515
-    'help' => t('The manufacturer of the CPU in the host.'),
516
-    'field' => array(
517
-      'handler' => 'views_handler_field',
518
-      'click sortable' => TRUE
519
-    ),
520
-    'filter' => array(
521
-      'handler' => 'views_handler_filter_string'
522
-    ),
523
-    'sort' => array(
524
-      'handler' => 'views_handler_sort_string'
525
-    )
526
-  );
527
-  $data['host']['rpc_seqno'] = array(
528
-    'title' => bts('Number of times client has contacted server', array(), NULL, 'boinc:host-details'),
529
-    'help' => t('The number of times the client has contacted the server.'),
530
-    'field' => array(
531
-      'handler' => 'views_handler_field_numeric',
532
-      'click sortable' => TRUE
533
-    ),
534
-    'filter' => array(
535
-      'handler' => 'views_handler_filter_numeric'
536
-    ),
537
-    'sort' => array(
538
-      'handler' => 'views_handler_sort_numeric'
539
-    )
540
-  );
541
-  $data['host']['rpc_time'] = array(
542
-    'title' => bts('Last contact', array(), NULL, 'boinc:host-details'),
543
-    'help' => t('The time of the last RPC contact with the host.'),
544
-    'field' => array(
545
-      'handler' => 'views_handler_field_date',
546
-      'click sortable' => TRUE
547
-    ),
548
-    'filter' => array(
549
-      'handler' => 'views_handler_filter_date'
550
-    ),
551
-    'sort' => array(
552
-      'handler' => 'views_handler_sort_date'
553
-    )
554
-  );
555
-  $data['host']['serialnum'] = array(
556
-    'title' => bts('Serial number', array(), NULL, 'boinc:host-details'),
557
-    'help' => t('Contains the release number of the BOINC application in use and the GPU of the host.'),
558
-    'field' => array(
559
-      'handler' => 'views_handler_field',
560
-      'click sortable' => TRUE
561
-    ),
562
-    'filter' => array(
563
-      'handler' => 'views_handler_filter_string'
564
-    ),
565
-    'sort' => array(
566
-      'handler' => 'views_handler_sort_string'
567
-    )
568
-  );
569
-  $data['host']['timezone'] = array(
570
-    'title' => bts('Timezone', array(), NULL, 'boinc:host-details'),
571
-    'help' => t('The UTC offset of the local time.'),
572
-    'field' => array(
573
-      'handler' => 'views_handler_field_numeric',
574
-      'click sortable' => TRUE
575
-    ),
576
-    'filter' => array(
577
-      'handler' => 'views_handler_filter_numeric'
578
-    ),
579
-    'sort' => array(
580
-      'handler' => 'views_handler_sort_numeric'
581
-    )
582
-  );
583
-  $data['host']['total_credit'] = array(
584
-    'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
585
-    'help' => t('The total accumulated BOINC credit for a host.'),
586
-    'field' => array(
587
-      'handler' => 'views_handler_field_numeric',
588
-      'click sortable' => TRUE,
589
-      'float' => TRUE
590
-    ),
591
-    'filter' => array(
592
-      'handler' => 'views_handler_filter_numeric'
593
-    ),
594
-    'sort' => array(
595
-      'handler' => 'views_handler_sort_numeric'
596
-    )
597
-  );
124
+$data['host']['active_frac'] = array(
125
+'title' => bts('While BOINC running, % of time work is allowed', array(), NULL, 'boinc:host-details'),
126
+'help' => t('The percentage of time that work is allowed.'),
127
+'field' => array(
128
+  'handler' => 'views_handler_field_numeric',
129
+  'click sortable' => TRUE,
130
+  'float' => TRUE
131
+),
132
+'filter' => array(
133
+  'handler' => 'views_handler_filter_numeric'
134
+),
135
+'sort' => array(
136
+  'handler' => 'views_handler_sort_numeric'
137
+)
138
+);
139
+$data['host']['avg_turnaround'] = array(
140
+'title' => bts('Average turnaround time', array(), NULL, 'boinc:host-details'),
141
+'help' => t('The average time required for work to be completed.'),
142
+'field' => array(
143
+  'handler' => 'views_handler_field_numeric',
144
+  'click sortable' => TRUE,
145
+  'float' => TRUE
146
+),
147
+'filter' => array(
148
+  'handler' => 'views_handler_filter_numeric'
149
+),
150
+'sort' => array(
151
+  'handler' => 'views_handler_sort_numeric'
152
+)
153
+);
154
+$data['host']['create_time'] = array(
155
+'title' => bts('Created', array(), NULL, 'boinc:host-details'),
156
+'help' => t('The time the host record was created.'),
157
+'field' => array(
158
+  'handler' => 'views_handler_field_date',
159
+  'click sortable' => TRUE
160
+),
161
+'filter' => array(
162
+  'handler' => 'views_handler_filter_date'
163
+),
164
+'sort' => array(
165
+  'handler' => 'views_handler_sort_date'
166
+)
167
+);
168
+$data['host']['connected_frac'] = array(
169
+'title' => bts('While BOINC running, % of time host has an Internet connection', array(), NULL, 'boinc:host-details'),
170
+'help' => t('The percentage of time that the host has an Internet connection.'),
171
+'field' => array(
172
+  'handler' => 'views_handler_field_numeric',
173
+  'click sortable' => TRUE,
174
+  'float' => TRUE
175
+),
176
+'filter' => array(
177
+  'handler' => 'views_handler_filter_numeric'
178
+),
179
+'sort' => array(
180
+  'handler' => 'views_handler_sort_numeric'
181
+)
182
+);
183
+$data['host']['cpu_efficiency'] = array(
184
+'title' => bts('Average CPU efficiency', array(), NULL, 'boinc:host-details'),
185
+'help' => t('The average efficiency of the host CPU.'),
186
+'field' => array(
187
+  'handler' => 'views_handler_field_numeric',
188
+  'click sortable' => TRUE,
189
+  'float' => TRUE
190
+),
191
+'filter' => array(
192
+  'handler' => 'views_handler_filter_numeric'
193
+),
194
+'sort' => array(
195
+  'handler' => 'views_handler_sort_numeric'
196
+)
197
+);
198
+$data['host']['d_free'] = array(
199
+'title' => bts('Free disk space', array(), NULL, 'boinc:host-details'),
200
+'help' => t('The amount of disk space that is not in use.'),
201
+'field' => array(
202
+  'handler' => 'views_handler_field_numeric',
203
+  'click sortable' => TRUE
204
+),
205
+'filter' => array(
206
+  'handler' => 'views_handler_filter_numeric'
207
+),
208
+'sort' => array(
209
+  'handler' => 'views_handler_sort_numeric'
210
+)
211
+);
212
+$data['host']['d_total'] = array(
213
+'title' => bts('Total disk space', array(), NULL, 'boinc:host-details'),
214
+'help' => t('The size of the disk on which BOINC is installed.'),
215
+'field' => array(
216
+  'handler' => 'views_handler_field_numeric',
217
+  'click sortable' => TRUE
218
+),
219
+'filter' => array(
220
+  'handler' => 'views_handler_filter_numeric'
221
+),
222
+'sort' => array(
223
+  'handler' => 'views_handler_sort_numeric'
224
+)
225
+);
226
+$data['host']['domain_name'] = array(
227
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
228
+'help' => t('The name of the host.'),
229
+'field' => array(
230
+  'handler' => 'views_handler_field',
231
+  'click sortable' => TRUE
232
+),
233
+'filter' => array(
234
+  'handler' => 'views_handler_filter_string'
235
+),
236
+'sort' => array(
237
+  'handler' => 'views_handler_sort_string'
238
+)
239
+);
240
+$data['host']['duration_correction_factor'] = array(
241
+'title' => bts('Task duration correction factor', array(), NULL, 'boinc:host-details'),
242
+'help' => t('Task duration correction factor.'),
243
+'field' => array(
244
+  'handler' => 'views_handler_field_numeric',
245
+  'click sortable' => TRUE,
246
+  'float' => TRUE
247
+),
248
+'filter' => array(
249
+  'handler' => 'views_handler_filter_numeric'
250
+),
251
+'sort' => array(
252
+  'handler' => 'views_handler_sort_numeric'
253
+)
254
+);
255
+$data['host']['expavg_credit'] = array(
256
+'title' => bts('Avg. credit', array(), NULL, 'boinc:host-details'),
257
+'help' => t('A decaying average of credit per day.'),
258
+'field' => array(
259
+  'handler' => 'views_handler_field_numeric',
260
+  'click sortable' => TRUE,
261
+  'float' => TRUE
262
+),
263
+'filter' => array(
264
+  'handler' => 'views_handler_filter_numeric'
265
+),
266
+'sort' => array(
267
+  'handler' => 'views_handler_sort_numeric'
268
+)
269
+);
270
+$data['host']['external_ip_addr'] = array(
271
+'title' => bts('External IP address', array(), NULL, 'boinc:host-details'),
272
+'help' => t('The IP address from which the host last communicated.'),
273
+'field' => array(
274
+  'handler' => 'views_handler_field',
275
+  'click sortable' => TRUE
276
+),
277
+'filter' => array(
278
+  'handler' => 'views_handler_filter_string'
279
+),
280
+'sort' => array(
281
+  'handler' => 'views_handler_sort_string'
282
+)
283
+);
284
+$data['host']['host_cpid'] = array(
285
+'title' => bts('Cross project ID', array(), NULL, 'boinc:host-details'),
286
+'help' => t('The consistent identifier of the host across projects.'),
287
+'field' => array(
288
+  'handler' => 'views_handler_field',
289
+  'click sortable' => TRUE
290
+),
291
+'filter' => array(
292
+  'handler' => 'views_handler_filter_string'
293
+),
294
+'sort' => array(
295
+  'handler' => 'views_handler_sort_string'
296
+)
297
+);
298
+$data['host']['last_ip_addr'] = array(
299
+'title' => bts('Last IP address', array(), NULL, 'boinc:host-details'),
300
+'help' => t('The IP address of the host at last communication.'),
301
+'field' => array(
302
+  'handler' => 'views_handler_field',
303
+  'click sortable' => TRUE
304
+),
305
+'filter' => array(
306
+  'handler' => 'views_handler_filter_string'
307
+),
308
+'sort' => array(
309
+  'handler' => 'views_handler_sort_string'
310
+)
311
+);
312
+$data['host']['m_cache'] = array(
313
+'title' => bts('Cache', array(), NULL, 'boinc:host-details'),
314
+'help' => t('The amount of cache on the processor(s).'),
315
+'field' => array(
316
+  'handler' => 'views_handler_field_numeric',
317
+  'click sortable' => TRUE
318
+),
319
+'filter' => array(
320
+  'handler' => 'views_handler_filter_numeric'
321
+),
322
+'sort' => array(
323
+  'handler' => 'views_handler_sort_numeric'
324
+)
325
+);
326
+$data['host']['m_nbytes'] = array(
327
+'title' => bts('Memory', array(), NULL, 'boinc:host-details'),
328
+'help' => t('The amount of memory installed.'),
329
+'field' => array(
330
+  'handler' => 'views_handler_field_numeric',
331
+  'click sortable' => TRUE
332
+),
333
+'filter' => array(
334
+  'handler' => 'views_handler_filter_numeric'
335
+),
336
+'sort' => array(
337
+  'handler' => 'views_handler_sort_numeric'
338
+)
339
+);
340
+$data['host']['m_swap'] = array(
341
+'title' => bts('Swap space', array(), NULL, 'boinc:host-details'),
342
+'help' => t('The amount of swap space configured.'),
343
+'field' => array(
344
+  'handler' => 'views_handler_field_numeric',
345
+  'click sortable' => TRUE
346
+),
347
+'filter' => array(
348
+  'handler' => 'views_handler_filter_numeric'
349
+),
350
+'sort' => array(
351
+  'handler' => 'views_handler_sort_numeric'
352
+)
353
+);
354
+$data['host']['max_results_day'] = array(
355
+'title' => bts('Maximum daily WU quota per CPU', array(), NULL, 'boinc:host-details'),
356
+'help' => t('The maximum number of workunits to be allocated per CPU.'),
357
+'field' => array(
358
+  'handler' => 'views_handler_field_numeric',
359
+  'click sortable' => TRUE
360
+),
361
+'filter' => array(
362
+  'handler' => 'views_handler_filter_numeric'
363
+),
364
+'sort' => array(
365
+  'handler' => 'views_handler_sort_numeric'
366
+)
367
+);
368
+$data['host']['n_bwdown'] = array(
369
+'title' => bts('Average download rate', array(), NULL, 'boinc:host-details'),
370
+'help' => t('The average rate at which new work is downloaded.'),
371
+'field' => array(
372
+  'handler' => 'views_handler_field_numeric',
373
+  'click sortable' => TRUE,
374
+  'float' => TRUE
375
+),
376
+'filter' => array(
377
+  'handler' => 'views_handler_filter_numeric'
378
+),
379
+'sort' => array(
380
+  'handler' => 'views_handler_sort_numeric'
381
+)
382
+);
383
+$data['host']['n_bwup'] = array(
384
+'title' => bts('Average upload rate', array(), NULL, 'boinc:host-details'),
385
+'help' => t('The average rate at which completed work is uploaded.'),
386
+'field' => array(
387
+  'handler' => 'views_handler_field_numeric',
388
+  'click sortable' => TRUE,
389
+  'float' => TRUE
390
+),
391
+'filter' => array(
392
+  'handler' => 'views_handler_filter_numeric'
393
+),
394
+'sort' => array(
395
+  'handler' => 'views_handler_sort_numeric'
396
+)
397
+);
398
+$data['host']['nsame_ip_addr'] = array(
399
+'title' => bts('Same IP address count', array(), NULL, 'boinc:host-details'),
400
+'help' => t('The number of times the last IP address.'),
401
+'field' => array(
402
+  'handler' => 'views_handler_field',
403
+  'click sortable' => TRUE
404
+),
405
+'filter' => array(
406
+  'handler' => 'views_handler_filter_string'
407
+),
408
+'sort' => array(
409
+  'handler' => 'views_handler_sort_string'
410
+)
411
+);
412
+$data['host']['on_frac'] = array(
413
+'title' => bts('% of time BOINC client is running', array(), NULL, 'boinc:host-details'),
414
+'help' => t('The percentage of time that the BOINC client is running.'),
415
+'field' => array(
416
+  'handler' => 'views_handler_field_numeric',
417
+  'click sortable' => TRUE,
418
+  'float' => TRUE
419
+),
420
+'filter' => array(
421
+  'handler' => 'views_handler_filter_numeric'
422
+),
423
+'sort' => array(
424
+  'handler' => 'views_handler_sort_numeric'
425
+)
426
+);
427
+$data['host']['os_name'] = array(
428
+'title' => bts('Operating system', array(), NULL, 'boinc:host-details'),
429
+'help' => t('The name of the host operating system.'),
430
+'field' => array(
431
+  'handler' => 'views_handler_field',
432
+  'click sortable' => TRUE
433
+),
434
+'filter' => array(
435
+  'handler' => 'views_handler_filter_string'
436
+),
437
+'sort' => array(
438
+  'handler' => 'views_handler_sort_string'
439
+)
440
+);  
441
+$data['host']['os_version'] = array(
442
+'title' => bts('Operating system version', array(), NULL, 'boinc:host-details'),
443
+'help' => t('The version of the host operating system.'),
444
+'field' => array(
445
+  'handler' => 'views_handler_field',
446
+  'click sortable' => TRUE
447
+),
448
+'filter' => array(
449
+  'handler' => 'views_handler_filter_string'
450
+),
451
+'sort' => array(
452
+  'handler' => 'views_handler_sort_string'
453
+)
454
+);
455
+$data['host']['p_fpops'] = array(
456
+'title' => bts('Measured floating point speed', array(), NULL, 'boinc:host-details'),
457
+'help' => t('The capability of the host in floating point operations per second.'),
458
+'field' => array(
459
+  'handler' => 'views_handler_field_numeric',
460
+  'click sortable' => TRUE,
461
+  'float' => TRUE
462
+),
463
+'filter' => array(
464
+  'handler' => 'views_handler_filter_numeric'
465
+),
466
+'sort' => array(
467
+  'handler' => 'views_handler_sort_numeric'
468
+)
469
+);
470
+$data['host']['p_iops'] = array(
471
+'title' => bts('Measured integer speed', array(), NULL, 'boinc:host-details'),
472
+'help' => t('The capability of the host in integer operations per second.'),
473
+'field' => array(
474
+  'handler' => 'views_handler_field_numeric',
475
+  'click sortable' => TRUE,
476
+  'float' => TRUE
477
+),
478
+'filter' => array(
479
+  'handler' => 'views_handler_filter_numeric'
480
+),
481
+'sort' => array(
482
+  'handler' => 'views_handler_sort_numeric'
483
+)
484
+);
485
+$data['host']['p_model'] = array(
486
+'title' => bts('CPU model', array(), NULL, 'boinc:host-details'),
487
+'help' => t('The model of the CPU in the host.'),
488
+'field' => array(
489
+  'handler' => 'views_handler_field',
490
+  'click sortable' => TRUE
491
+),
492
+'filter' => array(
493
+  'handler' => 'views_handler_filter_string'
494
+),
495
+'sort' => array(
496
+  'handler' => 'views_handler_sort_string'
497
+)
498
+);
499
+$data['host']['p_ncpus'] = array(
500
+'title' => bts('Number of processors', array(), NULL, 'boinc:host-details'),
501
+'help' => t('The count of CPU cores in the system.'),
502
+'field' => array(
503
+  'handler' => 'views_handler_field',
504
+  'click sortable' => TRUE
505
+),
506
+'filter' => array(
507
+  'handler' => 'views_handler_filter_string'
508
+),
509
+'sort' => array(
510
+  'handler' => 'views_handler_sort_string'
511
+)
512
+);
513
+$data['host']['p_vendor'] = array(
514
+'title' => bts('CPU', array(), NULL, 'boinc:host-details'),
515
+'help' => t('The manufacturer of the CPU in the host.'),
516
+'field' => array(
517
+  'handler' => 'views_handler_field',
518
+  'click sortable' => TRUE
519
+),
520
+'filter' => array(
521
+  'handler' => 'views_handler_filter_string'
522
+),
523
+'sort' => array(
524
+  'handler' => 'views_handler_sort_string'
525
+)
526
+);
527
+$data['host']['rpc_seqno'] = array(
528
+'title' => bts('Number of times client has contacted server', array(), NULL, 'boinc:host-details'),
529
+'help' => t('The number of times the client has contacted the server.'),
530
+'field' => array(
531
+  'handler' => 'views_handler_field_numeric',
532
+  'click sortable' => TRUE
533
+),
534
+'filter' => array(
535
+  'handler' => 'views_handler_filter_numeric'
536
+),
537
+'sort' => array(
538
+  'handler' => 'views_handler_sort_numeric'
539
+)
540
+);
541
+$data['host']['rpc_time'] = array(
542
+'title' => bts('Last contact', array(), NULL, 'boinc:host-details'),
543
+'help' => t('The time of the last RPC contact with the host.'),
544
+'field' => array(
545
+  'handler' => 'views_handler_field_date',
546
+  'click sortable' => TRUE
547
+),
548
+'filter' => array(
549
+  'handler' => 'views_handler_filter_date'
550
+),
551
+'sort' => array(
552
+  'handler' => 'views_handler_sort_date'
553
+)
554
+);
555
+$data['host']['serialnum'] = array(
556
+'title' => bts('Serial number', array(), NULL, 'boinc:host-details'),
557
+'help' => t('Contains the release number of the BOINC application in use and the GPU of the host.'),
558
+'field' => array(
559
+  'handler' => 'views_handler_field',
560
+  'click sortable' => TRUE
561
+),
562
+'filter' => array(
563
+  'handler' => 'views_handler_filter_string'
564
+),
565
+'sort' => array(
566
+  'handler' => 'views_handler_sort_string'
567
+)
568
+);
569
+$data['host']['timezone'] = array(
570
+'title' => bts('Timezone', array(), NULL, 'boinc:host-details'),
571
+'help' => t('The UTC offset of the local time.'),
572
+'field' => array(
573
+  'handler' => 'views_handler_field_numeric',
574
+  'click sortable' => TRUE
575
+),
576
+'filter' => array(
577
+  'handler' => 'views_handler_filter_numeric'
578
+),
579
+'sort' => array(
580
+  'handler' => 'views_handler_sort_numeric'
581
+)
582
+);
583
+$data['host']['total_credit'] = array(
584
+'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
585
+'help' => t('The total accumulated BOINC credit for a host.'),
586
+'field' => array(
587
+  'handler' => 'views_handler_field_numeric',
588
+  'click sortable' => TRUE,
589
+  'float' => TRUE
590
+),
591
+'filter' => array(
592
+  'handler' => 'views_handler_filter_numeric'
593
+),
594
+'sort' => array(
595
+  'handler' => 'views_handler_sort_numeric'
596
+)
597
+);
598 598
   
599
-  // ------------------------------------------------------------------------------------------------
600
-  // Definition for platform table
601
-  // ------------------------------------------------------------------------------------------------
599
+// ------------------------------------------------------------------------------------------------
600
+// Definition for platform table
601
+// ------------------------------------------------------------------------------------------------
602 602
   
603
-  $data['platform']['table']['group'] = t('BOINC');
604
-  $data['platform']['table']['base'] = array(
605
-      'field' => 'id',
606
-      'title' => t('BOINC platform'),
607
-      'help' => t('Operating system platforms'),
608
-      'database' => 'boinc_ro'
609
-  );
603
+$data['platform']['table']['group'] = t('BOINC');
604
+$data['platform']['table']['base'] = array(
605
+  'field' => 'id',
606
+  'title' => t('BOINC platform'),
607
+  'help' => t('Operating system platforms'),
608
+  'database' => 'boinc_ro'
609
+);
610 610
   
611
-  // Primary keys allowed as arguments
611
+// Primary keys allowed as arguments
612 612
 
613
-  $data['platform']['id'] = array(
614
-    'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
615
-    'help' => t('The ID number of the platform.'),
616
-    'field' => array(
617
-      'handler' => 'views_handler_field_numeric',
618
-      'click sortable' => TRUE
619
-    ),
620
-    'argument' => array(
621
-      'handler' => 'views_handler_argument',
622
-      'name field' => 'title',
623
-      'numeric' => TRUE,
624
-      'validate type' => 'id'
625
-    ),
626
-    'filter' => array(
627
-      'handler' => 'views_handler_filter_numeric'
628
-    ),
629
-    'sort' => array(
630
-      'handler' => 'views_handler_sort_numeric'
631
-    )
632
-  );
613
+$data['platform']['id'] = array(
614
+'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
615
+'help' => t('The ID number of the platform.'),
616
+'field' => array(
617
+  'handler' => 'views_handler_field_numeric',
618
+  'click sortable' => TRUE
619
+),
620
+'argument' => array(
621
+  'handler' => 'views_handler_argument',
622
+  'name field' => 'title',
623
+  'numeric' => TRUE,
624
+  'validate type' => 'id'
625
+),
626
+'filter' => array(
627
+  'handler' => 'views_handler_filter_numeric'
628
+),
629
+'sort' => array(
630
+  'handler' => 'views_handler_sort_numeric'
631
+)
632
+);
633 633
   
634
-  // Descriptions of app fields (alphabetized)
634
+// Descriptions of app fields (alphabetized)
635 635
   
636
-  $data['platform']['name'] = array(
637
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
638
-    'help' => t('The name of the platform.'),
639
-    'field' => array(
640
-      'handler' => 'views_handler_field',
641
-      'click sortable' => TRUE
642
-    ),
643
-    'filter' => array(
644
-      'handler' => 'views_handler_filter_string'
645
-    ),
646
-    'sort' => array(
647
-      'handler' => 'views_handler_sort_string'
648
-    )
649
-  );
636
+$data['platform']['name'] = array(
637
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
638
+'help' => t('The name of the platform.'),
639
+'field' => array(
640
+  'handler' => 'views_handler_field',
641
+  'click sortable' => TRUE
642
+),
643
+'filter' => array(
644
+  'handler' => 'views_handler_filter_string'
645
+),
646
+'sort' => array(
647
+  'handler' => 'views_handler_sort_string'
648
+)
649
+);
650 650
   
651
-  // ------------------------------------------------------------------------------------------------
652
-  // Definition for result (task) table
653
-  // ------------------------------------------------------------------------------------------------
651
+// ------------------------------------------------------------------------------------------------
652
+// Definition for result (task) table
653
+// ------------------------------------------------------------------------------------------------
654 654
   
655
-  $data['result']['table']['group'] = t('BOINC');
656
-  $data['result']['table']['base'] = array(
657
-      'field' => 'id',
658
-      'title' => t('BOINC result'),
659
-      'help' => t('Results produced by BOINC'),
660
-      'database' => 'boinc_ro'
661
-  );
655
+$data['result']['table']['group'] = t('BOINC');
656
+$data['result']['table']['base'] = array(
657
+  'field' => 'id',
658
+  'title' => t('BOINC result'),
659
+  'help' => t('Results produced by BOINC'),
660
+  'database' => 'boinc_ro'
661
+);
662 662
   
663
-  // Create implicit relationships to the user, workunit, and host tables
663
+// Create implicit relationships to the user, workunit, and host tables
664 664
   
665
-  $data['result']['table']['join'] = array(
666
-    'user' => array(
667
-      'left_field' => 'id',
668
-      'field' => 'userid'
669
-    ),
670
-    'workunit' => array(
671
-      'left_field' => 'id',
672
-      'field' => 'workunitid'
673
-    ),
674
-    'host' => array(
675
-      'left_field' => 'id',
676
-      'field' => 'hostid'
677
-    )
678
-  );
665
+$data['result']['table']['join'] = array(
666
+'user' => array(
667
+  'left_field' => 'id',
668
+  'field' => 'userid'
669
+),
670
+'workunit' => array(
671
+  'left_field' => 'id',
672
+  'field' => 'workunitid'
673
+),
674
+'host' => array(
675
+  'left_field' => 'id',
676
+  'field' => 'hostid'
677
+)
678
+);
679 679
   
680
-  // Primary keys allowed as arguments
680
+// Primary keys allowed as arguments
681 681
 
682
-  $data['result']['id'] = array(
683
-    'title' => bts('Task ID', array(), NULL, 'boinc:task-details'),
684
-    'help' => t('The ID number of this result.'),
685
-    'field' => array(
686
-      'handler' => 'views_handler_field_numeric',
687
-      'click sortable' => TRUE
688
-    ),
689
-    'argument' => array(
690
-      'handler' => 'views_handler_argument',
691
-      'name field' => 'title',
692
-      'numeric' => TRUE,
693
-      'validate type' => 'id'
694
-    ),
695
-    'filter' => array(
696
-      'handler' => 'views_handler_filter_numeric'
697
-    ),
698
-    'sort' => array(
699
-      'handler' => 'views_handler_sort_numeric'
700
-    )
701
-  );
682
+$data['result']['id'] = array(
683
+'title' => bts('Task ID', array(), NULL, 'boinc:task-details'),
684
+'help' => t('The ID number of this result.'),
685
+'field' => array(
686
+  'handler' => 'views_handler_field_numeric',
687
+  'click sortable' => TRUE
688
+),
689
+'argument' => array(
690
+  'handler' => 'views_handler_argument',
691
+  'name field' => 'title',
692
+  'numeric' => TRUE,
693
+  'validate type' => 'id'
694
+),
695
+'filter' => array(
696
+  'handler' => 'views_handler_filter_numeric'
697
+),
698
+'sort' => array(
699
+  'handler' => 'views_handler_sort_numeric'
700
+)
701
+);
702 702
   
703
-  // Foreign key fields
703
+// Foreign key fields
704 704
   
705
-  $data['result']['userid'] = array(
706
-    'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
707
-    'help' => t('The owner of this result.'),
708
-    // Foreign key to the {user} table
709
-    'argument' => array(
710
-      'handler' => 'views_handler_argument_boincuser_id',
711
-      'name field' => 'title',
712
-      'numeric' => TRUE,
713
-      'validate type' => 'id'
714
-    ),
715
-    'relationship' => array(
716
-      'base' => 'user',
717
-      'field' => 'userid',
718
-      'handler' => 'views_handler_relationship',
719
-      'label' => t('User')
720
-    )
721
-  );
722
-  $data['result']['workunitid'] = array(
723
-    'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
724
-    'help' => t('The workunit associated with this result.'),
725
-    // Foreign key to the {workunit} table
726
-    'argument' => array(
727
-      'handler' => 'views_handler_argument',
728
-      'name field' => 'title',
729
-      'numeric' => TRUE,
730
-      'validate type' => 'id'
731
-    ),
732
-    'relationship' => array(
733
-      'base' => 'workunit',
734
-      'field' => 'workunitid',
735
-      'handler' => 'views_handler_relationship',
736
-      'label' => t('Workunit')
737
-    ),
738
-    'field' => array(
739
-      'handler' => 'views_handler_field_numeric',
740
-      'click sortable' => TRUE
741
-    ),
742
-    'filter' => array(
743
-      'handler' => 'views_handler_filter_numeric'
744
-    ),
745
-    'sort' => array(
746
-      'handler' => 'views_handler_sort_numeric'
747
-    )
748
-  );
749
-  $data['result']['hostid'] = array(
750
-    'title' => bts('Host ID', array(), NULL, 'boinc:task-details'),
751
-    'help' => t('The host associated with this result.'),
752
-    // Foreign key to the {host} table
753
-    'argument' => array(
754
-      'handler' => 'views_handler_argument',
755
-      'name field' => 'title',
756
-      'numeric' => TRUE,
757
-      'validate type' => 'id'
758
-    ),
759
-    'relationship' => array(
760
-      'base' => 'host',
761
-      'field' => 'hostid',
762
-      'handler' => 'views_handler_relationship',
763
-      'label' => t('Host')
764
-    ),
765
-    'field' => array(
766
-      'handler' => 'views_handler_field_numeric',
767
-      'click sortable' => TRUE
768
-    ),
769
-    'filter' => array(
770
-      'handler' => 'views_handler_filter_numeric'
771
-    ),
772
-    'sort' => array(
773
-      'handler' => 'views_handler_sort_numeric'
774
-    )
775
-  );
705
+$data['result']['userid'] = array(
706
+'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
707
+'help' => t('The owner of this result.'),
708
+// Foreign key to the {user} table
709
+'argument' => array(
710
+  'handler' => 'views_handler_argument_boincuser_id',
711
+  'name field' => 'title',
712
+  'numeric' => TRUE,
713
+  'validate type' => 'id'
714
+),
715
+'relationship' => array(
716
+  'base' => 'user',
717
+  'field' => 'userid',
718
+  'handler' => 'views_handler_relationship',
719
+  'label' => t('User')
720
+)
721
+);
722
+$data['result']['workunitid'] = array(
723
+'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
724
+'help' => t('The workunit associated with this result.'),
725
+// Foreign key to the {workunit} table
726
+'argument' => array(
727
+  'handler' => 'views_handler_argument',
728
+  'name field' => 'title',
729
+  'numeric' => TRUE,
730
+  'validate type' => 'id'
731
+),
732
+'relationship' => array(
733
+  'base' => 'workunit',
734
+  'field' => 'workunitid',
735
+  'handler' => 'views_handler_relationship',
736
+  'label' => t('Workunit')
737
+),
738
+'field' => array(
739
+  'handler' => 'views_handler_field_numeric',
740
+  'click sortable' => TRUE
741
+),
742
+'filter' => array(
743
+  'handler' => 'views_handler_filter_numeric'
744
+),
745
+'sort' => array(
746
+  'handler' => 'views_handler_sort_numeric'
747
+)
748
+);
749
+$data['result']['hostid'] = array(
750
+'title' => bts('Host ID', array(), NULL, 'boinc:task-details'),
751
+'help' => t('The host associated with this result.'),
752
+// Foreign key to the {host} table
753
+'argument' => array(
754
+  'handler' => 'views_handler_argument',
755
+  'name field' => 'title',
756
+  'numeric' => TRUE,
757
+  'validate type' => 'id'
758
+),
759
+'relationship' => array(
760
+  'base' => 'host',
761
+  'field' => 'hostid',
762
+  'handler' => 'views_handler_relationship',
763
+  'label' => t('Host')
764
+),
765
+'field' => array(
766
+  'handler' => 'views_handler_field_numeric',
767
+  'click sortable' => TRUE
768
+),
769
+'filter' => array(
770
+  'handler' => 'views_handler_filter_numeric'
771
+),
772
+'sort' => array(
773
+  'handler' => 'views_handler_sort_numeric'
774
+)
775
+);
776 776
   
777
-  // Descriptions of result fields (alphabetized)
777
+// Descriptions of result fields (alphabetized)
778 778
   
779
-  $data['result']['appid'] = array(
780
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
781
-    'help' => t('The ID number of the application.'),
782
-    'field' => array(
783
-      'handler' => 'views_handler_field_numeric',
784
-      'click sortable' => TRUE
785
-    ),
786
-    'filter' => array(
787
-      'handler' => 'views_handler_filter_numeric'
788
-    ),
789
-    'sort' => array(
790
-      'handler' => 'views_handler_sort_numeric'
791
-    )
792
-  );
793
-  $data['result']['app_version_id'] = array(
794
-    'title' => bts('Application version', array(), NULL, 'boinc:task-details'),
795
-    'help' => t('The version number of the application.'),
796
-    'field' => array(
797
-      'handler' => 'views_handler_field_numeric',
798
-      'click sortable' => TRUE
799
-    ),
800
-    'filter' => array(
801
-      'handler' => 'views_handler_filter_numeric'
802
-    ),
803
-    'sort' => array(
804
-      'handler' => 'views_handler_sort_numeric'
805
-    )
806
-  );
807
-  $data['result']['claimed_credit'] = array(
808
-    'title' => bts('Claimed credit', array(), NULL, 'boinc:task-details'),
809
-    'help' => t('The credit claimed for this result.'),
810
-    'field' => array(
811
-      'handler' => 'views_handler_field_numeric',
812
-      'click sortable' => TRUE,
813
-      'float' => TRUE
814
-    ),
815
-    'filter' => array(
816
-      'handler' => 'views_handler_filter_numeric'
817
-    ),
818
-    'sort' => array(
819
-      'handler' => 'views_handler_sort_numeric'
820
-    )
821
-  );
822
-  $data['result']['client_state'] = array(
823
-    'title' => bts('Client state', array(), NULL, 'boinc:task-details'),
824
-    'help' => t('The state of the task on the client side.'),
825
-    'field' => array(
826
-      'handler' => 'views_handler_field_numeric',
827
-      'click sortable' => TRUE
828
-    ),
829
-    'filter' => array(
830
-      'handler' => 'views_handler_filter_numeric'
831
-    ),
832
-    'sort' => array(
833
-      'handler' => 'views_handler_sort_numeric'
834
-    )
835
-  );
836
-  $data['result']['cpu_time'] = array(
837
-    'title' => bts('CPU time', array(), NULL, 'boinc:task-details'),
838
-    'help' => t('The CPU time spent on the task.'),
839
-    'field' => array(
840
-      'handler' => 'views_handler_field_numeric',
841
-      'click sortable' => TRUE,
842
-      'float' => TRUE
843
-    ),
844
-    'filter' => array(
845
-      'handler' => 'views_handler_filter_numeric'
846
-    ),
847
-    'sort' => array(
848
-      'handler' => 'views_handler_sort_numeric'
849
-    )
850
-  );
851
-  $data['result']['create_time'] = array(
852
-    'title' => bts('Created', array(), NULL, 'boinc:task-details:-1:ignoreoverwrite'),
853
-    'help' => t('The time that the task was created.'),
854
-    'field' => array(
855
-      'handler' => 'views_handler_field_date',
856
-      'click sortable' => TRUE
857
-    ),
858
-    'filter' => array(
859
-      'handler' => 'views_handler_filter_date'
860
-    ),
861
-    'sort' => array(
862
-      'handler' => 'views_handler_sort_date'
863
-    )
864
-  );
865
-  $data['result']['elapsed_time'] = array(
866
-    'title' => bts('Run time', array(), NULL, 'boinc:task-details'),
867
-    'help' => t('The run time of the task.'),
868
-    'field' => array(
869
-      'handler' => 'views_handler_field_numeric',
870
-      'click sortable' => TRUE,
871
-      'float' => TRUE
872
-    ),
873
-    'filter' => array(
874
-      'handler' => 'views_handler_filter_numeric'
875
-    ),
876
-    'sort' => array(
877
-      'handler' => 'views_handler_sort_numeric'
878
-    )
879
-  );
880
-  $data['result']['exit_status'] = array(
881
-    'title' => bts('Exit status', array(), NULL, 'boinc:task-details'),
882
-    'help' => t('The exit code of the task.'),
883
-    'field' => array(
884
-      'handler' => 'views_handler_field_numeric',
885
-      'click sortable' => TRUE
886
-    ),
887
-    'filter' => array(
888
-      'handler' => 'views_handler_filter_numeric'
889
-    ),
890
-    'sort' => array(
891
-      'handler' => 'views_handler_sort_numeric'
892
-    )
893
-  );
894
-  $data['result']['granted_credit'] = array(
895
-    'title' => bts('Granted credit', array(), NULL, 'boinc:task-details'),
896
-    'help' => t('The credit granted for this result.'),
897
-    'field' => array(
898
-      'handler' => 'views_handler_field_numeric',
899
-      'click sortable' => TRUE,
900
-      'float' => TRUE
901
-    ),
902
-    'filter' => array(
903
-      'handler' => 'views_handler_filter_numeric'
904
-    ),
905
-    'sort' => array(
906
-      'handler' => 'views_handler_sort_numeric'
907
-    )
908
-  );
909
-  $data['result']['name'] = array(
910
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
911
-    'help' => t('The name of the task.'),
912
-    'field' => array(
913
-      'handler' => 'views_handler_field',
914
-      'click sortable' => TRUE
915
-    ),
916
-    'filter' => array(
917
-      'handler' => 'views_handler_filter_string'
918
-    ),
919
-    'sort' => array(
920
-      'handler' => 'views_handler_sort_string'
921
-    )
922
-  );
923
-  $data['result']['outcome'] = array(
924
-    'title' => bts('Outcome', array(), NULL, 'boinc:task-details'),
925
-    'help' => t('The outcome of the task.'),
926
-    'field' => array(
927
-      'handler' => 'views_handler_field_numeric',
928
-      'click sortable' => TRUE
929
-    ),
930
-    'filter' => array(
931
-      'handler' => 'views_handler_filter_numeric'
932
-    ),
933
-    'sort' => array(
934
-      'handler' => 'views_handler_sort_numeric'
935
-    )
936
-  );
937
-  $data['result']['received_time'] = array(
938
-    'title' => bts('Received time', array(), NULL, 'boinc:task-details'),
939
-    'help' => t('The time that the result was received.'),
940
-    'field' => array(
941
-      'handler' => 'views_handler_field_date',
942
-      'click sortable' => TRUE
943
-    ),
944
-    'filter' => array(
945
-      'handler' => 'views_handler_filter_date'
946
-    ),
947
-    'sort' => array(
948
-      'handler' => 'views_handler_sort_date'
949
-    )
950
-  );
951
-  $data['result']['report_deadline'] = array(
952
-    'title' => bts('Report deadline', array(), NULL, 'boinc:task-details'),
953
-    'help' => t('The deadline for the task.'),
954
-    'field' => array(
955
-      'handler' => 'views_handler_field_date',
956
-      'click sortable' => TRUE
957
-    ),
958
-    'filter' => array(
959
-      'handler' => 'views_handler_filter_date'
960
-    ),
961
-    'sort' => array(
962
-      'handler' => 'views_handler_sort_date'
963
-    )
964
-  );
965
-  $data['result']['sent_time'] = array(
966
-    'title' => bts('Sent', array(), NULL, 'boinc:task-details'),
967
-    'help' => t('The time that the task was sent.'),
968
-    'field' => array(
969
-      'handler' => 'views_handler_field_date',
970
-      'click sortable' => TRUE
971
-    ),
972
-    'filter' => array(
973
-      'handler' => 'views_handler_filter_date'
974
-    ),
975
-    'sort' => array(
976
-      'handler' => 'views_handler_sort_date'
977
-    )
978
-  );
979
-  $data['result']['server_state'] = array(
980
-    'title' => bts('Server state', array(), NULL, 'boinc:task-details'),
981
-    'help' => t('The state of task on the server side.'),
982
-    'field' => array(
983
-      'handler' => 'views_handler_field_numeric',
984
-      'click sortable' => TRUE
985
-    ),
986
-    'filter' => array(
987
-      'handler' => 'views_handler_filter_numeric'
988
-    ),
989
-    'sort' => array(
990
-      'handler' => 'views_handler_sort_numeric'
991
-    )
992
-  );
993
-  $data['result']['stderr_out'] = array(
994
-    'title' => bts('Stderr out', array(), NULL, 'boinc:task-details'),
995
-    'help' => t('The output to standard error.'),
996
-    'field' => array(
997
-      'handler' => 'views_handler_field',
998
-      'click sortable' => TRUE
999
-    ),
1000
-    'filter' => array(
1001
-      'handler' => 'views_handler_filter_string'
1002
-    ),
1003
-    'sort' => array(
1004
-      'handler' => 'views_handler_sort_string'
1005
-    )
1006
-  );
1007
-  $data['result']['validate_state'] = array(
1008
-    'title' => bts('Validation state', array(), NULL, 'boinc:task-details'),
1009
-    'help' => t('The state of validation of this result.'),
1010
-    'field' => array(
1011
-      'handler' => 'views_handler_field_numeric',
1012
-      'click sortable' => TRUE
1013
-    ),
1014
-    'filter' => array(
1015
-      'handler' => 'views_handler_filter_numeric'
1016
-    ),
1017
-    'sort' => array(
1018
-      'handler' => 'views_handler_sort_numeric'
1019
-    )
1020
-  );
1021
-  $data['result']['peak_working_set_size'] = array(
1022
-    'title' => bts('Peak working set size', array(), NULL, 'boinc:task-details'),
1023
-    'help' => t('Peak working set size.'),
1024
-    'field' => array(
1025
-      'handler' => 'views_handler_field_numeric',
1026
-      'click sortable' => TRUE
1027
-    ),
1028
-    'filter' => array(
1029
-      'handler' => 'views_handler_filter_numeric'
1030
-    ),
1031
-    'sort' => array(
1032
-      'handler' => 'views_handler_sort_numeric'
1033
-    )
1034
-  );
1035
-  $data['result']['peak_swap_size'] = array(
1036
-    'title' => bts('Peak swap size', array(), NULL, 'boinc:task-details'),
1037
-    'help' => t('Peak swap size.'),
1038
-    'field' => array(
1039
-      'handler' => 'views_handler_field_numeric',
1040
-      'click sortable' => TRUE
1041
-    ),
1042
-    'filter' => array(
1043
-      'handler' => 'views_handler_filter_numeric'
1044
-    ),
1045
-    'sort' => array(
1046
-      'handler' => 'views_handler_sort_numeric'
1047
-    )
1048
-  );
1049
-    $data['result']['peak_disk_usage'] = array(
1050
-    'title' => bts('Peak disk usage', array(), NULL, 'boinc:task-details'),
1051
-    'help' => t('Peak disk usage.'),
1052
-    'field' => array(
1053
-      'handler' => 'views_handler_field_numeric',
1054
-      'click sortable' => TRUE
1055
-    ),
1056
-    'filter' => array(
1057
-      'handler' => 'views_handler_filter_numeric'
1058
-    ),
1059
-    'sort' => array(
1060
-      'handler' => 'views_handler_sort_numeric'
1061
-    )
1062
-  );
779
+$data['result']['appid'] = array(
780
+'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
781
+'help' => t('The ID number of the application.'),
782
+'field' => array(
783
+  'handler' => 'views_handler_field_numeric',
784
+  'click sortable' => TRUE
785
+),
786
+'filter' => array(
787
+  'handler' => 'views_handler_filter_numeric'
788
+),
789
+'sort' => array(
790
+  'handler' => 'views_handler_sort_numeric'
791
+)
792
+);
793
+$data['result']['app_version_id'] = array(
794
+'title' => bts('Application version', array(), NULL, 'boinc:task-details'),
795
+'help' => t('The version number of the application.'),
796
+'field' => array(
797
+  'handler' => 'views_handler_field_numeric',
798
+  'click sortable' => TRUE
799
+),
800
+'filter' => array(
801
+  'handler' => 'views_handler_filter_numeric'
802
+),
803
+'sort' => array(
804
+  'handler' => 'views_handler_sort_numeric'
805
+)
806
+);
807
+$data['result']['claimed_credit'] = array(
808
+'title' => bts('Claimed credit', array(), NULL, 'boinc:task-details'),
809
+'help' => t('The credit claimed for this result.'),
810
+'field' => array(
811
+  'handler' => 'views_handler_field_numeric',
812
+  'click sortable' => TRUE,
813
+  'float' => TRUE
814
+),
815
+'filter' => array(
816
+  'handler' => 'views_handler_filter_numeric'
817
+),
818
+'sort' => array(
819
+  'handler' => 'views_handler_sort_numeric'
820
+)
821
+);
822
+$data['result']['client_state'] = array(
823
+'title' => bts('Client state', array(), NULL, 'boinc:task-details'),
824
+'help' => t('The state of the task on the client side.'),
825
+'field' => array(
826
+  'handler' => 'views_handler_field_numeric',
827
+  'click sortable' => TRUE
828
+),
829
+'filter' => array(
830
+  'handler' => 'views_handler_filter_numeric'
831
+),
832
+'sort' => array(
833
+  'handler' => 'views_handler_sort_numeric'
834
+)
835
+);
836
+$data['result']['cpu_time'] = array(
837
+'title' => bts('CPU time', array(), NULL, 'boinc:task-details'),
838
+'help' => t('The CPU time spent on the task.'),
839
+'field' => array(
840
+  'handler' => 'views_handler_field_numeric',
841
+  'click sortable' => TRUE,
842
+  'float' => TRUE
843
+),
844
+'filter' => array(
845
+  'handler' => 'views_handler_filter_numeric'
846
+),
847
+'sort' => array(
848
+  'handler' => 'views_handler_sort_numeric'
849
+)
850
+);
851
+$data['result']['create_time'] = array(
852
+'title' => bts('Created', array(), NULL, 'boinc:task-details:-1:ignoreoverwrite'),
853
+'help' => t('The time that the task was created.'),
854
+'field' => array(
855
+  'handler' => 'views_handler_field_date',
856
+  'click sortable' => TRUE
857
+),
858
+'filter' => array(
859
+  'handler' => 'views_handler_filter_date'
860
+),
861
+'sort' => array(
862
+  'handler' => 'views_handler_sort_date'
863
+)
864
+);
865
+$data['result']['elapsed_time'] = array(
866
+'title' => bts('Run time', array(), NULL, 'boinc:task-details'),
867
+'help' => t('The run time of the task.'),
868
+'field' => array(
869
+  'handler' => 'views_handler_field_numeric',
870
+  'click sortable' => TRUE,
871
+  'float' => TRUE
872
+),
873
+'filter' => array(
874
+  'handler' => 'views_handler_filter_numeric'
875
+),
876
+'sort' => array(
877
+  'handler' => 'views_handler_sort_numeric'
878
+)
879
+);
880
+$data['result']['exit_status'] = array(
881
+'title' => bts('Exit status', array(), NULL, 'boinc:task-details'),
882
+'help' => t('The exit code of the task.'),
883
+'field' => array(
884
+  'handler' => 'views_handler_field_numeric',
885
+  'click sortable' => TRUE
886
+),
887
+'filter' => array(
888
+  'handler' => 'views_handler_filter_numeric'
889
+),
890
+'sort' => array(
891
+  'handler' => 'views_handler_sort_numeric'
892
+)
893
+);
894
+$data['result']['granted_credit'] = array(
895
+'title' => bts('Granted credit', array(), NULL, 'boinc:task-details'),
896
+'help' => t('The credit granted for this result.'),
897
+'field' => array(
898
+  'handler' => 'views_handler_field_numeric',
899
+  'click sortable' => TRUE,
900
+  'float' => TRUE
901
+),
902
+'filter' => array(
903
+  'handler' => 'views_handler_filter_numeric'
904
+),
905
+'sort' => array(
906
+  'handler' => 'views_handler_sort_numeric'
907
+)
908
+);
909
+$data['result']['name'] = array(
910
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
911
+'help' => t('The name of the task.'),
912
+'field' => array(
913
+  'handler' => 'views_handler_field',
914
+  'click sortable' => TRUE
915
+),
916
+'filter' => array(
917
+  'handler' => 'views_handler_filter_string'
918
+),
919
+'sort' => array(
920
+  'handler' => 'views_handler_sort_string'
921
+)
922
+);
923
+$data['result']['outcome'] = array(
924
+'title' => bts('Outcome', array(), NULL, 'boinc:task-details'),
925
+'help' => t('The outcome of the task.'),
926
+'field' => array(
927
+  'handler' => 'views_handler_field_numeric',
928
+  'click sortable' => TRUE
929
+),
930
+'filter' => array(
931
+  'handler' => 'views_handler_filter_numeric'
932
+),
933
+'sort' => array(
934
+  'handler' => 'views_handler_sort_numeric'
935
+)
936
+);
937
+$data['result']['received_time'] = array(
938
+'title' => bts('Received time', array(), NULL, 'boinc:task-details'),
939
+'help' => t('The time that the result was received.'),
940
+'field' => array(
941
+  'handler' => 'views_handler_field_date',
942
+  'click sortable' => TRUE
943
+),
944
+'filter' => array(
945
+  'handler' => 'views_handler_filter_date'
946
+),
947
+'sort' => array(
948
+  'handler' => 'views_handler_sort_date'
949
+)
950
+);
951
+$data['result']['report_deadline'] = array(
952
+'title' => bts('Report deadline', array(), NULL, 'boinc:task-details'),
953
+'help' => t('The deadline for the task.'),
954
+'field' => array(
955
+  'handler' => 'views_handler_field_date',
956
+  'click sortable' => TRUE
957
+),
958
+'filter' => array(
959
+  'handler' => 'views_handler_filter_date'
960
+),
961
+'sort' => array(
962
+  'handler' => 'views_handler_sort_date'
963
+)
964
+);
965
+$data['result']['sent_time'] = array(
966
+'title' => bts('Sent', array(), NULL, 'boinc:task-details'),
967
+'help' => t('The time that the task was sent.'),
968
+'field' => array(
969
+  'handler' => 'views_handler_field_date',
970
+  'click sortable' => TRUE
971
+),
972
+'filter' => array(
973
+  'handler' => 'views_handler_filter_date'
974
+),
975
+'sort' => array(
976
+  'handler' => 'views_handler_sort_date'
977
+)
978
+);
979
+$data['result']['server_state'] = array(
980
+'title' => bts('Server state', array(), NULL, 'boinc:task-details'),
981
+'help' => t('The state of task on the server side.'),
982
+'field' => array(
983
+  'handler' => 'views_handler_field_numeric',
984
+  'click sortable' => TRUE
985
+),
986
+'filter' => array(
987
+  'handler' => 'views_handler_filter_numeric'
988
+),
989
+'sort' => array(
990
+  'handler' => 'views_handler_sort_numeric'
991
+)
992
+);
993
+$data['result']['stderr_out'] = array(
994
+'title' => bts('Stderr out', array(), NULL, 'boinc:task-details'),
995
+'help' => t('The output to standard error.'),
996
+'field' => array(
997
+  'handler' => 'views_handler_field',
998
+  'click sortable' => TRUE
999
+),
1000
+'filter' => array(
1001
+  'handler' => 'views_handler_filter_string'
1002
+),
1003
+'sort' => array(
1004
+  'handler' => 'views_handler_sort_string'
1005
+)
1006
+);
1007
+$data['result']['validate_state'] = array(
1008
+'title' => bts('Validation state', array(), NULL, 'boinc:task-details'),
1009
+'help' => t('The state of validation of this result.'),
1010
+'field' => array(
1011
+  'handler' => 'views_handler_field_numeric',
1012
+  'click sortable' => TRUE
1013
+),
1014
+'filter' => array(
1015
+  'handler' => 'views_handler_filter_numeric'
1016
+),
1017
+'sort' => array(
1018
+  'handler' => 'views_handler_sort_numeric'
1019
+)
1020
+);
1021
+$data['result']['peak_working_set_size'] = array(
1022
+'title' => bts('Peak working set size', array(), NULL, 'boinc:task-details'),
1023
+'help' => t('Peak working set size.'),
1024
+'field' => array(
1025
+  'handler' => 'views_handler_field_numeric',
1026
+  'click sortable' => TRUE
1027
+),
1028
+'filter' => array(
1029
+  'handler' => 'views_handler_filter_numeric'
1030
+),
1031
+'sort' => array(
1032
+  'handler' => 'views_handler_sort_numeric'
1033
+)
1034
+);
1035
+$data['result']['peak_swap_size'] = array(
1036
+'title' => bts('Peak swap size', array(), NULL, 'boinc:task-details'),
1037
+'help' => t('Peak swap size.'),
1038
+'field' => array(
1039
+  'handler' => 'views_handler_field_numeric',
1040
+  'click sortable' => TRUE
1041
+),
1042
+'filter' => array(
1043
+  'handler' => 'views_handler_filter_numeric'
1044
+),
1045
+'sort' => array(
1046
+  'handler' => 'views_handler_sort_numeric'
1047
+)
1048
+);
1049
+$data['result']['peak_disk_usage'] = array(
1050
+'title' => bts('Peak disk usage', array(), NULL, 'boinc:task-details'),
1051
+'help' => t('Peak disk usage.'),
1052
+'field' => array(
1053
+  'handler' => 'views_handler_field_numeric',
1054
+  'click sortable' => TRUE
1055
+),
1056
+'filter' => array(
1057
+  'handler' => 'views_handler_filter_numeric'
1058
+),
1059
+'sort' => array(
1060
+  'handler' => 'views_handler_sort_numeric'
1061
+)
1062
+);
1063 1063
 
1064 1064
   
1065
-  // ------------------------------------------------------------------------------------------------
1066
-  // Definition for workunit table
1067
-  // ------------------------------------------------------------------------------------------------
1065
+// ------------------------------------------------------------------------------------------------
1066
+// Definition for workunit table
1067
+// ------------------------------------------------------------------------------------------------
1068 1068
   
1069
-  $data['workunit']['table']['group'] = t('BOINC');
1070
-  $data['workunit']['table']['base'] = array(
1071
-      'field' => 'id',
1072
-      'title' => t('BOINC workunit'),
1073
-      'help' => t('Workunits produced by BOINC'),
1074
-      'database' => 'boinc_ro'
1075
-  );
1069
+$data['workunit']['table']['group'] = t('BOINC');
1070
+$data['workunit']['table']['base'] = array(
1071
+  'field' => 'id',
1072
+  'title' => t('BOINC workunit'),
1073
+  'help' => t('Workunits produced by BOINC'),
1074
+  'database' => 'boinc_ro'
1075
+);
1076 1076
   
1077
-  // Create implicit relationship to the app table
1077
+// Create implicit relationship to the app table
1078 1078
   
1079
-  $data['workunit']['table']['join'] = array(
1080
-    'app' => array(
1081
-      'left_field' => 'id',
1082
-      'field' => 'appid'
1083
-    )
1084
-  );
1079
+$data['workunit']['table']['join'] = array(
1080
+'app' => array(
1081
+  'left_field' => 'id',
1082
+  'field' => 'appid'
1083
+)
1084
+);
1085 1085
   
1086
-  // Primary keys allowed as arguments
1086
+// Primary keys allowed as arguments
1087 1087
   
1088
-  $data['workunit']['id'] = array(
1089
-    'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
1090
-    'help' => t('The ID number of this workunit.'),
1091
-    'field' => array(
1092
-      'handler' => 'views_handler_field_numeric',
1093
-      'click sortable' => TRUE
1094
-    ),
1095
-    'argument' => array(
1096
-      'handler' => 'views_handler_argument',
1097
-      'name field' => 'title',
1098
-      'numeric' => TRUE,
1099
-      'validate type' => 'id'
1100
-    ),
1101
-    'filter' => array(
1102
-      'handler' => 'views_handler_filter_numeric'
1103
-    ),
1104
-    'sort' => array(
1105
-      'handler' => 'views_handler_sort_numeric'
1106
-    )
1107
-  );
1088
+$data['workunit']['id'] = array(
1089
+'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
1090
+'help' => t('The ID number of this workunit.'),
1091
+'field' => array(
1092
+  'handler' => 'views_handler_field_numeric',
1093
+  'click sortable' => TRUE
1094
+),
1095
+'argument' => array(
1096
+  'handler' => 'views_handler_argument',
1097
+  'name field' => 'title',
1098
+  'numeric' => TRUE,
1099
+  'validate type' => 'id'
1100
+),
1101
+'filter' => array(
1102
+  'handler' => 'views_handler_filter_numeric'
1103
+),
1104
+'sort' => array(
1105
+  'handler' => 'views_handler_sort_numeric'
1106
+)
1107
+);
1108 1108
   
1109
-  // Foreign key fields
1109
+// Foreign key fields
1110 1110
   
1111
-  $data['workunit']['appid'] = array(
1112
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1113
-    'help' => t('The application associated with this workunit.'), 
1114
-    'argument' => array( // foreign key to the {app} table
1115
-      'handler' => 'views_handler_argument',
1116
-      'name field' => 'title',
1117
-      'numeric' => TRUE,
1118
-      'validate type' => 'id'
1119
-    ),
1120
-    'relationship' => array(
1121
-      'base' => 'app',
1122
-      'field' => 'appid',
1123
-      'handler' => 'views_handler_relationship',
1124
-      'label' => t('Application')
1125
-    ),
1126
-    'field' => array(
1127
-      'handler' => 'views_handler_field_numeric',
1128
-      'click sortable' => TRUE
1129
-    ),
1130
-    'filter' => array(
1131
-      'handler' => 'views_handler_filter_numeric'
1132
-    ),
1133
-    'sort' => array(
1134
-      'handler' => 'views_handler_sort_numeric'
1135
-    )
1136
-  );
1111
+$data['workunit']['appid'] = array(
1112
+'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1113
+'help' => t('The application associated with this workunit.'), 
1114
+'argument' => array( // foreign key to the {app} table
1115
+  'handler' => 'views_handler_argument',
1116
+  'name field' => 'title',
1117
+  'numeric' => TRUE,
1118
+  'validate type' => 'id'
1119
+),
1120
+'relationship' => array(
1121
+  'base' => 'app',
1122
+  'field' => 'appid',
1123
+  'handler' => 'views_handler_relationship',
1124
+  'label' => t('Application')
1125
+),
1126
+'field' => array(
1127
+  'handler' => 'views_handler_field_numeric',
1128
+  'click sortable' => TRUE
1129
+),
1130
+'filter' => array(
1131
+  'handler' => 'views_handler_filter_numeric'
1132
+),
1133
+'sort' => array(
1134
+  'handler' => 'views_handler_sort_numeric'
1135
+)
1136
+);
1137 1137
   
1138
-  // Descriptions of workunit fields (alphabetized)
1138
+// Descriptions of workunit fields (alphabetized)
1139 1139
   
1140
-  $data['workunit']['canonical_credit'] = array(
1141
-    'title' => bts('Canonical credit', array(), NULL, 'boinc:workunit-details'),
1142
-    'help' => t('The canonical credit of the workunit.'),
1143
-    'field' => array(
1144
-      'handler' => 'views_handler_field_numeric',
1145
-      'click sortable' => TRUE,
1146
-      'float' => TRUE
1147
-    ),
1148
-    'filter' => array(
1149
-      'handler' => 'views_handler_filter_numeric'
1150
-    ),
1151
-    'sort' => array(
1152
-      'handler' => 'views_handler_sort_numeric'
1153
-    )
1154
-  );
1155
-  $data['workunit']['canonical_resultid'] = array(
1156
-    'title' => bts('Canonical result ID', array(), NULL, 'boinc:workunit-details'),
1157
-    'help' => t('The ID of the canonical result associated with the workunit.'),
1158
-    'field' => array(
1159
-      'handler' => 'views_handler_field_numeric',
1160
-      'click sortable' => TRUE
1161
-    ),
1162
-    'filter' => array(
1163
-      'handler' => 'views_handler_filter_numeric'
1164
-    ),
1165
-    'sort' => array(
1166
-      'handler' => 'views_handler_sort_numeric'
1167
-    )
1168
-  );
1169
-  $data['workunit']['create_time'] = array(
1170
-    'title' => bts('Created time', array(), NULL, 'boinc:workunit-details'),
1171
-    'help' => t('The time that the workunit was created.'),
1172
-    'field' => array(
1173
-      'handler' => 'views_handler_field_date',
1174
-      'click sortable' => TRUE
1175
-    ),
1176
-    'filter' => array(
1177
-      'handler' => 'views_handler_filter_date'
1178
-    ),
1179
-    'sort' => array(
1180
-      'handler' => 'views_handler_sort_date'
1181
-    )
1182
-  );
1183
-  $data['workunit']['error_mask'] = array(
1184
-    'title' => bts('Error mask', array(), NULL, 'boinc:workunit-details'),
1185
-    'help' => t('Error mask of the workunit.'),
1186
-    'field' => array(
1187
-      'handler' => 'views_handler_field_numeric',
1188
-      'click sortable' => TRUE
1189
-    ),
1190
-    'filter' => array(
1191
-      'handler' => 'views_handler_filter_numeric'
1192
-    ),
1193
-    'sort' => array(
1194
-      'handler' => 'views_handler_sort_numeric'
1195
-    )
1196
-  );
1197
-  $data['workunit']['min_quorum'] = array(
1198
-    'title' => bts('Minimum quorum', array(), NULL, 'boinc:workunit-details'),
1199
-    'help' => t('Minimum quorum of the workunit.'),
1200
-    'field' => array(
1201
-      'handler' => 'views_handler_field_numeric',
1202
-      'click sortable' => TRUE
1203
-    ),
1204
-    'filter' => array(
1205
-      'handler' => 'views_handler_filter_numeric'
1206
-    ),
1207
-    'sort' => array(
1208
-      'handler' => 'views_handler_sort_numeric'
1209
-    )
1210
-  );
1211
-  $data['workunit']['name'] = array(
1212
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreovewrite'),
1213
-    'help' => t('The name of the workunit.'),
1214
-    'field' => array(
1215
-      'handler' => 'views_handler_field',
1216
-      'click sortable' => TRUE
1217
-    ),
1218
-    'filter' => array(
1219
-      'handler' => 'views_handler_filter_string'
1220
-    ),
1221
-    'sort' => array(
1222
-      'handler' => 'views_handler_sort_string'
1223
-    )
1224
-  );
1225
-  $data['workunit']['max_error_results'] = array(
1226
-    'title' => bts('Max error tasks', array(), NULL, 'boinc:workunit-details'),
1227
-    'help' => t('The maximum number of error tasks in the workunit.'),
1228
-    'field' => array(
1229
-      'handler' => 'views_handler_field_numeric',
1230
-      'click sortable' => TRUE
1231
-    ),
1232
-    'filter' => array(
1233
-      'handler' => 'views_handler_filter_numeric'
1234
-    ),
1235
-    'sort' => array(
1236
-      'handler' => 'views_handler_sort_numeric'
1237
-    )
1238
-  );
1239
-  $data['workunit']['max_success_results'] = array(
1240
-    'title' => bts('Max success tasks', array(), NULL, 'boinc:workunit-details'),
1241
-    'help' => t('The maximum number of successful tasks in the workunit.'),
1242
-    'field' => array(
1243
-      'handler' => 'views_handler_field_numeric',
1244
-      'click sortable' => TRUE
1245
-    ),
1246
-    'filter' => array(
1247
-      'handler' => 'views_handler_filter_numeric'
1248
-    ),
1249
-    'sort' => array(
1250
-      'handler' => 'views_handler_sort_numeric'
1251
-    )
1252
-  );
1253
-  $data['workunit']['max_total_results'] = array(
1254
-    'title' => bts('Max total tasks', array(), NULL, 'boinc:workunit-details'),
1255
-    'help' => t('The maximum number of total tasks in the workunit.'),
1256
-    'field' => array(
1257
-      'handler' => 'views_handler_field_numeric',
1258
-      'click sortable' => TRUE
1259
-    ),
1260
-    'filter' => array(
1261
-      'handler' => 'views_handler_filter_numeric'
1262
-    ),
1263
-    'sort' => array(
1264
-      'handler' => 'views_handler_sort_numeric'
1265
-    )
1266
-  );
1267
-  $data['workunit']['need_validate'] = array(
1268
-    'title' => bts('Needs validation', array(), NULL, 'boinc:workunit-details'),
1269
-    'help' => t('Whether or not a workunit needs validation.'),
1270
-    'field' => array(
1271
-      'handler' => 'views_handler_field_numeric',
1272
-      'click sortable' => TRUE
1273
-    ),
1274
-    'filter' => array(
1275
-      'handler' => 'views_handler_filter_numeric'
1276
-    ),
1277
-    'sort' => array(
1278
-      'handler' => 'views_handler_sort_numeric'
1279
-    )
1280
-  );
1281
-  $data['workunit']['target_nresults'] = array(
1282
-    'title' => bts('Initial replication', array(), NULL, 'boinc:workunit-details'),
1283
-    'help' => t('The target number of results for the workunit.'),
1284
-    'field' => array(
1285
-      'handler' => 'views_handler_field_numeric',
1286
-      'click sortable' => TRUE
1287
-    ),
1288
-    'filter' => array(
1289
-      'handler' => 'views_handler_filter_numeric'
1290
-    ),
1291
-    'sort' => array(
1292
-      'handler' => 'views_handler_sort_numeric'
1293
-    )
1294
-  );
1140
+$data['workunit']['canonical_credit'] = array(
1141
+'title' => bts('Canonical credit', array(), NULL, 'boinc:workunit-details'),
1142
+'help' => t('The canonical credit of the workunit.'),
1143
+'field' => array(
1144
+  'handler' => 'views_handler_field_numeric',
1145
+  'click sortable' => TRUE,
1146
+  'float' => TRUE
1147
+),
1148
+'filter' => array(
1149
+  'handler' => 'views_handler_filter_numeric'
1150
+),
1151
+'sort' => array(
1152
+  'handler' => 'views_handler_sort_numeric'
1153
+)
1154
+);
1155
+$data['workunit']['canonical_resultid'] = array(
1156
+'title' => bts('Canonical result ID', array(), NULL, 'boinc:workunit-details'),
1157
+'help' => t('The ID of the canonical result associated with the workunit.'),
1158
+'field' => array(
1159
+  'handler' => 'views_handler_field_numeric',
1160
+  'click sortable' => TRUE
1161
+),
1162
+'filter' => array(
1163
+  'handler' => 'views_handler_filter_numeric'
1164
+),
1165
+'sort' => array(
1166
+  'handler' => 'views_handler_sort_numeric'
1167
+)
1168
+);
1169
+$data['workunit']['create_time'] = array(
1170
+'title' => bts('Created time', array(), NULL, 'boinc:workunit-details'),
1171
+'help' => t('The time that the workunit was created.'),
1172
+'field' => array(
1173
+  'handler' => 'views_handler_field_date',
1174
+  'click sortable' => TRUE
1175
+),
1176
+'filter' => array(
1177
+  'handler' => 'views_handler_filter_date'
1178
+),
1179
+'sort' => array(
1180
+  'handler' => 'views_handler_sort_date'
1181
+)
1182
+);
1183
+$data['workunit']['error_mask'] = array(
1184
+'title' => bts('Error mask', array(), NULL, 'boinc:workunit-details'),
1185
+'help' => t('Error mask of the workunit.'),
1186
+'field' => array(
1187
+  'handler' => 'views_handler_field_numeric',
1188
+  'click sortable' => TRUE
1189
+),
1190
+'filter' => array(
1191
+  'handler' => 'views_handler_filter_numeric'
1192
+),
1193
+'sort' => array(
1194
+  'handler' => 'views_handler_sort_numeric'
1195
+)
1196
+);
1197
+$data['workunit']['min_quorum'] = array(
1198
+'title' => bts('Minimum quorum', array(), NULL, 'boinc:workunit-details'),
1199
+'help' => t('Minimum quorum of the workunit.'),
1200
+'field' => array(
1201
+  'handler' => 'views_handler_field_numeric',
1202
+  'click sortable' => TRUE
1203
+),
1204
+'filter' => array(
1205
+  'handler' => 'views_handler_filter_numeric'
1206
+),
1207
+'sort' => array(
1208
+  'handler' => 'views_handler_sort_numeric'
1209
+)
1210
+);
1211
+$data['workunit']['name'] = array(
1212
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreovewrite'),
1213
+'help' => t('The name of the workunit.'),
1214
+'field' => array(
1215
+  'handler' => 'views_handler_field',
1216
+  'click sortable' => TRUE
1217
+),
1218
+'filter' => array(
1219
+  'handler' => 'views_handler_filter_string'
1220
+),
1221
+'sort' => array(
1222
+  'handler' => 'views_handler_sort_string'
1223
+)
1224
+);
1225
+$data['workunit']['max_error_results'] = array(
1226
+'title' => bts('Max error tasks', array(), NULL, 'boinc:workunit-details'),
1227
+'help' => t('The maximum number of error tasks in the workunit.'),
1228
+'field' => array(
1229
+  'handler' => 'views_handler_field_numeric',
1230
+  'click sortable' => TRUE
1231
+),
1232
+'filter' => array(
1233
+  'handler' => 'views_handler_filter_numeric'
1234
+),
1235
+'sort' => array(
1236
+  'handler' => 'views_handler_sort_numeric'
1237
+)
1238
+);
1239
+$data['workunit']['max_success_results'] = array(
1240
+'title' => bts('Max success tasks', array(), NULL, 'boinc:workunit-details'),
1241
+'help' => t('The maximum number of successful tasks in the workunit.'),
1242
+'field' => array(
1243
+  'handler' => 'views_handler_field_numeric',
1244
+  'click sortable' => TRUE
1245
+),
1246
+'filter' => array(
1247
+  'handler' => 'views_handler_filter_numeric'
1248
+),
1249
+'sort' => array(
1250
+  'handler' => 'views_handler_sort_numeric'
1251
+)
1252
+);
1253
+$data['workunit']['max_total_results'] = array(
1254
+'title' => bts('Max total tasks', array(), NULL, 'boinc:workunit-details'),
1255
+'help' => t('The maximum number of total tasks in the workunit.'),
1256
+'field' => array(
1257
+  'handler' => 'views_handler_field_numeric',
1258
+  'click sortable' => TRUE
1259
+),
1260
+'filter' => array(
1261
+  'handler' => 'views_handler_filter_numeric'
1262
+),
1263
+'sort' => array(
1264
+  'handler' => 'views_handler_sort_numeric'
1265
+)
1266
+);
1267
+$data['workunit']['need_validate'] = array(
1268
+'title' => bts('Needs validation', array(), NULL, 'boinc:workunit-details'),
1269
+'help' => t('Whether or not a workunit needs validation.'),
1270
+'field' => array(
1271
+  'handler' => 'views_handler_field_numeric',
1272
+  'click sortable' => TRUE
1273
+),
1274
+'filter' => array(
1275
+  'handler' => 'views_handler_filter_numeric'
1276
+),
1277
+'sort' => array(
1278
+  'handler' => 'views_handler_sort_numeric'
1279
+)
1280
+);
1281
+$data['workunit']['target_nresults'] = array(
1282
+'title' => bts('Initial replication', array(), NULL, 'boinc:workunit-details'),
1283
+'help' => t('The target number of results for the workunit.'),
1284
+'field' => array(
1285
+  'handler' => 'views_handler_field_numeric',
1286
+  'click sortable' => TRUE
1287
+),
1288
+'filter' => array(
1289
+  'handler' => 'views_handler_filter_numeric'
1290
+),
1291
+'sort' => array(
1292
+  'handler' => 'views_handler_sort_numeric'
1293
+)
1294
+);
1295 1295
   
1296
-  // ------------------------------------------------------------------------------------------------
1297
-  // Definition for app table
1298
-  // ------------------------------------------------------------------------------------------------
1296
+// ------------------------------------------------------------------------------------------------
1297
+// Definition for app table
1298
+// ------------------------------------------------------------------------------------------------
1299 1299
   
1300
-  $data['app']['table']['group'] = t('BOINC');
1301
-  $data['app']['table']['base'] = array(
1302
-      'field' => 'id',
1303
-      'title' => t('BOINC app'),
1304
-      'help' => t('Research applications run by BOINC'),
1305
-      'database' => 'boinc_ro'
1306
-  );
1300
+$data['app']['table']['group'] = t('BOINC');
1301
+$data['app']['table']['base'] = array(
1302
+  'field' => 'id',
1303
+  'title' => t('BOINC app'),
1304
+  'help' => t('Research applications run by BOINC'),
1305
+  'database' => 'boinc_ro'
1306
+);
1307 1307
   
1308
-  // Primary keys allowed as arguments
1308
+// Primary keys allowed as arguments
1309 1309
 
1310
-  $data['app']['id'] = array(
1311
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1312
-    'help' => t('The ID number of this application.'),
1313
-    'field' => array(
1314
-      'handler' => 'views_handler_field_numeric',
1315
-      'click sortable' => TRUE
1316
-    ),
1317
-    'argument' => array(
1318
-      'handler' => 'views_handler_argument',
1319
-      'name field' => 'title',
1320
-      'numeric' => TRUE,
1321
-      'validate type' => 'id'
1322
-    ),
1323
-    'filter' => array(
1324
-      'handler' => 'views_handler_filter_numeric'
1325
-    ),
1326
-    'sort' => array(
1327
-      'handler' => 'views_handler_sort_numeric'
1328
-    )
1329
-  );
1310
+$data['app']['id'] = array(
1311
+'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1312
+'help' => t('The ID number of this application.'),
1313
+'field' => array(
1314
+  'handler' => 'views_handler_field_numeric',
1315
+  'click sortable' => TRUE
1316
+),
1317
+'argument' => array(
1318
+  'handler' => 'views_handler_argument',
1319
+  'name field' => 'title',
1320
+  'numeric' => TRUE,
1321
+  'validate type' => 'id'
1322
+),
1323
+'filter' => array(
1324
+  'handler' => 'views_handler_filter_numeric'
1325
+),
1326
+'sort' => array(
1327
+  'handler' => 'views_handler_sort_numeric'
1328
+)
1329
+);
1330 1330
   
1331
-  // Descriptions of app fields (alphabetized)
1331
+// Descriptions of app fields (alphabetized)
1332 1332
   
1333
-  $data['app']['target_nresults'] = array(
1334
-    'title' => bts('Target number of results', array(), NULL, 'boinc:application-details'),
1335
-    'help' => t('The number of times to replicate tasks in this application.'),
1336
-    'field' => array(
1337
-      'handler' => 'views_handler_field_numeric',
1338
-      'click sortable' => TRUE
1339
-    ),
1340
-    'filter' => array(
1341
-      'handler' => 'views_handler_filter_numeric'
1342
-    ),
1343
-    'sort' => array(
1344
-      'handler' => 'views_handler_sort_numeric'
1345
-    )
1346
-  );
1347
-  $data['app']['user_friendly_name'] = array(
1348
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1349
-    'help' => t('The user friendly name of the application.'),
1350
-    'field' => array(
1351
-      'handler' => 'views_handler_field',
1352
-      'click sortable' => TRUE
1353
-    ),
1354
-    'filter' => array(
1355
-      'handler' => 'views_handler_filter_string'
1356
-    ),
1357
-    'sort' => array(
1358
-      'handler' => 'views_handler_sort_string'
1359
-    )
1360
-  );
1333
+$data['app']['target_nresults'] = array(
1334
+'title' => bts('Target number of results', array(), NULL, 'boinc:application-details'),
1335
+'help' => t('The number of times to replicate tasks in this application.'),
1336
+'field' => array(
1337
+  'handler' => 'views_handler_field_numeric',
1338
+  'click sortable' => TRUE
1339
+),
1340
+'filter' => array(
1341
+  'handler' => 'views_handler_filter_numeric'
1342
+),
1343
+'sort' => array(
1344
+  'handler' => 'views_handler_sort_numeric'
1345
+)
1346
+);
1347
+$data['app']['user_friendly_name'] = array(
1348
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1349
+'help' => t('The user friendly name of the application.'),
1350
+'field' => array(
1351
+  'handler' => 'views_handler_field',
1352
+  'click sortable' => TRUE
1353
+),
1354
+'filter' => array(
1355
+  'handler' => 'views_handler_filter_string'
1356
+),
1357
+'sort' => array(
1358
+  'handler' => 'views_handler_sort_string'
1359
+)
1360
+);
1361 1361
   
1362
-  // ------------------------------------------------------------------------------------------------
1363
-  // Definition for app_version table
1364
-  // ------------------------------------------------------------------------------------------------
1362
+// ------------------------------------------------------------------------------------------------
1363
+// Definition for app_version table
1364
+// ------------------------------------------------------------------------------------------------
1365 1365
   
1366
-  $data['app_version']['table']['group'] = t('BOINC');
1367
-  $data['app_version']['table']['base'] = array(
1368
-      'field' => 'id',
1369
-      'title' => t('BOINC app version'),
1370
-      'help' => t('Versions of research applications run by BOINC'),
1371
-      'database' => 'boinc_ro'
1372
-  );
1366
+$data['app_version']['table']['group'] = t('BOINC');
1367
+$data['app_version']['table']['base'] = array(
1368
+  'field' => 'id',
1369
+  'title' => t('BOINC app version'),
1370
+  'help' => t('Versions of research applications run by BOINC'),
1371
+  'database' => 'boinc_ro'
1372
+);
1373 1373
   
1374
-  // Primary keys allowed as arguments
1374
+// Primary keys allowed as arguments
1375 1375
 
1376
-  $data['app_version']['id'] = array(
1377
-    'title' => bts('Application version ID', array(), NULL, 'boinc:application-details'),
1378
-    'help' => t('The ID number of this application version.'),
1379
-    'field' => array(
1380
-      'handler' => 'views_handler_field_numeric',
1381
-      'click sortable' => TRUE
1382
-    ),
1383
-    'argument' => array(
1384
-      'handler' => 'views_handler_argument',
1385
-      'name field' => 'title',
1386
-      'numeric' => TRUE,
1387
-      'validate type' => 'id'
1388
-    ),
1389
-    'filter' => array(
1390
-      'handler' => 'views_handler_filter_numeric'
1391
-    ),
1392
-    'sort' => array(
1393
-      'handler' => 'views_handler_sort_numeric'
1394
-    )
1395
-  );
1376
+$data['app_version']['id'] = array(
1377
+'title' => bts('Application version ID', array(), NULL, 'boinc:application-details'),
1378
+'help' => t('The ID number of this application version.'),
1379
+'field' => array(
1380
+  'handler' => 'views_handler_field_numeric',
1381
+  'click sortable' => TRUE
1382
+),
1383
+'argument' => array(
1384
+  'handler' => 'views_handler_argument',
1385
+  'name field' => 'title',
1386
+  'numeric' => TRUE,
1387
+  'validate type' => 'id'
1388
+),
1389
+'filter' => array(
1390
+  'handler' => 'views_handler_filter_numeric'
1391
+),
1392
+'sort' => array(
1393
+  'handler' => 'views_handler_sort_numeric'
1394
+)
1395
+);
1396 1396
   
1397
-  // Foreign key fields
1397
+// Foreign key fields
1398 1398
   
1399
-  $data['app_version']['appid'] = array(
1400
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1401
-    'help' => t('The application ID associated with this app version.'),
1402
-    // Because this is a foreign key to the {app} table. This allows us to
1403
-    // have, when the view is configured with this relationship, all the fields
1404
-    // for the related node available.
1405
-    'argument' => array(
1406
-      'handler' => 'views_handler_argument_numeric',
1407
-      'name field' => 'title',
1408
-      'numeric' => TRUE,
1409
-      'validate type' => 'id'
1410
-    ),
1411
-    'relationship' => array(
1412
-      'base' => 'app',
1413
-      'field' => 'id',
1414
-      'handler' => 'views_handler_relationship',
1415
-      'label' => t('App ID')
1416
-    ),
1417
-    'field' => array(
1418
-      'handler' => 'views_handler_field_numeric',
1419
-      'click sortable' => TRUE
1420
-    ),
1421
-    'filter' => array(
1422
-      'handler' => 'views_handler_filter_numeric'
1423
-    ),
1424
-    'sort' => array(
1425
-      'handler' => 'views_handler_sort_numeric'
1426
-    )
1427
-  );
1399
+$data['app_version']['appid'] = array(
1400
+'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1401
+'help' => t('The application ID associated with this app version.'),
1402
+// Because this is a foreign key to the {app} table. This allows us to
1403
+// have, when the view is configured with this relationship, all the fields
1404
+// for the related node available.
1405
+'argument' => array(
1406
+  'handler' => 'views_handler_argument_numeric',
1407
+  'name field' => 'title',
1408
+  'numeric' => TRUE,
1409
+  'validate type' => 'id'
1410
+),
1411
+'relationship' => array(
1412
+  'base' => 'app',
1413
+  'field' => 'id',
1414
+  'handler' => 'views_handler_relationship',
1415
+  'label' => t('App ID')
1416
+),
1417
+'field' => array(
1418
+  'handler' => 'views_handler_field_numeric',
1419
+  'click sortable' => TRUE
1420
+),
1421
+'filter' => array(
1422
+  'handler' => 'views_handler_filter_numeric'
1423
+),
1424
+'sort' => array(
1425
+  'handler' => 'views_handler_sort_numeric'
1426
+)
1427
+);
1428 1428
   
1429
-  $data['app_version']['platformid'] = array(
1430
-    'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
1431
-    'help' => t('The platform ID associated with this app version.'),
1432
-    // Because this is a foreign key to the {platform} table. This allows us to
1433
-    // have, when the view is configured with this relationship, all the fields
1434
-    // for the related node available.
1435
-    'argument' => array(
1436
-      'handler' => 'views_handler_argument_numeric',
1437
-      'name field' => 'title',
1438
-      'numeric' => TRUE,
1439
-      'validate type' => 'id'
1440
-    ),
1441
-    'relationship' => array(
1442
-      'base' => 'platform',
1443
-      'field' => 'id',
1444
-      'handler' => 'views_handler_relationship',
1445
-      'label' => t('Platform ID')
1446
-    ),
1447
-    'field' => array(
1448
-      'handler' => 'views_handler_field_numeric',
1449
-      'click sortable' => TRUE
1450
-    ),
1451
-    'filter' => array(
1452
-      'handler' => 'views_handler_filter_numeric'
1453
-    ),
1454
-    'sort' => array(
1455
-      'handler' => 'views_handler_sort_numeric'
1456
-    )
1457
-  );
1429
+$data['app_version']['platformid'] = array(
1430
+'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
1431
+'help' => t('The platform ID associated with this app version.'),
1432
+// Because this is a foreign key to the {platform} table. This allows us to
1433
+// have, when the view is configured with this relationship, all the fields
1434
+// for the related node available.
1435
+'argument' => array(
1436
+  'handler' => 'views_handler_argument_numeric',
1437
+  'name field' => 'title',
1438
+  'numeric' => TRUE,
1439
+  'validate type' => 'id'
1440
+),
1441
+'relationship' => array(
1442
+  'base' => 'platform',
1443
+  'field' => 'id',
1444
+  'handler' => 'views_handler_relationship',
1445
+  'label' => t('Platform ID')
1446
+),
1447
+'field' => array(
1448
+  'handler' => 'views_handler_field_numeric',
1449
+  'click sortable' => TRUE
1450
+),
1451
+'filter' => array(
1452
+  'handler' => 'views_handler_filter_numeric'
1453
+),
1454
+'sort' => array(
1455
+  'handler' => 'views_handler_sort_numeric'
1456
+)
1457
+);
1458 1458
   
1459
-  // Descriptions of app fields (alphabetized)
1459
+// Descriptions of app fields (alphabetized)
1460 1460
   
1461
-  $data['app_version']['plan_class'] = array(
1462
-    'title' => bts('Plan class', array(), NULL, 'boinc:application-details'),
1463
-    'help' => t('App version plan class.'),
1464
-    'field' => array(
1465
-      'handler' => 'views_handler_field',
1466
-      'click sortable' => TRUE
1467
-    ),
1468
-    'filter' => array(
1469
-      'handler' => 'views_handler_filter_string'
1470
-    ),
1471
-    'sort' => array(
1472
-      'handler' => 'views_handler_sort_string'
1473
-    )
1474
-  );
1475
-  $data['app_version']['version_num'] = array(
1476
-    'title' => bts('Version number', array(), NULL, 'boinc:application-details'),
1477
-    'help' => t('The application version number.'),
1478
-    'field' => array(
1479
-      'handler' => 'views_handler_field_boincwork_app_version_number',
1480
-      'click sortable' => TRUE,
1481
-      'float' => TRUE,
1482
-    ),
1483
-    'filter' => array(
1484
-      'handler' => 'views_handler_filter_numeric'
1485
-    ),
1486
-    'sort' => array(
1487
-      'handler' => 'views_handler_sort_numeric'
1488
-    )
1489
-  );
1461
+$data['app_version']['plan_class'] = array(
1462
+'title' => bts('Plan class', array(), NULL, 'boinc:application-details'),
1463
+'help' => t('App version plan class.'),
1464
+'field' => array(
1465
+  'handler' => 'views_handler_field',
1466
+  'click sortable' => TRUE
1467
+),
1468
+'filter' => array(
1469
+  'handler' => 'views_handler_filter_string'
1470
+),
1471
+'sort' => array(
1472
+  'handler' => 'views_handler_sort_string'
1473
+)
1474
+);
1475
+$data['app_version']['version_num'] = array(
1476
+'title' => bts('Version number', array(), NULL, 'boinc:application-details'),
1477
+'help' => t('The application version number.'),
1478
+'field' => array(
1479
+  'handler' => 'views_handler_field_boincwork_app_version_number',
1480
+  'click sortable' => TRUE,
1481
+  'float' => TRUE,
1482
+),
1483
+'filter' => array(
1484
+  'handler' => 'views_handler_filter_numeric'
1485
+),
1486
+'sort' => array(
1487
+  'handler' => 'views_handler_sort_numeric'
1488
+)
1489
+);
1490 1490
   
1491
-  // ------------------------------------------------------------------------------------------------
1492
-  // Definition for host_app_version table
1493
-  // ------------------------------------------------------------------------------------------------
1491
+// ------------------------------------------------------------------------------------------------
1492
+// Definition for host_app_version table
1493
+// ------------------------------------------------------------------------------------------------
1494 1494
   
1495
-  $data['host_app_version']['table']['group'] = t('BOINC');
1495
+$data['host_app_version']['table']['group'] = t('BOINC');
1496 1496
   
1497
-  // This table references the {host} table.
1498
-  // This join creates an 'implicit' relationship to the host table, so that when
1499
-  // "Host" is the base table, the fields are automatically available.
1497
+// This table references the {host} table.
1498
+// This join creates an 'implicit' relationship to the host table, so that when
1499
+// "Host" is the base table, the fields are automatically available.
1500 1500
   
1501
-  // Index this array by the table name to which this table refers.
1502
-  // 'left_field' is the primary key in the referenced table.
1503
-  // 'field' is the foreign key in this table.
1501
+// Index this array by the table name to which this table refers.
1502
+// 'left_field' is the primary key in the referenced table.
1503
+// 'field' is the foreign key in this table.
1504 1504
   
1505
-  $data['host_app_version']['table']['join'] = array(
1506
-    'host' => array(
1507
-      'left_field' => 'id',
1508
-      'field' => 'host_id',
1509
-    )
1510
-  );
1505
+$data['host_app_version']['table']['join'] = array(
1506
+'host' => array(
1507
+  'left_field' => 'id',
1508
+  'field' => 'host_id',
1509
+)
1510
+);
1511 1511
   
1512
-  // Primary keys allowed as arguments
1512
+// Primary keys allowed as arguments
1513 1513
 
1514
-  $data['host_app_version']['host_id'] = array(
1515
-    'title' => bts('Computer', array(), NULL, 'boinc:host-details'),
1516
-    'help' => t('The host ID connected to this app version data.'),
1517
-    'field' => array(
1518
-      'handler' => 'views_handler_field_numeric',
1519
-      'click sortable' => TRUE
1520
-    ),
1521
-    'argument' => array(
1522
-      'handler' => 'views_handler_argument',
1523
-      'name field' => 'title',
1524
-      'numeric' => TRUE,
1525
-      'validate type' => 'id'
1526
-    ),
1527
-    'filter' => array(
1528
-      'handler' => 'views_handler_filter_numeric'
1529
-    ),
1530
-    'sort' => array(
1531
-      'handler' => 'views_handler_sort_numeric'
1532
-    )
1533
-  );
1514
+$data['host_app_version']['host_id'] = array(
1515
+'title' => bts('Computer', array(), NULL, 'boinc:host-details'),
1516
+'help' => t('The host ID connected to this app version data.'),
1517
+'field' => array(
1518
+  'handler' => 'views_handler_field_numeric',
1519
+  'click sortable' => TRUE
1520
+),
1521
+'argument' => array(
1522
+  'handler' => 'views_handler_argument',
1523
+  'name field' => 'title',
1524
+  'numeric' => TRUE,
1525
+  'validate type' => 'id'
1526
+),
1527
+'filter' => array(
1528
+  'handler' => 'views_handler_filter_numeric'
1529
+),
1530
+'sort' => array(
1531
+  'handler' => 'views_handler_sort_numeric'
1532
+)
1533
+);
1534 1534
   
1535
-  // Foreign key fields
1535
+// Foreign key fields
1536 1536
   
1537
-  $data['host_app_version']['app_version_id'] = array(
1538
-    'title' => bts('App version ID', array(), NULL, 'boinc:application-details'),
1539
-    'help' => t('The app version ID connected to this host data.'),
1540
-    // Because this is a foreign key to the {host} table. This allows us to
1541
-    // have, when the view is configured with this relationship, all the fields
1542
-    // for the related node available.
1543
-    'argument' => array(
1544
-      'handler' => 'views_handler_argument_numeric',
1545
-      'name field' => 'title',
1546
-      'numeric' => TRUE,
1547
-      'validate type' => 'id'
1548
-    ),
1549
-    'relationship' => array(
1550
-      'base' => 'app_version',
1551
-      'field' => 'id',
1552
-      'handler' => 'views_handler_relationship',
1553
-      'label' => t('App version')
1554
-    ),
1555
-    'field' => array(
1556
-      'handler' => 'views_handler_field_numeric',
1557
-      'click sortable' => TRUE
1558
-    ),
1559
-    'filter' => array(
1560
-      'handler' => 'views_handler_filter_numeric'
1561
-    ),
1562
-    'sort' => array(
1563
-      'handler' => 'views_handler_sort_numeric'
1564
-    )
1565
-  );
1537
+$data['host_app_version']['app_version_id'] = array(
1538
+'title' => bts('App version ID', array(), NULL, 'boinc:application-details'),
1539
+'help' => t('The app version ID connected to this host data.'),
1540
+// Because this is a foreign key to the {host} table. This allows us to
1541
+// have, when the view is configured with this relationship, all the fields
1542
+// for the related node available.
1543
+'argument' => array(
1544
+  'handler' => 'views_handler_argument_numeric',
1545
+  'name field' => 'title',
1546
+  'numeric' => TRUE,
1547
+  'validate type' => 'id'
1548
+),
1549
+'relationship' => array(
1550
+  'base' => 'app_version',
1551
+  'field' => 'id',
1552
+  'handler' => 'views_handler_relationship',
1553
+  'label' => t('App version')
1554
+),
1555
+'field' => array(
1556
+  'handler' => 'views_handler_field_numeric',
1557
+  'click sortable' => TRUE
1558
+),
1559
+'filter' => array(
1560
+  'handler' => 'views_handler_filter_numeric'
1561
+),
1562
+'sort' => array(
1563
+  'handler' => 'views_handler_sort_numeric'
1564
+)
1565
+);
1566 1566
   
1567
-  // Descriptions of host_app_version fields (alphabetized)
1567
+// Descriptions of host_app_version fields (alphabetized)
1568 1568
   
1569
-  $data['host_app_version']['consecutive_valid'] = array(
1570
-    'title' => bts('Consecutive valid tasks', array(), NULL, 'boinc:application-details'),
1571
-    'help' => t('The number of consecutive valid tasks for this app and by this host.'),
1572
-    'field' => array(
1573
-      'handler' => 'views_handler_field_numeric',
1574
-      'click sortable' => TRUE
1575
-    ),
1576
-    'filter' => array(
1577
-      'handler' => 'views_handler_filter_numeric'
1578
-    ),
1579
-    'sort' => array(
1580
-      'handler' => 'views_handler_sort_numeric'
1581
-    )
1582
-  );
1583
-  $data['host_app_version']['et_avg'] = array(
1584
-    'title' => t('Average processing rate'),
1585
-    'help' => t('The "et_avg" for this app and by this host.'),
1586
-    'field' => array(
1587
-      'handler' => 'views_handler_field_boincwork_host_app_et_avg',
1588
-      'click sortable' => TRUE
1589
-    ),
1590
-    'filter' => array(
1591
-      'handler' => 'views_handler_filter_numeric'
1592
-    ),
1593
-    'sort' => array(
1594
-      'handler' => 'views_handler_sort_numeric'
1595
-    )
1596
-  );
1597
-  $data['host_app_version']['et_n'] = array(
1598
-    'title' => bts('Number of tasks completed', array(), NULL, 'boinc:application-details'),
1599
-    'help' => t('The tasks completed for this app and by this host.'),
1600
-    'field' => array(
1601
-      'handler' => 'views_handler_field_numeric',
1602
-      'click sortable' => TRUE
1603
-    ),
1604
-    'filter' => array(
1605
-      'handler' => 'views_handler_filter_numeric'
1606
-    ),
1607
-    'sort' => array(
1608
-      'handler' => 'views_handler_sort_numeric'
1609
-    )
1610
-  );
1611
-  $data['host_app_version']['max_jobs_per_day'] = array(
1612
-    'title' => bts('Max tasks per day', array(), NULL, 'boinc:application-details'),
1613
-    'help' => t('The maximum tasks per day for this app and by this host.'),
1614
-    'field' => array(
1615
-      'handler' => 'views_handler_field_numeric',
1616
-      'click sortable' => TRUE
1617
-    ),
1618
-    'filter' => array(
1619
-      'handler' => 'views_handler_filter_numeric'
1620
-    ),
1621
-    'sort' => array(
1622
-      'handler' => 'views_handler_sort_numeric'
1623
-    )
1624
-  );
1625
-  $data['host_app_version']['n_jobs_today'] = array(
1626
-    'title' => bts('Number of tasks today', array(), NULL, 'boinc:application-details'),
1627
-    'help' => t('The number of tasks today for this app and by this host.'),
1628
-    'field' => array(
1629
-      'handler' => 'views_handler_field_numeric',
1630
-      'click sortable' => TRUE
1631
-    ),
1632
-    'filter' => array(
1633
-      'handler' => 'views_handler_filter_numeric'
1634
-    ),
1635
-    'sort' => array(
1636
-      'handler' => 'views_handler_sort_numeric'
1637
-    )
1638
-  );
1639
-  $data['host_app_version']['turnaround_avg'] = array(
1640
-    'title' => bts('Average turnaround time', array(), NULL, 'boinc:application-details:-1:ignoreoverwrite'),
1641
-    'help' => t('The average turnaround time per task for this app and by this host.'),
1642
-    'field' => array(
1643
-      'handler' => 'views_handler_field_boincwork_host_app_turnaround_avg',
1644
-      'click sortable' => TRUE,
1645
-      'float' => TRUE,
1646
-    ),
1647
-    'filter' => array(
1648
-      'handler' => 'views_handler_filter_numeric'
1649
-    ),
1650
-    'sort' => array(
1651
-      'handler' => 'views_handler_sort_numeric'
1652
-    )
1653
-  );
1654
-  $data['host_app_version']['user_friendly_name'] = array(
1655
-    'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1656
-    'help' => t('The user friendly name of the application.'),
1657
-    'field' => array(
1658
-      'handler' => 'views_handler_field',
1659
-      'click sortable' => TRUE
1660
-    ),
1661
-    'filter' => array(
1662
-      'handler' => 'views_handler_filter_string'
1663
-    ),
1664
-    'sort' => array(
1665
-      'handler' => 'views_handler_sort_string'
1666
-    )
1667
-  );
1569
+$data['host_app_version']['consecutive_valid'] = array(
1570
+'title' => bts('Consecutive valid tasks', array(), NULL, 'boinc:application-details'),
1571
+'help' => t('The number of consecutive valid tasks for this app and by this host.'),
1572
+'field' => array(
1573
+  'handler' => 'views_handler_field_numeric',
1574
+  'click sortable' => TRUE
1575
+),
1576
+'filter' => array(
1577
+  'handler' => 'views_handler_filter_numeric'
1578
+),
1579
+'sort' => array(
1580
+  'handler' => 'views_handler_sort_numeric'
1581
+)
1582
+);
1583
+$data['host_app_version']['et_avg'] = array(
1584
+'title' => t('Average processing rate'),
1585
+'help' => t('The "et_avg" for this app and by this host.'),
1586
+'field' => array(
1587
+  'handler' => 'views_handler_field_boincwork_host_app_et_avg',
1588
+  'click sortable' => TRUE
1589
+),
1590
+'filter' => array(
1591
+  'handler' => 'views_handler_filter_numeric'
1592
+),
1593
+'sort' => array(
1594
+  'handler' => 'views_handler_sort_numeric'
1595
+)
1596
+);
1597
+$data['host_app_version']['et_n'] = array(
1598
+'title' => bts('Number of tasks completed', array(), NULL, 'boinc:application-details'),
1599
+'help' => t('The tasks completed for this app and by this host.'),
1600
+'field' => array(
1601
+  'handler' => 'views_handler_field_numeric',
1602
+  'click sortable' => TRUE
1603
+),
1604
+'filter' => array(
1605
+  'handler' => 'views_handler_filter_numeric'
1606
+),
1607
+'sort' => array(
1608
+  'handler' => 'views_handler_sort_numeric'
1609
+)
1610
+);
1611
+$data['host_app_version']['max_jobs_per_day'] = array(
1612
+'title' => bts('Max tasks per day', array(), NULL, 'boinc:application-details'),
1613
+'help' => t('The maximum tasks per day for this app and by this host.'),
1614
+'field' => array(
1615
+  'handler' => 'views_handler_field_numeric',
1616
+  'click sortable' => TRUE
1617
+),
1618
+'filter' => array(
1619
+  'handler' => 'views_handler_filter_numeric'
1620
+),
1621
+'sort' => array(
1622
+  'handler' => 'views_handler_sort_numeric'
1623
+)
1624
+);
1625
+$data['host_app_version']['n_jobs_today'] = array(
1626
+'title' => bts('Number of tasks today', array(), NULL, 'boinc:application-details'),
1627
+'help' => t('The number of tasks today for this app and by this host.'),
1628
+'field' => array(
1629
+  'handler' => 'views_handler_field_numeric',
1630
+  'click sortable' => TRUE
1631
+),
1632
+'filter' => array(
1633
+  'handler' => 'views_handler_filter_numeric'
1634
+),
1635
+'sort' => array(
1636
+  'handler' => 'views_handler_sort_numeric'
1637
+)
1638
+);
1639
+$data['host_app_version']['turnaround_avg'] = array(
1640
+'title' => bts('Average turnaround time', array(), NULL, 'boinc:application-details:-1:ignoreoverwrite'),
1641
+'help' => t('The average turnaround time per task for this app and by this host.'),
1642
+'field' => array(
1643
+  'handler' => 'views_handler_field_boincwork_host_app_turnaround_avg',
1644
+  'click sortable' => TRUE,
1645
+  'float' => TRUE,
1646
+),
1647
+'filter' => array(
1648
+  'handler' => 'views_handler_filter_numeric'
1649
+),
1650
+'sort' => array(
1651
+  'handler' => 'views_handler_sort_numeric'
1652
+)
1653
+);
1654
+$data['host_app_version']['user_friendly_name'] = array(
1655
+'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1656
+'help' => t('The user friendly name of the application.'),
1657
+'field' => array(
1658
+  'handler' => 'views_handler_field',
1659
+  'click sortable' => TRUE
1660
+),
1661
+'filter' => array(
1662
+  'handler' => 'views_handler_filter_string'
1663
+),
1664
+'sort' => array(
1665
+  'handler' => 'views_handler_sort_string'
1666
+)
1667
+);
1668 1668
   
1669
-  return $data;
1669
+return $data;
1670 1670
 }
1671 1671
 
1672 1672
 /*
@@ -1678,23 +1678,23 @@  discard block
 block discarded – undo
1678 1678
 
1679 1679
 function boincwork_views_handlers() {
1680 1680
   
1681
-  return array(
1682
-    'info' => array(
1683
-      'path' => drupal_get_path('module', 'boincwork') . '/views',
1684
-    ),
1685
-    'handlers' => array(
1686
-      'views_handler_argument_boincuser_id' => array(
1687
-        'parent' => 'views_handler_argument_numeric'
1688
-      ),
1689
-      'views_handler_field_boincwork_app_version_number' => array(
1690
-        'parent' => 'views_handler_field_numeric'
1691
-      ),
1692
-      'views_handler_field_boincwork_host_app_et_avg' => array(
1693
-        'parent' => 'views_handler_field_numeric'
1694
-      ),
1695
-      'views_handler_field_boincwork_host_app_turnaround_avg' => array(
1696
-        'parent' => 'views_handler_field_numeric'
1697
-      ),
1698
-    )
1699
-  );
1681
+return array(
1682
+'info' => array(
1683
+  'path' => drupal_get_path('module', 'boincwork') . '/views',
1684
+),
1685
+'handlers' => array(
1686
+  'views_handler_argument_boincuser_id' => array(
1687
+    'parent' => 'views_handler_argument_numeric'
1688
+  ),
1689
+  'views_handler_field_boincwork_app_version_number' => array(
1690
+    'parent' => 'views_handler_field_numeric'
1691
+  ),
1692
+  'views_handler_field_boincwork_host_app_et_avg' => array(
1693
+    'parent' => 'views_handler_field_numeric'
1694
+  ),
1695
+  'views_handler_field_boincwork_host_app_turnaround_avg' => array(
1696
+    'parent' => 'views_handler_field_numeric'
1697
+  ),
1698
+)
1699
+);
1700 1700
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.module 2 patches
Switch Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -300,125 +300,125 @@
 block discarded – undo
300 300
   }
301 301
   
302 302
   switch ($form_state['values']['import']) {
303
-    case 'users':
304
-      boincimport_users();
305
-      break;
306
-
307
-    case 'teams':
308
-      boincimport_teams();
309
-      if (!variable_get('boincimport_import_team_successful', 0)) {
310
-        $_SESSION['boincimport_stage_selected'] = 'teams';
311
-      }
312
-      else {
313
-        $_SESSION['boincimport_stage_selected'] = 'friends';
314
-      }
315
-      break;
303
+  case 'users':
304
+    boincimport_users();
305
+    break;
316 306
 
317
-    case 'friends':
318
-      boincimport_friends();
319
-      if (!variable_get('boincimport_import_friend_successful', 0)) {
320
-        $_SESSION['boincimport_stage_selected'] = 'friends';
321
-      }
322
-      else {
323
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
324
-      }
325
-      break;
307
+  case 'teams':
308
+    boincimport_teams();
309
+    if (!variable_get('boincimport_import_team_successful', 0)) {
310
+      $_SESSION['boincimport_stage_selected'] = 'teams';
311
+    }
312
+    else {
313
+      $_SESSION['boincimport_stage_selected'] = 'friends';
314
+    }
315
+    break;
326 316
 
327
-    case 'preferences':
328
-      boincimport_preferences();
329
-      if (!variable_get('boincimport_import_preferences_successful', 0)) {
330
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
331
-      }
332
-      else {
333
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
334
-      }
335
-      break;
317
+  case 'friends':
318
+    boincimport_friends();
319
+    if (!variable_get('boincimport_import_friend_successful', 0)) {
320
+      $_SESSION['boincimport_stage_selected'] = 'friends';
321
+    }
322
+    else {
323
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
324
+    }
325
+    break;
336 326
 
337
-    case 'private messages':
338
-      boincimport_private_msgs();
339
-      if (!variable_get('boincimport_import_private_msg_successful', 0)) {
340
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
341
-      }
342
-      else {
343
-        $_SESSION['boincimport_stage_selected'] = 'categories';
344
-      }
345
-      break;
327
+  case 'preferences':
328
+    boincimport_preferences();
329
+    if (!variable_get('boincimport_import_preferences_successful', 0)) {
330
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
331
+    }
332
+    else {
333
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
334
+    }
335
+    break;
346 336
 
347
-    case 'categories':
348
-      boincimport_forum_categories();
349
-      if (!variable_get('boincimport_import_category_successful', 0)) {
350
-        $_SESSION['boincimport_stage_selected'] = 'categories';
351
-      }
352
-      else {
353
-        $_SESSION['boincimport_stage_selected'] = 'topics';
354
-      }
355
-      break;
337
+  case 'private messages':
338
+    boincimport_private_msgs();
339
+    if (!variable_get('boincimport_import_private_msg_successful', 0)) {
340
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
341
+    }
342
+    else {
343
+      $_SESSION['boincimport_stage_selected'] = 'categories';
344
+    }
345
+    break;
356 346
 
357
-    case 'topics':      
358
-      boincimport_forum_topics();
359
-      if (!variable_get('boincimport_import_topic_successful', 0)) {
360
-        $_SESSION['boincimport_stage_selected'] = 'topics';
361
-      }
362
-      else {
363
-        $_SESSION['boincimport_stage_selected'] = 'posts';
364
-      }
365
-      break;
347
+  case 'categories':
348
+    boincimport_forum_categories();
349
+    if (!variable_get('boincimport_import_category_successful', 0)) {
350
+      $_SESSION['boincimport_stage_selected'] = 'categories';
351
+    }
352
+    else {
353
+      $_SESSION['boincimport_stage_selected'] = 'topics';
354
+    }
355
+    break;
356
+
357
+  case 'topics':      
358
+    boincimport_forum_topics();
359
+    if (!variable_get('boincimport_import_topic_successful', 0)) {
360
+      $_SESSION['boincimport_stage_selected'] = 'topics';
361
+    }
362
+    else {
363
+      $_SESSION['boincimport_stage_selected'] = 'posts';
364
+    }
365
+    break;
366 366
       
367
-    case 'posts':
368
-      boincimport_forum_posts();
369
-      if (!variable_get('boincimport_import_post_successful', 0)) {
370
-        $_SESSION['boincimport_stage_selected'] = 'posts';
371
-      }
372
-      else {
373
-        $_SESSION['boincimport_stage_selected'] = 'url';
374
-      }
375
-      break;
367
+  case 'posts':
368
+    boincimport_forum_posts();
369
+    if (!variable_get('boincimport_import_post_successful', 0)) {
370
+      $_SESSION['boincimport_stage_selected'] = 'posts';
371
+    }
372
+    else {
373
+      $_SESSION['boincimport_stage_selected'] = 'url';
374
+    }
375
+    break;
376 376
 
377
-    case 'team forums':
378
-      boincimport_team_forums();
379
-      if (!variable_get('boincimport_team_forum_successful', 0)) {
380
-        $_SESSION['boincimport_stage_selected'] = 'team forums';
381
-      }
382
-      else {
383
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
384
-      }
385
-      break;
377
+  case 'team forums':
378
+    boincimport_team_forums();
379
+    if (!variable_get('boincimport_team_forum_successful', 0)) {
380
+      $_SESSION['boincimport_stage_selected'] = 'team forums';
381
+    }
382
+    else {
383
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
384
+    }
385
+    break;
386 386
 
387
-    case 'team topics':      
388
-      boincimport_team_forum_topics();
389
-      if (!variable_get('boincimport_team_topic_successful', 0)) {
390
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
391
-      }
392
-      else {
393
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
394
-      }
395
-      break;
387
+  case 'team topics':      
388
+    boincimport_team_forum_topics();
389
+    if (!variable_get('boincimport_team_topic_successful', 0)) {
390
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
391
+    }
392
+    else {
393
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
394
+    }
395
+    break;
396 396
       
397
-    case 'team posts':
398
-      boincimport_team_forum_posts();
399
-      if (!variable_get('boincimport_team_post_successful', 0)) {
400
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
401
-      }
402
-      else {
403
-        $_SESSION['boincimport_stage_selected'] = 'url';
404
-      }
405
-      break;
397
+  case 'team posts':
398
+    boincimport_team_forum_posts();
399
+    if (!variable_get('boincimport_team_post_successful', 0)) {
400
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
401
+    }
402
+    else {
403
+      $_SESSION['boincimport_stage_selected'] = 'url';
404
+    }
405
+    break;
406 406
 
407
-    case 'url':
408
-      boincimport_replace_urls();
409
-      if (!variable_get('boincimport_replace_url_successful', 0)) {
410
-        $_SESSION['boincimport_stage_selected'] = 'url';
411
-      }
412
-      else {
413
-        drupal_set_message('Congratulations.  Import Finished');
414
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415
-        watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
416
-        unset($_SESSION['boincimport_stage_selected']);
417
-      }
418
-      break;
419
-    default:
420
-      $_SESSION['boincimport_stage_selected'] = 'users';
421
-      break;
407
+  case 'url':
408
+    boincimport_replace_urls();
409
+    if (!variable_get('boincimport_replace_url_successful', 0)) {
410
+      $_SESSION['boincimport_stage_selected'] = 'url';
411
+    }
412
+    else {
413
+      drupal_set_message('Congratulations.  Import Finished');
414
+      drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415
+      watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
416
+      unset($_SESSION['boincimport_stage_selected']);
417
+    }
418
+    break;
419
+  default:
420
+    $_SESSION['boincimport_stage_selected'] = 'users';
421
+    break;
422 422
   }
423 423
 }
424 424
 
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
   $boinc_db_url = (is_array($db_url)) ? (isset($db_url['boinc_rw']) ? $db_url['boinc_rw'] : $db_url['default']) : $db_url;
106 106
   variable_set('boincimport_db_url', $boinc_db_url);
107 107
   variable_set('boincimport_ready', 0);
108
-  return '<p>'. t('The BOINC database URL has been reset. You may now <a href="@configlink">go back to the configuration page</a>.',
109
-      array('@configlink' => url('admin/boinc/import/settings'))) .'</p>';
108
+  return '<p>'.t('The BOINC database URL has been reset. You may now <a href="@configlink">go back to the configuration page</a>.',
109
+      array('@configlink' => url('admin/boinc/import/settings'))).'</p>';
110 110
 }
111 111
 
112 112
 /**
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
  */
115 115
 function boincimport_unlock() {
116 116
   variable_del('boincimport_process_locked');
117
-  return '<p>'. t('The BOINC data import process has been unlocked. You may
117
+  return '<p>'.t('The BOINC data import process has been unlocked. You may
118 118
     now !proceed_with_import.', array(
119 119
       '!proceed_with_import' => l(t('proceed with the import'),
120 120
         'admin/boinc/import/process')
121
-    )) .'</p>';
121
+    )).'</p>';
122 122
 }
123 123
 
124 124
 /**
125 125
  * Callback admin/boinc/import/cleanup
126 126
  */
127 127
 function boincimport_cleanup() {
128
-  return boincimport_process_cleanup() .'<p>'. t('Drupal database cleaned.') .'</p>';
128
+  return boincimport_process_cleanup().'<p>'.t('Drupal database cleaned.').'</p>';
129 129
 }
130 130
 
131 131
 /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  * fails, the process will die() which is a bit too much since we only
139 139
  * want to test. Therefore, the test part of the code is not used, now.
140 140
  */
141
-function _boincimport_db_connect($test= 0) {
141
+function _boincimport_db_connect($test = 0) {
142 142
   global $db_url;
143 143
   $db_ready = variable_get('boincimport_db_configured', 1);
144 144
   if (!$db_ready) {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
       $db_url2['default'] = $db_url;
149 149
     }
150 150
     $db_url2['boinc_rw'] = variable_get('boincimport_db_url', $db_url);
151
-    $GLOBALS['db_url'] =& $db_url2;
151
+    $GLOBALS['db_url'] = & $db_url2;
152 152
     if ($test) {
153 153
       if (!db_connect($db_url2['boinc_rw'])) {
154 154
         return 0;
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
   $result = module_exists($module);
172 172
   $out['result'] = $result;
173 173
   if ($result == 1) {
174
-    $out['html'] .= '<li>'. t('Module %module is enabled. OK!', array('%module' => $module)) .'</li>';
174
+    $out['html'] .= '<li>'.t('Module %module is enabled. OK!', array('%module' => $module)).'</li>';
175 175
   }
176 176
   else {
177
-    $out['html'] .= '<li><span class="marker">'. t('Module %module is disabled.', array('%module' => $module)) .'</span></li>';
177
+    $out['html'] .= '<li><span class="marker">'.t('Module %module is disabled.', array('%module' => $module)).'</span></li>';
178 178
   }
179 179
   $out['html'] .= '</ul>';
180 180
   return $out;
@@ -187,32 +187,32 @@  discard block
 block discarded – undo
187 187
  *   $out['html'] = formatted html.
188 188
  *   $out['result'] = boolean.
189 189
  */
190
-function _boincimport_check_tables($tables = array(), $db = 'default' , $prefix = 1) {
190
+function _boincimport_check_tables($tables = array(), $db = 'default', $prefix = 1) {
191 191
   _boincimport_db_connect();
192 192
 
193 193
   $out['html'] = '<ul>';
194
-  $out['result']= 1;
194
+  $out['result'] = 1;
195 195
   foreach ($tables as $table) {
196 196
     if ($prefix) {
197
-      $table = db_prefix_tables('{'. $table .'}');
197
+      $table = db_prefix_tables('{'.$table.'}');
198 198
     }  
199 199
 
200 200
     db_set_active($db);
201 201
     if ($GLOBALS['db_type'] == 'pgsql') {
202 202
       // adapt from db_table_exists in database.pgsql.inc
203
-      $result = (bool) db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '%s'", $table));
203
+      $result = (bool)db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '%s'", $table));
204 204
     }
205 205
     else {
206 206
       // adapt from db_table_exists in database.mysql.inc
207
-      $result = (bool) db_fetch_object(db_query("SHOW TABLES LIKE '%s'", $table));
207
+      $result = (bool)db_fetch_object(db_query("SHOW TABLES LIKE '%s'", $table));
208 208
     }
209 209
     db_set_active('default');
210 210
     if ($result) {
211
-      $out['html'] .= '<li>'. t('Table %table: OK!', array('%table' => $table)) .'</li>';
211
+      $out['html'] .= '<li>'.t('Table %table: OK!', array('%table' => $table)).'</li>';
212 212
     }
213 213
     else {
214
-      $out['html'] .= '<li><span class="marker">'. t('Table <strong>%table</strong> does not exist!', array('%table' => $table)) .'</span></li>';
215
-      $out['result']= 0;
214
+      $out['html'] .= '<li><span class="marker">'.t('Table <strong>%table</strong> does not exist!', array('%table' => $table)).'</span></li>';
215
+      $out['result'] = 0;
216 216
     }
217 217
   }
218 218
   $out['html'] .= '</ul>';
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
   boinc_get_path();
227 227
   
228 228
   if (!variable_get('boincimport_ready', 0)) {
229
-    return '<p>'. t('You cannot import the data now. Please <a href="@settings">complete the setup first</a>', array('@settings' => url('admin/boinc/import/settings'))) .'</p>';
229
+    return '<p>'.t('You cannot import the data now. Please <a href="@settings">complete the setup first</a>', array('@settings' => url('admin/boinc/import/settings'))).'</p>';
230 230
   }
231 231
 
232 232
   $output = 'BOINC import process form';
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 function boincimport_process_form() {
238 238
   $form = array();
239
-  _boincimport_db_connect() ;
239
+  _boincimport_db_connect();
240 240
   // Causes problems with form api redirect
241 241
   //ini_set('display_errors', TRUE);
242 242
 
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
       }
412 412
       else {
413 413
         drupal_set_message('Congratulations.  Import Finished');
414
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
414
+        drupal_set_message('Please visit the '.l('Post migration configuration', 'admin/boinc/import/post_configuration').' page');
415 415
         watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
416 416
         unset($_SESSION['boincimport_stage_selected']);
417 417
       }
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
     $context['finished'] = 1;
633 633
   }
634 634
   else {
635
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
635
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
636 636
   }
637 637
 }
638 638
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
     // An error occurred.
662 662
     // $operations contains the operations that remained unprocessed.
663 663
     $error_operation = reset($operations);
664
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
664
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
665 665
   }
666 666
   drupal_set_message($message);
667 667
   
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
     $context['finished'] = 1;
846 846
   }
847 847
   else {
848
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
848
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
849 849
   }
850 850
 }
851 851
 
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
     // An error occurred.
873 873
     // $operations contains the operations that remained unprocessed.
874 874
     $error_operation = reset($operations);
875
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
875
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
876 876
   }
877 877
   drupal_set_message($message);
878 878
   
@@ -1018,7 +1018,7 @@  discard block
 block discarded – undo
1018 1018
     $context['finished'] = 1;
1019 1019
   }
1020 1020
   else {
1021
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1021
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1022 1022
   }
1023 1023
 }
1024 1024
 
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
     // An error occurred.
1047 1047
     // $operations contains the operations that remained unprocessed.
1048 1048
     $error_operation = reset($operations);
1049
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1049
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1050 1050
   }
1051 1051
   drupal_set_message($message);
1052 1052
   
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
     $context['finished'] = 1;
1203 1203
   }
1204 1204
   else {
1205
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1205
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1206 1206
   }
1207 1207
 }
1208 1208
 
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
     // An error occurred.
1232 1232
     // $operations contains the operations that remained unprocessed.
1233 1233
     $error_operation = reset($operations);
1234
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1234
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1235 1235
   }
1236 1236
   drupal_set_message($message);
1237 1237
   
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
     $context['finished'] = 1;
1382 1382
   }
1383 1383
   else {
1384
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1384
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1385 1385
   }
1386 1386
 }
1387 1387
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
     // An error occurred.
1409 1409
     // $operations contains the operations that remained unprocessed.
1410 1410
     $error_operation = reset($operations);
1411
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1411
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1412 1412
   }
1413 1413
   drupal_set_message($message);
1414 1414
   
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
     $context['finished'] = 1;
1710 1710
   }
1711 1711
   else {
1712
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1712
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1713 1713
   }
1714 1714
 }
1715 1715
 
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
     $context['finished'] = 1;
1788 1788
   }
1789 1789
   else {
1790
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1790
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
1791 1791
   }
1792 1792
 }
1793 1793
 
@@ -1800,34 +1800,34 @@  discard block
 block discarded – undo
1800 1800
   $forum_perms = array();
1801 1801
   $role_map = array_flip(user_roles());
1802 1802
   $forum_perms[$role_map['anonymous user']] = array(
1803
-    'view' => (int) !$hidden,
1803
+    'view' => (int)!$hidden,
1804 1804
     'update' => 0,
1805 1805
     'delete' => 0,
1806 1806
     'create' => 0,
1807 1807
   );
1808 1808
   $forum_perms[$role_map['authenticated user']] = array(
1809
-    'view' => (int) !$hidden,
1809
+    'view' => (int)!$hidden,
1810 1810
     'update' => 0,
1811 1811
     'delete' => 0,
1812 1812
     'create' => 0,
1813 1813
   );
1814 1814
   $forum_perms[$role_map['community member']] = array(
1815
-    'view' => (int) !$hidden,
1815
+    'view' => (int)!$hidden,
1816 1816
     'update' => 0,
1817 1817
     'delete' => 0,
1818
-    'create' => (int) $open,
1818
+    'create' => (int)$open,
1819 1819
   );
1820 1820
   $forum_perms[$role_map['verified contributor']] = array(
1821
-    'view' => (int) !$hidden,
1821
+    'view' => (int)!$hidden,
1822 1822
     'update' => 0,
1823 1823
     'delete' => 0,
1824
-    'create' => (int) !$hidden,
1824
+    'create' => (int)!$hidden,
1825 1825
   );
1826 1826
   $forum_perms[$role_map['moderator']] = array(
1827
-    'view' => (int) !$hidden,
1828
-    'update' => (int) !$hidden,
1827
+    'view' => (int)!$hidden,
1828
+    'update' => (int)!$hidden,
1829 1829
     'delete' => 0,
1830
-    'create' => (int) !$hidden,
1830
+    'create' => (int)!$hidden,
1831 1831
   );
1832 1832
   $forum_perms[$role_map['administrator']] = array(
1833 1833
     'view' => 1,
@@ -1892,7 +1892,7 @@  discard block
 block discarded – undo
1892 1892
     // An error occurred.
1893 1893
     // $operations contains the operations that remained unprocessed.
1894 1894
     $error_operation = reset($operations);
1895
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
1895
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
1896 1896
   }
1897 1897
   drupal_set_message($message);
1898 1898
   
@@ -1962,7 +1962,7 @@  discard block
 block discarded – undo
1962 1962
   $batch_size = 100;
1963 1963
   
1964 1964
   // Create batches to process
1965
-  for ($offset = 0; $offset < $topic_count; $offset+=$batch_size) {
1965
+  for ($offset = 0; $offset < $topic_count; $offset += $batch_size) {
1966 1966
     $topics_per_batch = $batch_size;
1967 1967
     if ($offset + $batch_size > $topic_count) {
1968 1968
       $topics_per_batch = $topic_count - $offset;
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
         'type' => $node_type,
2080 2080
         'title' => $topic->title,
2081 2081
         'uid' => $uid,
2082
-        'status' => ($topic->hidden) ? 0 : 1,  // published or not
2082
+        'status' => ($topic->hidden) ? 0 : 1, // published or not
2083 2083
         'promote' => $promote,
2084 2084
         'created' => $topic->create_time,
2085 2085
         'changed' => $topic->timestamp,
@@ -2093,7 +2093,7 @@  discard block
 block discarded – undo
2093 2093
       $node['tid'] = $tid;
2094 2094
       
2095 2095
       // Save the topic node
2096
-      $node = (object) $node; // node_save requires an object form
2096
+      $node = (object)$node; // node_save requires an object form
2097 2097
       node_save($node);
2098 2098
       taxonomy_node_save($node, array($tid));
2099 2099
       $success = ($node->nid) ? TRUE : FALSE;
@@ -2156,7 +2156,7 @@  discard block
 block discarded – undo
2156 2156
       $context['finished'] = 1;
2157 2157
     }
2158 2158
     else {
2159
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2159
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2160 2160
     }
2161 2161
   }
2162 2162
 }
@@ -2194,7 +2194,7 @@  discard block
 block discarded – undo
2194 2194
     // An error occurred.
2195 2195
     // $operations contains the operations that remained unprocessed.
2196 2196
     $error_operation = reset($operations);
2197
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2197
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2198 2198
   }
2199 2199
   drupal_set_message($message);
2200 2200
   
@@ -2270,7 +2270,7 @@  discard block
 block discarded – undo
2270 2270
   $batch_size = 100;
2271 2271
   
2272 2272
   // Create batches to process
2273
-  for ($offset = 0; $offset < $topic_count; $offset+=$batch_size) {
2273
+  for ($offset = 0; $offset < $topic_count; $offset += $batch_size) {
2274 2274
     $topics_per_batch = $batch_size;
2275 2275
     if ($offset + $batch_size > $topic_count) {
2276 2276
       $topics_per_batch = $topic_count - $offset;
@@ -2484,7 +2484,7 @@  discard block
 block discarded – undo
2484 2484
       $context['finished'] = 1;
2485 2485
     }
2486 2486
     else {
2487
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2487
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2488 2488
     }
2489 2489
   }
2490 2490
 }
@@ -2502,10 +2502,10 @@  discard block
 block discarded – undo
2502 2502
     $empty_posts = count($results['posts']['empty']);
2503 2503
     $failed_posts = count($results['posts']['failure']);
2504 2504
     $message = t(
2505
-      'Successfully imported @post_count posts in @topic_count topics ' .
2506
-      '(@skipped topics either had no replies or all replies were already imported, ' .
2507
-      '@duplicates posts were skipped as already imported, ' .
2508
-      '@empty_posts had no content, ' .
2505
+      'Successfully imported @post_count posts in @topic_count topics '.
2506
+      '(@skipped topics either had no replies or all replies were already imported, '.
2507
+      '@duplicates posts were skipped as already imported, '.
2508
+      '@empty_posts had no content, '.
2509 2509
       'and @error_posts encountered errors during import)',
2510 2510
       array(
2511 2511
         '@post_count' => $posts_imported,
@@ -2528,7 +2528,7 @@  discard block
 block discarded – undo
2528 2528
     // An error occurred.
2529 2529
     // $operations contains the operations that remained unprocessed.
2530 2530
     $error_operation = reset($operations);
2531
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2531
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2532 2532
   }
2533 2533
   drupal_set_message($message);
2534 2534
   
@@ -2698,7 +2698,7 @@  discard block
 block discarded – undo
2698 2698
     $context['finished'] = 1;
2699 2699
   }
2700 2700
   else {
2701
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2701
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2702 2702
   }
2703 2703
 }
2704 2704
 
@@ -2725,7 +2725,7 @@  discard block
 block discarded – undo
2725 2725
     // An error occurred.
2726 2726
     // $operations contains the operations that remained unprocessed.
2727 2727
     $error_operation = reset($operations);
2728
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2728
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2729 2729
   }
2730 2730
   drupal_set_message($message);
2731 2731
   
@@ -2907,7 +2907,7 @@  discard block
 block discarded – undo
2907 2907
         'type' => $node_type,
2908 2908
         'title' => $topic->title,
2909 2909
         'uid' => $uid,
2910
-        'status' => ($topic->hidden) ? 0 : 1,  // published or not
2910
+        'status' => ($topic->hidden) ? 0 : 1, // published or not
2911 2911
         'promote' => $promote,
2912 2912
         'created' => $topic->create_time,
2913 2913
         'changed' => $topic->timestamp,
@@ -2921,7 +2921,7 @@  discard block
 block discarded – undo
2921 2921
       );
2922 2922
       
2923 2923
       // Save the team topic node
2924
-      $node = (object) $node; // node_save requires an object form
2924
+      $node = (object)$node; // node_save requires an object form
2925 2925
       node_save($node);
2926 2926
 
2927 2927
       if ($node->nid) {
@@ -2967,7 +2967,7 @@  discard block
 block discarded – undo
2967 2967
     $context['finished'] = 1;
2968 2968
   }
2969 2969
   else {
2970
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2970
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
2971 2971
   }
2972 2972
 }
2973 2973
 
@@ -2994,7 +2994,7 @@  discard block
 block discarded – undo
2994 2994
     // An error occurred.
2995 2995
     // $operations contains the operations that remained unprocessed.
2996 2996
     $error_operation = reset($operations);
2997
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
2997
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
2998 2998
   }
2999 2999
   drupal_set_message($message);
3000 3000
   
@@ -3249,7 +3249,7 @@  discard block
 block discarded – undo
3249 3249
     $context['finished'] = 1;
3250 3250
   }
3251 3251
   else {
3252
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3252
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3253 3253
   }
3254 3254
 }
3255 3255
 
@@ -3276,7 +3276,7 @@  discard block
 block discarded – undo
3276 3276
     // An error occurred.
3277 3277
     // $operations contains the operations that remained unprocessed.
3278 3278
     $error_operation = reset($operations);
3279
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3279
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3280 3280
   }
3281 3281
   drupal_set_message($message);
3282 3282
   
@@ -3398,7 +3398,7 @@  discard block
 block discarded – undo
3398 3398
     $context['finished'] = 1;
3399 3399
   }
3400 3400
   else {
3401
-    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3401
+    $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3402 3402
   }
3403 3403
 }
3404 3404
 
@@ -3427,7 +3427,7 @@  discard block
 block discarded – undo
3427 3427
     // An error occurred.
3428 3428
     // $operations contains the operations that remained unprocessed.
3429 3429
     $error_operation = reset($operations);
3430
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3430
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3431 3431
   }
3432 3432
   drupal_set_message($message);
3433 3433
   
@@ -3503,7 +3503,7 @@  discard block
 block discarded – undo
3503 3503
   $batch_size = 100;
3504 3504
   
3505 3505
   // Create node batches to process
3506
-  for ($offset = 0; $offset < $node_count; $offset+=$batch_size) {
3506
+  for ($offset = 0; $offset < $node_count; $offset += $batch_size) {
3507 3507
     $nodes_per_batch = $batch_size;
3508 3508
     if ($offset + $batch_size > $node_count) {
3509 3509
       $nodes_per_batch = $node_count - $offset;
@@ -3515,7 +3515,7 @@  discard block
 block discarded – undo
3515 3515
     );
3516 3516
   }
3517 3517
   // Add comment batches
3518
-  for ($offset = 0; $offset < $comment_count; $offset+=$batch_size) {
3518
+  for ($offset = 0; $offset < $comment_count; $offset += $batch_size) {
3519 3519
     $comments_per_batch = $batch_size;
3520 3520
     if ($offset + $batch_size > $comment_count) {
3521 3521
       $comments_per_batch = $comment_count - $offset;
@@ -3527,7 +3527,7 @@  discard block
 block discarded – undo
3527 3527
     );
3528 3528
   }
3529 3529
   // And don't forget to process private messages
3530
-  for ($offset = 0; $offset < $pm_count; $offset+=$batch_size) {
3530
+  for ($offset = 0; $offset < $pm_count; $offset += $batch_size) {
3531 3531
     $messages_per_batch = $batch_size;
3532 3532
     if ($offset + $batch_size > $pm_count) {
3533 3533
       $messages_per_batch = $pm_count - $offset;
@@ -3616,7 +3616,7 @@  discard block
 block discarded – undo
3616 3616
       $context['finished'] = 1;
3617 3617
     }
3618 3618
     else {
3619
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3619
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3620 3620
     }
3621 3621
   }
3622 3622
 }
@@ -3680,7 +3680,7 @@  discard block
 block discarded – undo
3680 3680
       $context['finished'] = 1;
3681 3681
     }
3682 3682
     else {
3683
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3683
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3684 3684
     }
3685 3685
   }
3686 3686
 }
@@ -3743,7 +3743,7 @@  discard block
 block discarded – undo
3743 3743
       $context['finished'] = 1;
3744 3744
     }
3745 3745
     else {
3746
-      $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3746
+      $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max'];
3747 3747
     }
3748 3748
   }
3749 3749
 }
@@ -3812,7 +3812,7 @@  discard block
 block discarded – undo
3812 3812
     // An error occurred.
3813 3813
     // $operations contains the operations that remained unprocessed.
3814 3814
     $error_operation = reset($operations);
3815
-    $message = 'An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE);
3815
+    $message = 'An error occurred while processing '.$error_operation[0].' with arguments :'.print_r($error_operation[0], TRUE);
3816 3816
   }
3817 3817
   drupal_set_message($message);
3818 3818
   
@@ -3881,18 +3881,18 @@  discard block
 block discarded – undo
3881 3881
     $max = db_result(db_query('SELECT MAX(thread) FROM {comments} WHERE nid = %d', $edit['nid']));
3882 3882
     // Strip the "/" from the end of the thread.
3883 3883
     $max = rtrim($max, '/');
3884
-    $thread = int2vancode(vancode2int($max)+1) .'/';
3884
+    $thread = int2vancode(vancode2int($max) + 1).'/';
3885 3885
   } else {
3886 3886
     // This is comment with a parent comment: we increase the part of the thread
3887 3887
     // value at the proper depth.
3888 3888
     $parent = db_fetch_object(db_query('SELECT * FROM {comments} WHERE cid = %d', $edit['pid']));
3889 3889
     // Strip the "/" from the end of the parent thread.
3890
-    $parent->thread = (string) rtrim((string) $parent->thread, '/');
3890
+    $parent->thread = (string)rtrim((string)$parent->thread, '/');
3891 3891
     // Get the max value in _this_ thread.
3892 3892
     $max = db_result(db_query("SELECT MAX(thread) FROM {comments} WHERE thread LIKE '%s.%%' AND nid = %d", $parent->thread, $edit['nid']));
3893 3893
     if ($max == '') {
3894 3894
       // First child of this parent.
3895
-      $thread = $parent->thread .'.'. int2vancode(1) .'/';
3895
+      $thread = $parent->thread.'.'.int2vancode(1).'/';
3896 3896
     } else {
3897 3897
       // Strip the "/" at the end of the thread.
3898 3898
       $max = rtrim($max, '/');
@@ -3901,14 +3901,14 @@  discard block
 block discarded – undo
3901 3901
       $parent_depth = count(explode('.', $parent->thread));
3902 3902
       $last = $parts[$parent_depth];
3903 3903
       // Finally, build the thread field for this new comment.
3904
-      $thread = $parent->thread .'.'. int2vancode(vancode2int($last) + 1) .'/';
3904
+      $thread = $parent->thread.'.'.int2vancode(vancode2int($last) + 1).'/';
3905 3905
     }
3906 3906
   }
3907 3907
 
3908 3908
   $status = 0; // 1 - not published, 0 - published
3909 3909
   $format = variable_get('boincimport_input_format', 0);
3910 3910
   $score = 0; // 0 default value, comments get higher score depending on the author's roles
3911
-  $users = serialize(array(0 => 1));  // default value for everybody!!
3911
+  $users = serialize(array(0 => 1)); // default value for everybody!!
3912 3912
   
3913 3913
   if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too
3914 3914
     $edit['name'] = $user->name;
@@ -3942,7 +3942,7 @@  discard block
 block discarded – undo
3942 3942
   // BBcode to normal html
3943 3943
   if (variable_get('boincimport_bbcode', 0)) {
3944 3944
     $input_format = variable_get('boincimport_input_format', 0);
3945
-    $text = bbcode_filter('process', 0 , $input_format, $text);
3945
+    $text = bbcode_filter('process', 0, $input_format, $text);
3946 3946
   }
3947 3947
   return $text;
3948 3948
 }
Please login to merge, or discard this patch.