Passed
Push — dpa_sandbox3 ( ba60bd )
by David
12:10
created
html/ops/db_form.php 1 patch
Switch Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -35,63 +35,63 @@
 block discarded – undo
35 35
 start_table();
36 36
 
37 37
 switch($table){
38
-	case "platform":
39
-		break;
40
-	case "app":
41
-		break;
42
-    case "app_version":
43
-        print_detail_field();
44
-        print_query_field();
45
-        break;
46
-    case "host":
47
-        echo "
38
+case "platform":
39
+	break;
40
+case "app":
41
+	break;
42
+case "app_version":
43
+    print_detail_field();
44
+    print_query_field();
45
+    break;
46
+case "host":
47
+    echo "
48 48
             <tr>
49 49
             <td align=\"right\">Show Aggregate Information</td>
50 50
             <td>
51 51
         ";
52
-        print_checkbox("", "show_aggregate", $show_aggregate);
53
-        echo "
52
+    print_checkbox("", "show_aggregate", $show_aggregate);
53
+    echo "
54 54
             </td>
55 55
             </tr>
56 56
         ";
57
-        print_detail_field();
58
-        print_query_field();
59
-        break;
60
-    case "workunit":
61
-        print_detail_field();
62
-        print_query_field();
63
-        echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
64
-        break;
65
-    case "result":
66
-        echo "<tr><td align=\"right\">Server state</td><td> ";
67
-        server_state_select();
68
-        echo "</td></tr>\n";
69
-        //print_text_field( "Batch number:", "batch", $batch );
70
-        echo "<tr><td align=\"right\">Outcome</td><td>";
71
-        outcome_select();
72
-        echo "</td></tr>\n";
73
-        echo "<tr><td align=\"right\">Client state</td><td>";
74
-        client_state_select();
75
-        echo "</td></tr>\n";
76
-        echo "<tr><td align=\"right\">Validate state</td><td>";
77
-        validate_state_select();
78
-        echo "</td></tr>\n";
79
-        echo "<tr><td align=\"right\">Sort by</td><td>";
80
-        result_sort_select();
81
-        sort_order_select();
82
-        echo "</td></tr>\n";
83
-        print_detail_field();
84
-        print_query_field();
85
-        break;
86
-    case "team":
87
-        print_query_field();
88
-        break;
89
-    case "user":
90
-        print_query_field();
91
-        break;
92
-	default:
93
-		echo "Unknown table name\n";
94
-        exit();
57
+    print_detail_field();
58
+    print_query_field();
59
+    break;
60
+case "workunit":
61
+    print_detail_field();
62
+    print_query_field();
63
+    echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
64
+    break;
65
+case "result":
66
+    echo "<tr><td align=\"right\">Server state</td><td> ";
67
+    server_state_select();
68
+    echo "</td></tr>\n";
69
+    //print_text_field( "Batch number:", "batch", $batch );
70
+    echo "<tr><td align=\"right\">Outcome</td><td>";
71
+    outcome_select();
72
+    echo "</td></tr>\n";
73
+    echo "<tr><td align=\"right\">Client state</td><td>";
74
+    client_state_select();
75
+    echo "</td></tr>\n";
76
+    echo "<tr><td align=\"right\">Validate state</td><td>";
77
+    validate_state_select();
78
+    echo "</td></tr>\n";
79
+    echo "<tr><td align=\"right\">Sort by</td><td>";
80
+    result_sort_select();
81
+    sort_order_select();
82
+    echo "</td></tr>\n";
83
+    print_detail_field();
84
+    print_query_field();
85
+    break;
86
+case "team":
87
+    print_query_field();
88
+    break;
89
+case "user":
90
+    print_query_field();
91
+    break;
92
+default:
93
+	echo "Unknown table name\n";
94
+       exit();
95 95
 }
96 96
 
97 97
 row2("Number of entries to show", "<input name=\"nresults\" value=\"20\">");
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.module 1 patch
Switch Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -301,125 +301,125 @@
 block discarded – undo
301 301
   }
302 302
 
303 303
   switch ($form_state['values']['import']) {
304
-    case 'users':
305
-      boincimport_users();
306
-      break;
307
-
308
-    case 'teams':
309
-      boincimport_teams();
310
-      if (!variable_get('boincimport_import_team_successful', 0)) {
311
-        $_SESSION['boincimport_stage_selected'] = 'teams';
312
-      }
313
-      else {
314
-        $_SESSION['boincimport_stage_selected'] = 'friends';
315
-      }
316
-      break;
304
+  case 'users':
305
+    boincimport_users();
306
+    break;
317 307
 
318
-    case 'friends':
319
-      boincimport_friends();
320
-      if (!variable_get('boincimport_import_friend_successful', 0)) {
321
-        $_SESSION['boincimport_stage_selected'] = 'friends';
322
-      }
323
-      else {
324
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
325
-      }
326
-      break;
308
+  case 'teams':
309
+    boincimport_teams();
310
+    if (!variable_get('boincimport_import_team_successful', 0)) {
311
+      $_SESSION['boincimport_stage_selected'] = 'teams';
312
+    }
313
+    else {
314
+      $_SESSION['boincimport_stage_selected'] = 'friends';
315
+    }
316
+    break;
327 317
 
328
-    case 'preferences':
329
-      boincimport_preferences();
330
-      if (!variable_get('boincimport_import_preferences_successful', 0)) {
331
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
332
-      }
333
-      else {
334
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
335
-      }
336
-      break;
318
+  case 'friends':
319
+    boincimport_friends();
320
+    if (!variable_get('boincimport_import_friend_successful', 0)) {
321
+      $_SESSION['boincimport_stage_selected'] = 'friends';
322
+    }
323
+    else {
324
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
325
+    }
326
+    break;
337 327
 
338
-    case 'private messages':
339
-      boincimport_private_msgs();
340
-      if (!variable_get('boincimport_import_private_msg_successful', 0)) {
341
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
342
-      }
343
-      else {
344
-        $_SESSION['boincimport_stage_selected'] = 'categories';
345
-      }
346
-      break;
328
+  case 'preferences':
329
+    boincimport_preferences();
330
+    if (!variable_get('boincimport_import_preferences_successful', 0)) {
331
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
332
+    }
333
+    else {
334
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
335
+    }
336
+    break;
347 337
 
348
-    case 'categories':
349
-      boincimport_forum_categories();
350
-      if (!variable_get('boincimport_import_category_successful', 0)) {
351
-        $_SESSION['boincimport_stage_selected'] = 'categories';
352
-      }
353
-      else {
354
-        $_SESSION['boincimport_stage_selected'] = 'topics';
355
-      }
356
-      break;
338
+  case 'private messages':
339
+    boincimport_private_msgs();
340
+    if (!variable_get('boincimport_import_private_msg_successful', 0)) {
341
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
342
+    }
343
+    else {
344
+      $_SESSION['boincimport_stage_selected'] = 'categories';
345
+    }
346
+    break;
357 347
 
358
-    case 'topics':
359
-      boincimport_forum_topics();
360
-      if (!variable_get('boincimport_import_topic_successful', 0)) {
361
-        $_SESSION['boincimport_stage_selected'] = 'topics';
362
-      }
363
-      else {
364
-        $_SESSION['boincimport_stage_selected'] = 'posts';
365
-      }
366
-      break;
348
+  case 'categories':
349
+    boincimport_forum_categories();
350
+    if (!variable_get('boincimport_import_category_successful', 0)) {
351
+      $_SESSION['boincimport_stage_selected'] = 'categories';
352
+    }
353
+    else {
354
+      $_SESSION['boincimport_stage_selected'] = 'topics';
355
+    }
356
+    break;
367 357
 
368
-    case 'posts':
369
-      boincimport_forum_posts();
370
-      if (!variable_get('boincimport_import_post_successful', 0)) {
371
-        $_SESSION['boincimport_stage_selected'] = 'posts';
372
-      }
373
-      else {
374
-        $_SESSION['boincimport_stage_selected'] = 'url';
375
-      }
376
-      break;
358
+  case 'topics':
359
+    boincimport_forum_topics();
360
+    if (!variable_get('boincimport_import_topic_successful', 0)) {
361
+      $_SESSION['boincimport_stage_selected'] = 'topics';
362
+    }
363
+    else {
364
+      $_SESSION['boincimport_stage_selected'] = 'posts';
365
+    }
366
+    break;
377 367
 
378
-    case 'team forums':
379
-      boincimport_team_forums();
380
-      if (!variable_get('boincimport_team_forum_successful', 0)) {
381
-        $_SESSION['boincimport_stage_selected'] = 'team forums';
382
-      }
383
-      else {
384
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
385
-      }
386
-      break;
368
+  case 'posts':
369
+    boincimport_forum_posts();
370
+    if (!variable_get('boincimport_import_post_successful', 0)) {
371
+      $_SESSION['boincimport_stage_selected'] = 'posts';
372
+    }
373
+    else {
374
+      $_SESSION['boincimport_stage_selected'] = 'url';
375
+    }
376
+    break;
387 377
 
388
-    case 'team topics':
389
-      boincimport_team_forum_topics();
390
-      if (!variable_get('boincimport_team_topic_successful', 0)) {
391
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
392
-      }
393
-      else {
394
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
395
-      }
396
-      break;
378
+  case 'team forums':
379
+    boincimport_team_forums();
380
+    if (!variable_get('boincimport_team_forum_successful', 0)) {
381
+      $_SESSION['boincimport_stage_selected'] = 'team forums';
382
+    }
383
+    else {
384
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
385
+    }
386
+    break;
397 387
 
398
-    case 'team posts':
399
-      boincimport_team_forum_posts();
400
-      if (!variable_get('boincimport_team_post_successful', 0)) {
401
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
402
-      }
403
-      else {
404
-        $_SESSION['boincimport_stage_selected'] = 'url';
405
-      }
406
-      break;
388
+  case 'team topics':
389
+    boincimport_team_forum_topics();
390
+    if (!variable_get('boincimport_team_topic_successful', 0)) {
391
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
392
+    }
393
+    else {
394
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
395
+    }
396
+    break;
407 397
 
408
-    case 'url':
409
-      boincimport_replace_urls();
410
-      if (!variable_get('boincimport_replace_url_successful', 0)) {
411
-        $_SESSION['boincimport_stage_selected'] = 'url';
412
-      }
413
-      else {
414
-        drupal_set_message('Congratulations.  Import Finished');
415
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
416
-        watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO);
417
-        unset($_SESSION['boincimport_stage_selected']);
418
-      }
419
-      break;
420
-    default:
421
-      $_SESSION['boincimport_stage_selected'] = 'users';
422
-      break;
398
+  case 'team posts':
399
+    boincimport_team_forum_posts();
400
+    if (!variable_get('boincimport_team_post_successful', 0)) {
401
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
402
+    }
403
+    else {
404
+      $_SESSION['boincimport_stage_selected'] = 'url';
405
+    }
406
+    break;
407
+
408
+  case 'url':
409
+    boincimport_replace_urls();
410
+    if (!variable_get('boincimport_replace_url_successful', 0)) {
411
+      $_SESSION['boincimport_stage_selected'] = 'url';
412
+    }
413
+    else {
414
+      drupal_set_message('Congratulations.  Import Finished');
415
+      drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
416
+      watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO);
417
+      unset($_SESSION['boincimport_stage_selected']);
418
+    }
419
+    break;
420
+  default:
421
+    $_SESSION['boincimport_stage_selected'] = 'users';
422
+    break;
423 423
   }
424 424
 }
425 425
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.helpers.inc 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -643,9 +643,9 @@  discard block
 block discarded – undo
643 643
     }
644 644
     break;
645 645
 
646
-    default:
647
-      // Don't generate form elements for things that aren't explicitly form
648
-      // elements (i.e. 'title', '@attributes' keys, and the like)
646
+  default:
647
+    // Don't generate form elements for things that aren't explicitly form
648
+    // elements (i.e. 'title', '@attributes' keys, and the like)
649 649
   }
650 650
 }
651 651
 
@@ -1990,31 +1990,31 @@  discard block
 block discarded – undo
1990 1990
  */
1991 1991
 function pretty_application_version($appverid, $vernum, $plan_class, $plfm) {
1992 1992
   switch ($appverid) {
1993
-    case ANON_PLATFORM_UNKNOWN:
1994
-      return "Anonymous platform";
1995
-    case ANON_PLATFORM_CPU:
1996
-      return "Anonymous platform CPU";
1997
-    case ANON_PLATFORM_NVIDIA:
1998
-      return "Anonymous platform NVIDIA GPU";
1999
-    case ANON_PLATFORM_ATI:
2000
-      return "Anonymous platform AMD GPU";
2001
-    case ANON_PLATFORM_INTEL_GPU:
2002
-      return "Anonymous platform Intel GPU";
2003
-    case ANON_PLATFORM_APPLE_GPU:
2004
-      return "Anonymous platform Apple GPU";
2005
-    case 0:
2006
-      return "---";
2007
-    default:
2008
-      // Handle the case where the appversid is still negative. This
2009
-      // may be cause BOINC has introduced a new anonymous platform
2010
-      // that is not handled by the above case statements.
2011
-      if ($appverid < 0) {
2012
-        return "Unknown Anonymous platform";
2013
-      }
2014
-      else {
2015
-        $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
2016
-        $prettyc = ($plan_class) ? "($av->plan_class)" : '';
2017
-        return "v$prettyv $prettyc $plfm";
2018
-      }
1993
+  case ANON_PLATFORM_UNKNOWN:
1994
+    return "Anonymous platform";
1995
+  case ANON_PLATFORM_CPU:
1996
+    return "Anonymous platform CPU";
1997
+  case ANON_PLATFORM_NVIDIA:
1998
+    return "Anonymous platform NVIDIA GPU";
1999
+  case ANON_PLATFORM_ATI:
2000
+    return "Anonymous platform AMD GPU";
2001
+  case ANON_PLATFORM_INTEL_GPU:
2002
+    return "Anonymous platform Intel GPU";
2003
+  case ANON_PLATFORM_APPLE_GPU:
2004
+    return "Anonymous platform Apple GPU";
2005
+  case 0:
2006
+    return "---";
2007
+  default:
2008
+    // Handle the case where the appversid is still negative. This
2009
+    // may be cause BOINC has introduced a new anonymous platform
2010
+    // that is not handled by the above case statements.
2011
+    if ($appverid < 0) {
2012
+      return "Unknown Anonymous platform";
2013
+    }
2014
+    else {
2015
+      $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
2016
+      $prettyc = ($plan_class) ? "($av->plan_class)" : '';
2017
+      return "v$prettyv $prettyc $plfm";
2018
+    }
2019 2019
   }
2020 2020
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.views.inc 1 patch
Switch Indentation   +254 added lines, -254 removed lines patch added patch discarded remove patch
@@ -13,255 +13,255 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function boincuser_views_data() {
15 15
 
16
-  // -----------------------------------------------------------------------------------------------
17
-  // Definition for user table
18
-  // -----------------------------------------------------------------------------------------------
16
+// -----------------------------------------------------------------------------------------------
17
+// Definition for user table
18
+// -----------------------------------------------------------------------------------------------
19 19
 
20
-  $data['user']['table']['group'] = t('BOINC');
20
+$data['user']['table']['group'] = t('BOINC');
21 21
 
22
-  $data['user']['table']['base'] = array(
23
-      'field' => 'id',
24
-      'title' => t('BOINC user'),
25
-      'help' => t('BOINC account data for a user'),
26
-      'database' => 'boinc_ro'
27
-  );
22
+$data['user']['table']['base'] = array(
23
+  'field' => 'id',
24
+  'title' => t('BOINC user'),
25
+  'help' => t('BOINC account data for a user'),
26
+  'database' => 'boinc_ro'
27
+);
28 28
 
29
-  // Describe each of the individual fields in this table to Views. For
30
-  // each field, you may define what field, sort, argument, and/or filter
31
-  // handlers it supports. This will determine where in the Views interface you
32
-  // may use the field.
29
+// Describe each of the individual fields in this table to Views. For
30
+// each field, you may define what field, sort, argument, and/or filter
31
+// handlers it supports. This will determine where in the Views interface you
32
+// may use the field.
33 33
 
34
-  // Primary keys allowed as arguments
34
+// Primary keys allowed as arguments
35 35
 
36
-  $data['user']['id'] = array(
37
-    'title' => bts('Id', array(), NULL, 'boinc:user-id'),
38
-    'help' => t('The BOINC ID of the user account.'),
39
-    'field' => array(
40
-      'handler' => 'views_handler_field_numeric',
41
-      'click sortable' => TRUE
42
-    ),
43
-    'argument' => array(
44
-      'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
-      'name field' => 'title', // the field to display in the summary.
46
-      'numeric' => TRUE,
47
-      'validate type' => 'id'
48
-    ),
49
-    'filter' => array(
50
-      'handler' => 'views_handler_filter_numeric'
51
-    ),
52
-    'sort' => array(
53
-      'handler' => 'views_handler_sort_numeric'
54
-    )
55
-  );
56
-  $data['user']['teamid'] = array(
57
-    'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
58
-    'help' => t('The ID of the user\'s team.'),
59
-    'field' => array(
60
-      'handler' => 'views_handler_field_numeric',
61
-      'click sortable' => TRUE,
62
-    ),
63
-    'argument' => array(
64
-      'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
-      'name field' => 'title', // the field to display in the summary.
66
-      'numeric' => TRUE,
67
-      'validate type' => 'id'
68
-    ),
69
-    'filter' => array(
70
-      'handler' => 'views_handler_filter_numeric'
71
-    ),
72
-    'sort' => array(
73
-      'handler' => 'views_handler_sort_numeric'
74
-    )
75
-  );
36
+$data['user']['id'] = array(
37
+'title' => bts('Id', array(), NULL, 'boinc:user-id'),
38
+'help' => t('The BOINC ID of the user account.'),
39
+'field' => array(
40
+  'handler' => 'views_handler_field_numeric',
41
+  'click sortable' => TRUE
42
+),
43
+'argument' => array(
44
+  'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
+  'name field' => 'title', // the field to display in the summary.
46
+  'numeric' => TRUE,
47
+  'validate type' => 'id'
48
+),
49
+'filter' => array(
50
+  'handler' => 'views_handler_filter_numeric'
51
+),
52
+'sort' => array(
53
+  'handler' => 'views_handler_sort_numeric'
54
+)
55
+);
56
+$data['user']['teamid'] = array(
57
+'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
58
+'help' => t('The ID of the user\'s team.'),
59
+'field' => array(
60
+  'handler' => 'views_handler_field_numeric',
61
+  'click sortable' => TRUE,
62
+),
63
+'argument' => array(
64
+  'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
+  'name field' => 'title', // the field to display in the summary.
66
+  'numeric' => TRUE,
67
+  'validate type' => 'id'
68
+),
69
+'filter' => array(
70
+  'handler' => 'views_handler_filter_numeric'
71
+),
72
+'sort' => array(
73
+  'handler' => 'views_handler_sort_numeric'
74
+)
75
+);
76 76
 
77
-  // Descriptions of general host fields (alphabetized)
77
+// Descriptions of general host fields (alphabetized)
78 78
 
79
-  $data['user']['authenticator'] = array(
80
-    'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
81
-    'help' => t('The BOINC account key of the user.'),
82
-    'field' => array(
83
-      'handler' => 'views_handler_field',
84
-      'click sortable' => TRUE
85
-    ),
86
-    'filter' => array(
87
-      'handler' => 'views_handler_filter_string'
88
-    ),
89
-    'sort' => array(
90
-      'handler' => 'views_handler_sort_string'
91
-    )
92
-  );
93
-  $data['user']['country'] = array(
94
-    'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
95
-    'help' => t('The country of the user.'),
96
-    'field' => array(
97
-      'handler' => 'views_handler_field',
98
-      'click sortable' => TRUE
99
-    ),
100
-    'filter' => array(
101
-      'handler' => 'views_handler_filter_string'
102
-    ),
103
-    'sort' => array(
104
-      'handler' => 'views_handler_sort_string'
105
-    )
106
-  );
107
-  $data['user']['create_time'] = array(
108
-    'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
109
-    'help' => t('When the BOINC account was created.'),
110
-    'field' => array(
111
-      'handler' => 'views_handler_field_date',
112
-      'click sortable' => TRUE
113
-    ),
114
-    'filter' => array(
115
-      'handler' => 'views_handler_filter_date'
116
-    ),
117
-    'sort' => array(
118
-      'handler' => 'views_handler_sort_date'
119
-    )
120
-  );
121
-  $data['user']['cross_project_id'] = array(
122
-    'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
123
-    'help' => t('The cross project user identifier.'),
124
-    'field' => array(
125
-      'handler' => 'views_handler_field',
126
-      'click sortable' => TRUE
127
-    ),
128
-    'filter' => array(
129
-      'handler' => 'views_handler_filter_string'
130
-    ),
131
-    'sort' => array(
132
-      'handler' => 'views_handler_sort_string'
133
-    )
134
-  );
135
-  $data['user']['email_addr'] = array(
136
-      'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
137
-    'help' => t('The BOINC account email address.'),
138
-    'field' => array(
139
-      'handler' => 'views_handler_field',
140
-      'click sortable' => TRUE
141
-    ),
142
-    'filter' => array(
143
-      'handler' => 'views_handler_filter_string'
144
-    ),
145
-    'sort' => array(
146
-      'handler' => 'views_handler_sort_string'
147
-    )
148
-  );
149
-  $data['user']['expavg_credit'] = array(
150
-    'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
151
-    'help' => t('A decaying average of credit per day for the user.'),
152
-    'field' => array(
153
-      'handler' => 'views_handler_field_numeric',
154
-      'click sortable' => TRUE,
155
-      'float' => TRUE
156
-    ),
157
-    'filter' => array(
158
-      'handler' => 'views_handler_filter_numeric'
159
-    ),
160
-    'sort' => array(
161
-      'handler' => 'views_handler_sort_numeric'
162
-    )
163
-  );
164
-  $data['user']['name'] = array(
165
-    'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
166
-    'help' => t('The BOINC account user name.'),
167
-    'field' => array(
168
-      'handler' => 'views_handler_field',
169
-      'click sortable' => TRUE
170
-    ),
171
-    'filter' => array(
172
-      'handler' => 'views_handler_filter_string'
173
-    ),
174
-    'sort' => array(
175
-      'handler' => 'views_handler_sort_string'
176
-    )
177
-  );
178
-  $data['user']['passwd_hash'] = array(
179
-    'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
180
-    'help' => t('The user password hash'),
181
-    'field' => array(
182
-      'handler' => 'views_handler_field',
183
-      'click sortable' => TRUE
184
-    ),
185
-    'filter' => array(
186
-      'handler' => 'views_handler_filter_string'
187
-    ),
188
-    'sort' => array(
189
-      'handler' => 'views_handler_sort_string'
190
-    )
191
-  );
192
-  $data['user']['postal_code'] = array(
193
-    'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
194
-    'help' => t('The postal code of the user.'),
195
-    'field' => array(
196
-      'handler' => 'views_handler_field',
197
-      'click sortable' => TRUE
198
-    ),
199
-    'filter' => array(
200
-      'handler' => 'views_handler_filter_string'
201
-    ),
202
-    'sort' => array(
203
-      'handler' => 'views_handler_sort_string'
204
-    )
205
-  );
206
-  $data['user']['send_email'] = array(
207
-    'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
208
-    'help' => t('User preference to allow email communications.'),
209
-    'field' => array(
210
-      'handler' => 'views_handler_field_numeric',
211
-      'click sortable' => TRUE
212
-    ),
213
-    'filter' => array(
214
-      'handler' => 'views_handler_filter_numeric'
215
-    ),
216
-    'sort' => array(
217
-      'handler' => 'views_handler_sort_numeric'
218
-    )
219
-  );
220
-  $data['user']['show_hosts'] = array(
221
-    'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
222
-    'help' => t('User preference to display owned computers.'),
223
-    'field' => array(
224
-      'handler' => 'views_handler_field_numeric',
225
-      'click sortable' => TRUE
226
-    ),
227
-    'filter' => array(
228
-      'handler' => 'views_handler_filter_numeric'
229
-    ),
230
-    'sort' => array(
231
-      'handler' => 'views_handler_sort_numeric'
232
-    )
233
-  );
234
-  $data['user']['total_credit'] = array(
235
-    'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
236
-    'help' => t('The total accumulated BOINC credit for the user.'),
237
-    'field' => array(
238
-      'handler' => 'views_handler_field_numeric',
239
-      'click sortable' => TRUE,
240
-      'float' => TRUE
241
-    ),
242
-    'filter' => array(
243
-      'handler' => 'views_handler_filter_numeric'
244
-    ),
245
-    'sort' => array(
246
-      'handler' => 'views_handler_sort_numeric'
247
-    )
248
-  );
249
-  $data['user']['url'] = array(
250
-    'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
251
-    'help' => t('The URL provided by the user'),
252
-    'field' => array(
253
-      'handler' => 'views_handler_field',
254
-      'click sortable' => TRUE
255
-    ),
256
-    'filter' => array(
257
-      'handler' => 'views_handler_filter_string'
258
-    ),
259
-    'sort' => array(
260
-      'handler' => 'views_handler_sort_string'
261
-    )
262
-  );
79
+$data['user']['authenticator'] = array(
80
+'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
81
+'help' => t('The BOINC account key of the user.'),
82
+'field' => array(
83
+  'handler' => 'views_handler_field',
84
+  'click sortable' => TRUE
85
+),
86
+'filter' => array(
87
+  'handler' => 'views_handler_filter_string'
88
+),
89
+'sort' => array(
90
+  'handler' => 'views_handler_sort_string'
91
+)
92
+);
93
+$data['user']['country'] = array(
94
+'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
95
+'help' => t('The country of the user.'),
96
+'field' => array(
97
+  'handler' => 'views_handler_field',
98
+  'click sortable' => TRUE
99
+),
100
+'filter' => array(
101
+  'handler' => 'views_handler_filter_string'
102
+),
103
+'sort' => array(
104
+  'handler' => 'views_handler_sort_string'
105
+)
106
+);
107
+$data['user']['create_time'] = array(
108
+'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
109
+'help' => t('When the BOINC account was created.'),
110
+'field' => array(
111
+  'handler' => 'views_handler_field_date',
112
+  'click sortable' => TRUE
113
+),
114
+'filter' => array(
115
+  'handler' => 'views_handler_filter_date'
116
+),
117
+'sort' => array(
118
+  'handler' => 'views_handler_sort_date'
119
+)
120
+);
121
+$data['user']['cross_project_id'] = array(
122
+'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
123
+'help' => t('The cross project user identifier.'),
124
+'field' => array(
125
+  'handler' => 'views_handler_field',
126
+  'click sortable' => TRUE
127
+),
128
+'filter' => array(
129
+  'handler' => 'views_handler_filter_string'
130
+),
131
+'sort' => array(
132
+  'handler' => 'views_handler_sort_string'
133
+)
134
+);
135
+$data['user']['email_addr'] = array(
136
+  'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
137
+'help' => t('The BOINC account email address.'),
138
+'field' => array(
139
+  'handler' => 'views_handler_field',
140
+  'click sortable' => TRUE
141
+),
142
+'filter' => array(
143
+  'handler' => 'views_handler_filter_string'
144
+),
145
+'sort' => array(
146
+  'handler' => 'views_handler_sort_string'
147
+)
148
+);
149
+$data['user']['expavg_credit'] = array(
150
+'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
151
+'help' => t('A decaying average of credit per day for the user.'),
152
+'field' => array(
153
+  'handler' => 'views_handler_field_numeric',
154
+  'click sortable' => TRUE,
155
+  'float' => TRUE
156
+),
157
+'filter' => array(
158
+  'handler' => 'views_handler_filter_numeric'
159
+),
160
+'sort' => array(
161
+  'handler' => 'views_handler_sort_numeric'
162
+)
163
+);
164
+$data['user']['name'] = array(
165
+'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
166
+'help' => t('The BOINC account user name.'),
167
+'field' => array(
168
+  'handler' => 'views_handler_field',
169
+  'click sortable' => TRUE
170
+),
171
+'filter' => array(
172
+  'handler' => 'views_handler_filter_string'
173
+),
174
+'sort' => array(
175
+  'handler' => 'views_handler_sort_string'
176
+)
177
+);
178
+$data['user']['passwd_hash'] = array(
179
+'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
180
+'help' => t('The user password hash'),
181
+'field' => array(
182
+  'handler' => 'views_handler_field',
183
+  'click sortable' => TRUE
184
+),
185
+'filter' => array(
186
+  'handler' => 'views_handler_filter_string'
187
+),
188
+'sort' => array(
189
+  'handler' => 'views_handler_sort_string'
190
+)
191
+);
192
+$data['user']['postal_code'] = array(
193
+'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
194
+'help' => t('The postal code of the user.'),
195
+'field' => array(
196
+  'handler' => 'views_handler_field',
197
+  'click sortable' => TRUE
198
+),
199
+'filter' => array(
200
+  'handler' => 'views_handler_filter_string'
201
+),
202
+'sort' => array(
203
+  'handler' => 'views_handler_sort_string'
204
+)
205
+);
206
+$data['user']['send_email'] = array(
207
+'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
208
+'help' => t('User preference to allow email communications.'),
209
+'field' => array(
210
+  'handler' => 'views_handler_field_numeric',
211
+  'click sortable' => TRUE
212
+),
213
+'filter' => array(
214
+  'handler' => 'views_handler_filter_numeric'
215
+),
216
+'sort' => array(
217
+  'handler' => 'views_handler_sort_numeric'
218
+)
219
+);
220
+$data['user']['show_hosts'] = array(
221
+'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
222
+'help' => t('User preference to display owned computers.'),
223
+'field' => array(
224
+  'handler' => 'views_handler_field_numeric',
225
+  'click sortable' => TRUE
226
+),
227
+'filter' => array(
228
+  'handler' => 'views_handler_filter_numeric'
229
+),
230
+'sort' => array(
231
+  'handler' => 'views_handler_sort_numeric'
232
+)
233
+);
234
+$data['user']['total_credit'] = array(
235
+'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
236
+'help' => t('The total accumulated BOINC credit for the user.'),
237
+'field' => array(
238
+  'handler' => 'views_handler_field_numeric',
239
+  'click sortable' => TRUE,
240
+  'float' => TRUE
241
+),
242
+'filter' => array(
243
+  'handler' => 'views_handler_filter_numeric'
244
+),
245
+'sort' => array(
246
+  'handler' => 'views_handler_sort_numeric'
247
+)
248
+);
249
+$data['user']['url'] = array(
250
+'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
251
+'help' => t('The URL provided by the user'),
252
+'field' => array(
253
+  'handler' => 'views_handler_field',
254
+  'click sortable' => TRUE
255
+),
256
+'filter' => array(
257
+  'handler' => 'views_handler_filter_string'
258
+),
259
+'sort' => array(
260
+  'handler' => 'views_handler_sort_string'
261
+)
262
+);
263 263
 
264
-  return $data;
264
+return $data;
265 265
 }
266 266
 
267 267
 /*
@@ -272,17 +272,17 @@  discard block
 block discarded – undo
272 272
  */
273 273
 
274 274
 function boincuser_views_handlers() {
275
-  return array(
276
-    'info' => array(
277
-      'path' => drupal_get_path('module', 'boincuser') . '/views',
278
-    ),
279
-    'handlers' => array(
280
-      'views_handler_argument_boincuser_id' => array(
281
-        'parent' => 'views_handler_argument_numeric'
282
-      ),
283
-      'views_handler_argument_boincteam_id' => array(
284
-        'parent' => 'views_handler_argument_numeric'
285
-      ),
286
-    )
287
-  );
275
+return array(
276
+'info' => array(
277
+  'path' => drupal_get_path('module', 'boincuser') . '/views',
278
+),
279
+'handlers' => array(
280
+  'views_handler_argument_boincuser_id' => array(
281
+    'parent' => 'views_handler_argument_numeric'
282
+  ),
283
+  'views_handler_argument_boincteam_id' => array(
284
+    'parent' => 'views_handler_argument_numeric'
285
+  ),
286
+)
287
+);
288 288
 }
Please login to merge, or discard this patch.