Passed
Push — master ( 8ae81c...db94a5 )
by Kevin
11:44 queued 03:12
created
drupal/sites/default/boinc/themes/boinc/template.php 1 patch
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -626,13 +626,13 @@  discard block
 block discarded – undo
626 626
   $sender = user_load($sender->uid);
627 627
   
628 628
   switch ($status) {
629
-    case FLAG_FRIEND_FLAGGED:
630
-      // Sender accepted recipient's friend request
631
-      $email['subject'] = bts('!name accepted your friend request [!site]', array(
632
-        '!name' => $sender->boincuser_name,
633
-        '!site' => variable_get('site_name', 'Drupal-BOINC'),
634
-        ), NULL, 'boinc:friend-request-email');
635
-      $email['body'] = bts('!name confirmed you as a friend on !site.
629
+  case FLAG_FRIEND_FLAGGED:
630
+    // Sender accepted recipient's friend request
631
+    $email['subject'] = bts('!name accepted your friend request [!site]', array(
632
+      '!name' => $sender->boincuser_name,
633
+      '!site' => variable_get('site_name', 'Drupal-BOINC'),
634
+      ), NULL, 'boinc:friend-request-email');
635
+    $email['body'] = bts('!name confirmed you as a friend on !site.
636 636
 
637 637
 Follow this link to view his or her profile:
638 638
 !link
@@ -641,17 +641,17 @@  discard block
 block discarded – undo
641 641
 
642 642
 Thanks,
643 643
 The !site team', array(
644
-        '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
645
-        '!site' => variable_get('site_name', 'Drupal-BOINC'),
646
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
647
-        '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
648
-        ), array(), NULL, 'boinc:friend-request-email');
649
-      break;
644
+      '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
645
+      '!site' => variable_get('site_name', 'Drupal-BOINC'),
646
+      '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
647
+      '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
648
+      ), array(), NULL, 'boinc:friend-request-email');
649
+    break;
650 650
 
651
-    case FLAG_FRIEND_PENDING:
652
-      // Sender is requesting to be recipient's friend
653
-      $email['subject'] = bts('Friend request from !name [!site]', array('!name' => $sender->boincuser_name, '!site' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:friend-request-email');
654
-      $email['body'] = bts('!name added you as a friend on !site. You can approve or deny this request. Denying a request will not send a notification, but will remove the request from both of your accounts.
651
+  case FLAG_FRIEND_PENDING:
652
+    // Sender is requesting to be recipient's friend
653
+    $email['subject'] = bts('Friend request from !name [!site]', array('!name' => $sender->boincuser_name, '!site' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:friend-request-email');
654
+    $email['body'] = bts('!name added you as a friend on !site. You can approve or deny this request. Denying a request will not send a notification, but will remove the request from both of your accounts.
655 655
 
656 656
 Follow the link below to view this request:
657 657
 !link
@@ -660,13 +660,13 @@  discard block
 block discarded – undo
660 660
 
661 661
 Thanks,
662 662
 The !site team', array(
663
-        '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
664
-        '!site' => variable_get('site_name', 'Drupal-BOINC'),
665
-        '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
666
-        '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
667
-        ),
668
-      array(), NULL, 'boinc:friend-request-email');
669
-      break;
663
+      '!name' => isset($sender->boincuser_name) ? $sender->boincuser_name : $sender->name,
664
+      '!site' => variable_get('site_name', 'Drupal-BOINC'),
665
+      '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
666
+      '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
667
+      ),
668
+    array(), NULL, 'boinc:friend-request-email');
669
+    break;
670 670
   }
671 671
   return $email;
672 672
 }
Please login to merge, or discard this patch.
default/boinc/modules/boinctranslate/includes/boinctranslate.helpers.inc 1 patch
Switch Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -1398,72 +1398,72 @@
 block discarded – undo
1398 1398
 
1399 1399
   switch ($op) {
1400 1400
     // Return stored strings
1401
-    case 'mem-report':
1402
-      return $strings;
1403
-
1404
-      // Store string in memory (only supports single strings)
1405
-    case 'mem-store':
1406
-      $strings[$value['msgid']] = $value['msgstr'];
1407
-      return;
1408
-
1409
-      // Called at end of import to inform the user
1410
-    case 'db-report':
1411
-      return array(
1412
-        $headerdone,
1413
-        $report['additions'],
1414
-        $report['updates'],
1415
-        $report['deletes'],
1416
-        $report['skips'],
1417
-      );
1401
+  case 'mem-report':
1402
+    return $strings;
1403
+
1404
+    // Store string in memory (only supports single strings)
1405
+  case 'mem-store':
1406
+    $strings[$value['msgid']] = $value['msgstr'];
1407
+    return;
1408
+
1409
+    // Called at end of import to inform the user
1410
+  case 'db-report':
1411
+    return array(
1412
+      $headerdone,
1413
+      $report['additions'],
1414
+      $report['updates'],
1415
+      $report['deletes'],
1416
+      $report['skips'],
1417
+    );
1418 1418
 
1419
-      // Store the string we got in the database.
1420
-    case 'db-store':
1421
-      // We got header information.
1422
-      if ($value['msgid'] == '') {
1423
-        $languages = language_list();
1424
-        if (($mode != LOCALE_IMPORT_KEEP) || empty($languages[$lang]->plurals)) {
1425
-          // Since we only need to parse the header if we ought to update the
1426
-          // plural formula, only run this if we don't need to keep existing
1427
-          // data untouched or if we don't have an existing plural formula.
1428
-          $header = _locale_import_parse_header($value['msgstr']);
1429
-
1430
-          // Get and store the plural formula if available.
1431
-          if (isset($header["Plural-Forms"]) && $p = _locale_import_parse_plural_forms($header["Plural-Forms"], $file->filename)) {
1432
-            list($nplurals, $plural) = $p;
1433
-            db_query("UPDATE {languages} SET plurals = %d, formula = '%s' WHERE language = '%s'", $nplurals, $plural, $lang);
1434
-          }
1419
+    // Store the string we got in the database.
1420
+  case 'db-store':
1421
+    // We got header information.
1422
+    if ($value['msgid'] == '') {
1423
+      $languages = language_list();
1424
+      if (($mode != LOCALE_IMPORT_KEEP) || empty($languages[$lang]->plurals)) {
1425
+        // Since we only need to parse the header if we ought to update the
1426
+        // plural formula, only run this if we don't need to keep existing
1427
+        // data untouched or if we don't have an existing plural formula.
1428
+        $header = _locale_import_parse_header($value['msgstr']);
1429
+
1430
+        // Get and store the plural formula if available.
1431
+        if (isset($header["Plural-Forms"]) && $p = _locale_import_parse_plural_forms($header["Plural-Forms"], $file->filename)) {
1432
+          list($nplurals, $plural) = $p;
1433
+          db_query("UPDATE {languages} SET plurals = %d, formula = '%s' WHERE language = '%s'", $nplurals, $plural, $lang);
1435 1434
         }
1436
-        $headerdone = TRUE;
1437 1435
       }
1436
+      $headerdone = TRUE;
1437
+    }
1438 1438
 
1439
-      else {
1440
-        // Some real string to import.
1441
-        $comments = _locale_import_shorten_comments(empty($value['#']) ? array() : $value['#']);
1442
-
1443
-        if (strpos($value['msgid'], "\0")) {
1444
-          // This string has plural versions.
1445
-          $english = explode("\0", $value['msgid'], 2);
1446
-          $entries = array_keys($value['msgstr']);
1447
-          for ($i = 3; $i <= count($entries); $i++) {
1448
-            $english[] = $english[1];
1449
-          }
1450
-          $translation = array_map('_locale_import_append_plural', $value['msgstr'], $entries);
1451
-          $english = array_map('_locale_import_append_plural', $english, $entries);
1452
-          foreach ($translation as $key => $trans) {
1453
-            if ($key == 0) {
1454
-              $plid = 0;
1455
-            }
1456
-            $plid = _boinctranslate_locale_import_one_string_db($report, $lang, $english[$key], $trans, $group, $comments, $mode, $plid, $key);
1439
+    else {
1440
+      // Some real string to import.
1441
+      $comments = _locale_import_shorten_comments(empty($value['#']) ? array() : $value['#']);
1442
+
1443
+      if (strpos($value['msgid'], "\0")) {
1444
+        // This string has plural versions.
1445
+        $english = explode("\0", $value['msgid'], 2);
1446
+        $entries = array_keys($value['msgstr']);
1447
+        for ($i = 3; $i <= count($entries); $i++) {
1448
+          $english[] = $english[1];
1449
+        }
1450
+        $translation = array_map('_locale_import_append_plural', $value['msgstr'], $entries);
1451
+        $english = array_map('_locale_import_append_plural', $english, $entries);
1452
+        foreach ($translation as $key => $trans) {
1453
+          if ($key == 0) {
1454
+            $plid = 0;
1457 1455
           }
1456
+          $plid = _boinctranslate_locale_import_one_string_db($report, $lang, $english[$key], $trans, $group, $comments, $mode, $plid, $key);
1458 1457
         }
1458
+      }
1459 1459
 
1460
-        else {
1461
-          // A simple string to import.
1462
-          $english = $value['msgid'];
1463
-          $translation = $value['msgstr'];
1464
-          _boinctranslate_locale_import_one_string_db($report, $lang, $english, $translation, $group, $comments, $mode);
1465
-        }
1460
+      else {
1461
+        // A simple string to import.
1462
+        $english = $value['msgid'];
1463
+        $translation = $value['msgstr'];
1464
+        _boinctranslate_locale_import_one_string_db($report, $lang, $english, $translation, $group, $comments, $mode);
1466 1465
       }
1466
+    }
1467 1467
   } // end of db-store operation
1468 1468
 }
1469 1469
 
Please login to merge, or discard this patch.
sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
  */
19 19
 function boinc_solr_search_block($op = 'list', $delta = 0, $edit = array()) {
20 20
   switch ($op) {
21
-    case 'list':
22
-      return boinc_solr_search_block_info();
23
-      break;
24
-    case 'view':
25
-      return boinc_solr_search_block_view($delta);
26
-      break;
27
-    case 'configure':
28
-    case 'save':
29
-    default:
21
+  case 'list':
22
+    return boinc_solr_search_block_info();
23
+    break;
24
+  case 'view':
25
+    return boinc_solr_search_block_view($delta);
26
+    break;
27
+  case 'configure':
28
+  case 'save':
29
+  default:
30 30
   }
31 31
 }
32 32
 
@@ -53,26 +53,26 @@  discard block
 block discarded – undo
53 53
 function boinc_solr_search_block_view($delta = 0) {
54 54
   $block = array();
55 55
   switch($delta) {
56
-    case 'boinc_solr_search_0':
57
-      $items = array(
58
-          bts('By default a search matches ANY search term. Results with more than one term will be presented higher in the search results.', array(), NULL, 'boinc:search-help-sidebar-block'),
59
-          bts('You may use \'AND\' to have the search engine return results with ALL search terms.', array(), NULL, 'boinc:search-help-sidebar-block'),
60
-          bts('For example, searching for \'boinc AND client\' will only contain results with words boinc and client.', array(), NULL, 'boinc:search-help-sidebar-block')
61
-      );
56
+  case 'boinc_solr_search_0':
57
+    $items = array(
58
+        bts('By default a search matches ANY search term. Results with more than one term will be presented higher in the search results.', array(), NULL, 'boinc:search-help-sidebar-block'),
59
+        bts('You may use \'AND\' to have the search engine return results with ALL search terms.', array(), NULL, 'boinc:search-help-sidebar-block'),
60
+        bts('For example, searching for \'boinc AND client\' will only contain results with words boinc and client.', array(), NULL, 'boinc:search-help-sidebar-block')
61
+    );
62 62
 
63
-      drupal_add_js('misc/collapse.js');
64
-      // For Drupal 7 the format of the array changes, see https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_fieldset/7.x for details.
65
-      $collapsible_item = array(
66
-        '#title' => bts('Search Help', array(), NULL, 'boinc:search-help-sidebar-block'),
67
-        '#description' => theme_item_list($items),
68
-        '#collapsible' => TRUE,
69
-        '#collapsed' => TRUE,
70
-        '#attributes' => array(
71
-          'class' => 'search-help-block',
72
-        ),
73
-      );
74
-      $block['content'] = theme('fieldset', $collapsible_item);
75
-      break;
63
+    drupal_add_js('misc/collapse.js');
64
+    // For Drupal 7 the format of the array changes, see https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_fieldset/7.x for details.
65
+    $collapsible_item = array(
66
+      '#title' => bts('Search Help', array(), NULL, 'boinc:search-help-sidebar-block'),
67
+      '#description' => theme_item_list($items),
68
+      '#collapsible' => TRUE,
69
+      '#collapsed' => TRUE,
70
+      '#attributes' => array(
71
+        'class' => 'search-help-block',
72
+      ),
73
+    );
74
+    $block['content'] = theme('fieldset', $collapsible_item);
75
+    break;
76 76
   }
77 77
   return $block;
78 78
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.module 1 patch
Switch Indentation   +200 added lines, -200 removed lines patch added patch discarded remove patch
@@ -23,224 +23,224 @@
 block discarded – undo
23 23
   * Implementation of hook_menu().
24 24
   */
25 25
 function boincwork_menu() {
26
-  require_boinc('util');
27
-  $items['account/prefs'] = array(
28
-    'title' => 'Computing',
29
-    'description' => '',
30
-    'page callback' => 'generalprefs_page', 
31
-    'access callback' => 'user_is_logged_in',
32
-    'type' => MENU_NORMAL_ITEM
33
-  );
34
-  $items['account/prefs/computing'] = array(
35
-    'title' => 'Computing',
36
-    'page callback' => 'generalprefs_page',
37
-    'access callback' => 'user_is_logged_in',
38
-    'type' => MENU_DEFAULT_LOCAL_TASK,
39
-    'weight' => 0
40
-  );
41
-  $items['account/prefs/project'] = array(
42
-    'title' => 'Project',
43
-    'page callback' => 'projectprefs_page',
44
-    'access callback' => 'user_is_logged_in',
45
-    'type' => MENU_LOCAL_TASK,
46
-    'weight' => 5
47
-  );
48
-  $items['account/prefs/community'] = array(
49
-    'title' => 'Community',
50
-    'page callback' => 'communityprefs_page',
51
-    'access callback' => 'user_is_logged_in',
52
-    'type' => MENU_LOCAL_TASK,
53
-    'weight' => 10
54
-  );
55
-  $items['account/prefs/privacy'] = array(
56
-    'title' => 'Privacy',
57
-    'page callback' => 'privacyprefs_page',
58
-    'access callback' => 'user_is_logged_in',
59
-    'type' => MENU_LOCAL_TASK,
60
-    'weight' => 15
61
-  );
62
-  if (module_exists('ignore_user')) {
63
-    $items['account/prefs/privacy/ignore_user/add'] = array(
64
-      'title' => 'Add from ignore list',
65
-      'description' => 'Add user that you with to ignore to your ignore list.',
66
-      'page callback' => 'boincwork_ignore_user_add_user',
67
-      'access callback' => 'user_access',
68
-      'access arguments' => array('ignore user'),
69
-      'type' => MENU_CALLBACK,
70
-    );
71
-    $items['account/prefs/privacy/ignore_user/remove'] = array(
72
-      'title' => 'Remove from ignore list',
73
-      'description' => 'Remove user from your ignore list.',
74
-      'page callback' => 'boincwork_ignore_user_remove_user',
75
-      'access callback' => 'user_access',
76
-      'access arguments' => array('ignore user'),
77
-      'type' => MENU_CALLBACK,
78
-    );
79
-  }// endif module_exists
80
-  $items['account/certs'] = array(
81
-    'title' =>'Account certificate',
82
-    'page callback' => 'boincwork_certificates',
83
-    'access arguments' => array('access content'),
84
-    'type' => MENU_CALLBACK
85
-  );
86
-  $items['admin/boinc/prefs/general'] = array(
87
-    'title' => 'Preferences: General',
88
-    'description' => 'Set options for BOINC preference set pages',
89
-    'page callback' => 'drupal_get_form',
90
-    'page arguments' => array('boincwork_admin_prefs_options_form'),
91
-    'access arguments' => array('administer site configuration'),
92
-    'type' => MENU_NORMAL_ITEM,
93
-    'file' => 'boincwork.admin.inc'
94
-  );
95
-  $items['admin/boinc/prefs/presets'] = array(
96
-    'title' => 'Preferences: Presets',
97
-    'description' => 'Set values for BOINC preference set presets.',
98
-    'page callback' => 'boincwork_admin_prefs_presets_page',
99
-    'access arguments' => array('administer site configuration'),
100
-    'type' => MENU_NORMAL_ITEM,
101
-    'file' => 'boincwork.admin.inc'
102
-  );
103
-  $items['admin/boinc/prefs/upload'] = array(
104
-    'title' => 'Preferences: Project-specific XML upload',
105
-    'description' => 'Upload XML configuration for project specific preferences.',
106
-    'page callback' => 'drupal_get_form',
107
-    'page arguments' => array('boincwork_admin_prefs_upload_form'),
108
-    'access arguments' => array('administer site configuration'),
109
-    'type' => MENU_NORMAL_ITEM,
110
-    'file' => 'boincwork.admin.inc'
111
-  );
112
-  $items['host/%/delete'] = array(
113
-    'title' => 'Delete host',
114
-    'page callback' => 'boincwork_host_delete',
115
-    'page arguments' => array(1),
116
-    'access callback' => 'user_is_logged_in',
117
-    'type' => MENU_CALLBACK,
118
-  );
119
-  $items['host/%/log'] = array(
120
-    'title' => 'Host log',
121
-    'page callback' => 'boincwork_host_log',
122
-    'page arguments' => array(1),
123
-    'access callback' => 'user_is_logged_in',
124
-    'type' => MENU_CALLBACK,
125
-  );
126
-  $items['host/%/merge'] = array(
127
-    'title' => 'Merge computer',
128
-    'page callback' => 'drupal_get_form',
129
-    'page arguments' => array('boincwork_host_merge_form', 1),
130
-    'access callback' => 'user_is_logged_in',
131
-    'type' => MENU_CALLBACK,
132
-  );
133
-  $items['host/%/set-venue/%'] = array(
134
-    'title' => 'Set host venue',
135
-    'page callback' => 'boincwork_host_set_venue',
136
-    'page arguments' => array(1,3),
137
-    'access callback' => 'user_is_logged_in',
138
-    'type' => MENU_CALLBACK,
139
-  );
140
-  $items['user/%/mobile'] = array(
141
-    'title' => 'Mobile stats',
142
-    'page callback' => 'boincwork_mobile_stats',
143
-    'page arguments' => array(1),
144
-    'access callback' => 'user_is_logged_in',
145
-    'type' => MENU_CALLBACK
146
-  );
147
-  $items['server_status.php'] = array(
148
-    'title' => 'Server status',
149
-    'page callback' => 'boincwork_server_status',
150
-    'access arguments' => array('access content'),
151
-    'type' => MENU_CALLBACK
152
-  );
153
-  $items['job_file.php'] = array(
154
-    'title' => 'Job file input',
155
-    'page callback' => 'boincwork_job_file',
156
-    'access arguments' => array('access content'),
157
-    'type' => MENU_CALLBACK
158
-  );
159
-  $items['get_output.php'] = array(
160
-    'title' => 'Get output file',
161
-    'page callback' => 'boincwork_get_output',
162
-    'access arguments' => array('access content'),
163
-    'type' => MENU_CALLBACK
164
-  );
165
-  $items['get_project_config.php'] = array(
166
-    'title' => 'Project config',
167
-    'page callback' => 'boincwork_get_project_config',
168
-    'access arguments' => array('access content'),
169
-    'type' => MENU_CALLBACK
170
-  );
171
-  $items['submit_rpc_handler.php'] = array(
172
-    'title' => 'Remote job submission',
173
-    'page callback' => 'boincwork_submit_rpc_handler',
174
-    'access arguments' => array('access content'),
175
-    'type' => MENU_CALLBACK
176
-  );
177
-  $items['userw.php'] = array(
178
-    'title' => 'User WAP',
179
-    'page callback' => 'boincwork_user_wap',
180
-    'access arguments' => array('access content'),
181
-    'type' => MENU_CALLBACK
182
-  );
183
-  $items['account/tasks/%/%'] = array(
184
-    'title' => 'Account Tasks Table',
185
-    'description' => '',
186
-    'page callback' => 'boincwork_account_task_table',
187
-    'page arguments' => array(2,3),
188
-    'access arguments' => array('access content'),
189
-    'type' => MENU_CALLBACK,
190
-  );
191
-  $items['host/%/tasks/%/%'] = array(
192
-    'title' => 'Host Tasks Table',
193
-    'description' => '',
194
-    'page callback' => 'boincwork_host_task_table',
195
-    'page arguments' => array(1,3,4),
196
-    'access arguments' => array('access content'),
197
-    'type' => MENU_CALLBACK,
198
-  );
199
-  // Workunit task table disabled
200
-  //$items['workunit/%/tasks/%/%'] = array(
201
-  //  'title' => 'Workunit Tasks Table',
202
-  //  'description' => '',
203
-  //  'page callback' => 'boincwork_workunit_task_table',
204
-  //  'page arguments' => array(1,3,4),
205
-  //  'access arguments' => array('access content'),
206
-  //  'type' => MENU_CALLBACK,
207
-  //);
208
-  return $items;
26
+require_boinc('util');
27
+$items['account/prefs'] = array(
28
+'title' => 'Computing',
29
+'description' => '',
30
+'page callback' => 'generalprefs_page', 
31
+'access callback' => 'user_is_logged_in',
32
+'type' => MENU_NORMAL_ITEM
33
+);
34
+$items['account/prefs/computing'] = array(
35
+'title' => 'Computing',
36
+'page callback' => 'generalprefs_page',
37
+'access callback' => 'user_is_logged_in',
38
+'type' => MENU_DEFAULT_LOCAL_TASK,
39
+'weight' => 0
40
+);
41
+$items['account/prefs/project'] = array(
42
+'title' => 'Project',
43
+'page callback' => 'projectprefs_page',
44
+'access callback' => 'user_is_logged_in',
45
+'type' => MENU_LOCAL_TASK,
46
+'weight' => 5
47
+);
48
+$items['account/prefs/community'] = array(
49
+'title' => 'Community',
50
+'page callback' => 'communityprefs_page',
51
+'access callback' => 'user_is_logged_in',
52
+'type' => MENU_LOCAL_TASK,
53
+'weight' => 10
54
+);
55
+$items['account/prefs/privacy'] = array(
56
+'title' => 'Privacy',
57
+'page callback' => 'privacyprefs_page',
58
+'access callback' => 'user_is_logged_in',
59
+'type' => MENU_LOCAL_TASK,
60
+'weight' => 15
61
+);
62
+if (module_exists('ignore_user')) {
63
+$items['account/prefs/privacy/ignore_user/add'] = array(
64
+  'title' => 'Add from ignore list',
65
+  'description' => 'Add user that you with to ignore to your ignore list.',
66
+  'page callback' => 'boincwork_ignore_user_add_user',
67
+  'access callback' => 'user_access',
68
+  'access arguments' => array('ignore user'),
69
+  'type' => MENU_CALLBACK,
70
+);
71
+$items['account/prefs/privacy/ignore_user/remove'] = array(
72
+  'title' => 'Remove from ignore list',
73
+  'description' => 'Remove user from your ignore list.',
74
+  'page callback' => 'boincwork_ignore_user_remove_user',
75
+  'access callback' => 'user_access',
76
+  'access arguments' => array('ignore user'),
77
+  'type' => MENU_CALLBACK,
78
+);
79
+}// endif module_exists
80
+$items['account/certs'] = array(
81
+'title' =>'Account certificate',
82
+'page callback' => 'boincwork_certificates',
83
+'access arguments' => array('access content'),
84
+'type' => MENU_CALLBACK
85
+);
86
+$items['admin/boinc/prefs/general'] = array(
87
+'title' => 'Preferences: General',
88
+'description' => 'Set options for BOINC preference set pages',
89
+'page callback' => 'drupal_get_form',
90
+'page arguments' => array('boincwork_admin_prefs_options_form'),
91
+'access arguments' => array('administer site configuration'),
92
+'type' => MENU_NORMAL_ITEM,
93
+'file' => 'boincwork.admin.inc'
94
+);
95
+$items['admin/boinc/prefs/presets'] = array(
96
+'title' => 'Preferences: Presets',
97
+'description' => 'Set values for BOINC preference set presets.',
98
+'page callback' => 'boincwork_admin_prefs_presets_page',
99
+'access arguments' => array('administer site configuration'),
100
+'type' => MENU_NORMAL_ITEM,
101
+'file' => 'boincwork.admin.inc'
102
+);
103
+$items['admin/boinc/prefs/upload'] = array(
104
+'title' => 'Preferences: Project-specific XML upload',
105
+'description' => 'Upload XML configuration for project specific preferences.',
106
+'page callback' => 'drupal_get_form',
107
+'page arguments' => array('boincwork_admin_prefs_upload_form'),
108
+'access arguments' => array('administer site configuration'),
109
+'type' => MENU_NORMAL_ITEM,
110
+'file' => 'boincwork.admin.inc'
111
+);
112
+$items['host/%/delete'] = array(
113
+'title' => 'Delete host',
114
+'page callback' => 'boincwork_host_delete',
115
+'page arguments' => array(1),
116
+'access callback' => 'user_is_logged_in',
117
+'type' => MENU_CALLBACK,
118
+);
119
+$items['host/%/log'] = array(
120
+'title' => 'Host log',
121
+'page callback' => 'boincwork_host_log',
122
+'page arguments' => array(1),
123
+'access callback' => 'user_is_logged_in',
124
+'type' => MENU_CALLBACK,
125
+);
126
+$items['host/%/merge'] = array(
127
+'title' => 'Merge computer',
128
+'page callback' => 'drupal_get_form',
129
+'page arguments' => array('boincwork_host_merge_form', 1),
130
+'access callback' => 'user_is_logged_in',
131
+'type' => MENU_CALLBACK,
132
+);
133
+$items['host/%/set-venue/%'] = array(
134
+'title' => 'Set host venue',
135
+'page callback' => 'boincwork_host_set_venue',
136
+'page arguments' => array(1,3),
137
+'access callback' => 'user_is_logged_in',
138
+'type' => MENU_CALLBACK,
139
+);
140
+$items['user/%/mobile'] = array(
141
+'title' => 'Mobile stats',
142
+'page callback' => 'boincwork_mobile_stats',
143
+'page arguments' => array(1),
144
+'access callback' => 'user_is_logged_in',
145
+'type' => MENU_CALLBACK
146
+);
147
+$items['server_status.php'] = array(
148
+'title' => 'Server status',
149
+'page callback' => 'boincwork_server_status',
150
+'access arguments' => array('access content'),
151
+'type' => MENU_CALLBACK
152
+);
153
+$items['job_file.php'] = array(
154
+'title' => 'Job file input',
155
+'page callback' => 'boincwork_job_file',
156
+'access arguments' => array('access content'),
157
+'type' => MENU_CALLBACK
158
+);
159
+$items['get_output.php'] = array(
160
+'title' => 'Get output file',
161
+'page callback' => 'boincwork_get_output',
162
+'access arguments' => array('access content'),
163
+'type' => MENU_CALLBACK
164
+);
165
+$items['get_project_config.php'] = array(
166
+'title' => 'Project config',
167
+'page callback' => 'boincwork_get_project_config',
168
+'access arguments' => array('access content'),
169
+'type' => MENU_CALLBACK
170
+);
171
+$items['submit_rpc_handler.php'] = array(
172
+'title' => 'Remote job submission',
173
+'page callback' => 'boincwork_submit_rpc_handler',
174
+'access arguments' => array('access content'),
175
+'type' => MENU_CALLBACK
176
+);
177
+$items['userw.php'] = array(
178
+'title' => 'User WAP',
179
+'page callback' => 'boincwork_user_wap',
180
+'access arguments' => array('access content'),
181
+'type' => MENU_CALLBACK
182
+);
183
+$items['account/tasks/%/%'] = array(
184
+'title' => 'Account Tasks Table',
185
+'description' => '',
186
+'page callback' => 'boincwork_account_task_table',
187
+'page arguments' => array(2,3),
188
+'access arguments' => array('access content'),
189
+'type' => MENU_CALLBACK,
190
+);
191
+$items['host/%/tasks/%/%'] = array(
192
+'title' => 'Host Tasks Table',
193
+'description' => '',
194
+'page callback' => 'boincwork_host_task_table',
195
+'page arguments' => array(1,3,4),
196
+'access arguments' => array('access content'),
197
+'type' => MENU_CALLBACK,
198
+);
199
+// Workunit task table disabled
200
+//$items['workunit/%/tasks/%/%'] = array(
201
+//  'title' => 'Workunit Tasks Table',
202
+//  'description' => '',
203
+//  'page callback' => 'boincwork_workunit_task_table',
204
+//  'page arguments' => array(1,3,4),
205
+//  'access arguments' => array('access content'),
206
+//  'type' => MENU_CALLBACK,
207
+//);
208
+return $items;
209 209
 }
210 210
 
211 211
 /**
212 212
  * Implementation of hook_theme().
213 213
  */
214 214
 function boincwork_theme() {
215
-  return array(
216
-    'boincwork_privacyprefs_form' => array(
217
-      'arguments' => array('form'),
218
-    ),
219
-  );
215
+return array(
216
+'boincwork_privacyprefs_form' => array(
217
+  'arguments' => array('form'),
218
+),
219
+);
220 220
 }
221 221
 
222 222
 /**
223 223
 * Implementation of hook_views_api().
224 224
 */
225 225
 function boincwork_views_api() {
226
-  return array(
227
-    'api' => 2.0,
228
-    'path' => drupal_get_path('module', 'boincwork')
229
-  );
226
+return array(
227
+'api' => 2.0,
228
+'path' => drupal_get_path('module', 'boincwork')
229
+);
230 230
 }
231 231
 
232 232
 /**
233 233
  * Implementation of hook_locale().
234 234
  */
235 235
 function boincwork_locale($op = 'groups', $group = NULL) {
236
-  switch ($op) {
237
-    case 'groups':
238
-      return array('project' => bts('Project'));
239
-    case 'info':
240
-      $info['project']['refresh callback'] = 'boincwork_locale_refresh';
241
-      $info['project']['format'] = FALSE;
242
-      return $info;
243
-  }
236
+switch ($op) {
237
+case 'groups':
238
+return array('project' => bts('Project'));
239
+case 'info':
240
+$info['project']['refresh callback'] = 'boincwork_locale_refresh';
241
+$info['project']['format'] = FALSE;
242
+return $info;
243
+}
244 244
 }
245 245
 
246 246
 /**
Please login to merge, or discard this patch.
html/inc/password_compat/password.inc 1 patch
Switch Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -50,47 +50,47 @@  discard block
 block discarded – undo
50 50
             }
51 51
             $resultLength = 0;
52 52
             switch ($algo) {
53
-                case PASSWORD_BCRYPT:
54
-                    $cost = PASSWORD_BCRYPT_DEFAULT_COST;
55
-                    if (isset($options['cost'])) {
56
-                        $cost = (int) $options['cost'];
57
-                        if ($cost < 4 || $cost > 31) {
58
-                            trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING);
59
-                            return null;
60
-                        }
53
+            case PASSWORD_BCRYPT:
54
+                $cost = PASSWORD_BCRYPT_DEFAULT_COST;
55
+                if (isset($options['cost'])) {
56
+                    $cost = (int) $options['cost'];
57
+                    if ($cost < 4 || $cost > 31) {
58
+                        trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING);
59
+                        return null;
61 60
                     }
62
-                    // The length of salt to generate
63
-                    $raw_salt_len = 16;
64
-                    // The length required in the final serialization
65
-                    $required_salt_len = 22;
66
-                    $hash_format = sprintf("$2y$%02d$", $cost);
67
-                    // The expected length of the final crypt() output
68
-                    $resultLength = 60;
69
-                    break;
70
-                default:
71
-                    trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING);
72
-                    return null;
61
+                }
62
+                // The length of salt to generate
63
+                $raw_salt_len = 16;
64
+                // The length required in the final serialization
65
+                $required_salt_len = 22;
66
+                $hash_format = sprintf("$2y$%02d$", $cost);
67
+                // The expected length of the final crypt() output
68
+                $resultLength = 60;
69
+                break;
70
+            default:
71
+                trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING);
72
+                return null;
73 73
             }
74 74
             $salt_req_encoding = false;
75 75
             if (isset($options['salt'])) {
76 76
                 switch (gettype($options['salt'])) {
77
-                    case 'NULL':
78
-                    case 'boolean':
79
-                    case 'integer':
80
-                    case 'double':
81
-                    case 'string':
77
+                case 'NULL':
78
+                case 'boolean':
79
+                case 'integer':
80
+                case 'double':
81
+                case 'string':
82
+                    $salt = (string) $options['salt'];
83
+                    break;
84
+                case 'object':
85
+                    if (method_exists($options['salt'], '__tostring')) {
82 86
                         $salt = (string) $options['salt'];
83 87
                         break;
84
-                    case 'object':
85
-                        if (method_exists($options['salt'], '__tostring')) {
86
-                            $salt = (string) $options['salt'];
87
-                            break;
88
-                        }
89
-                    case 'array':
90
-                    case 'resource':
91
-                    default:
92
-                        trigger_error('password_hash(): Non-string salt parameter supplied', E_USER_WARNING);
93
-                        return null;
88
+                    }
89
+                case 'array':
90
+                case 'resource':
91
+                default:
92
+                    trigger_error('password_hash(): Non-string salt parameter supplied', E_USER_WARNING);
93
+                    return null;
94 94
                 }
95 95
                 if (PasswordCompat\binary\_strlen($salt) < $required_salt_len) {
96 96
                     trigger_error(sprintf("password_hash(): Provided salt is too short: %d expecting %d", PasswordCompat\binary\_strlen($salt), $required_salt_len), E_USER_WARNING);
@@ -212,12 +212,12 @@  discard block
 block discarded – undo
212 212
                 return true;
213 213
             }
214 214
             switch ($algo) {
215
-                case PASSWORD_BCRYPT:
216
-                    $cost = isset($options['cost']) ? (int) $options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST;
217
-                    if ($cost !== $info['options']['cost']) {
218
-                        return true;
219
-                    }
220
-                    break;
215
+            case PASSWORD_BCRYPT:
216
+                $cost = isset($options['cost']) ? (int) $options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST;
217
+                if ($cost !== $info['options']['cost']) {
218
+                    return true;
219
+                }
220
+                break;
221 221
             }
222 222
             return false;
223 223
         }
Please login to merge, or discard this patch.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.admin.inc 1 patch
Switch Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -13,45 +13,45 @@  discard block
 block discarded – undo
13 13
  *   a form array
14 14
  */
15 15
 function boincuser_delete_settings() {
16
-  $form = array();
17
-
18
-  $default = array(
19
-    'boincuser_delete_type' => variable_get('boincuser_delete_type', ''),
20
-    'boincuser_delete_redirect' => variable_get('boincuser_delete_redirect', '<front>'),
21
-  );
22
-
23
-  $form['options'] = array(
24
-    '#type' => 'fieldset',
25
-    '#title' => t('Options'),
26
-  );
27
-  $form['options']['help'] = array(
28
-    '#value' => t('When a user deletes their account, which option is shown to the user? A soft/obfusate delete, a hard/wipe delete, or let the user chose between the two.'),
29
-    '#weight' => 11,
30
-  );
31
-  $form['options']['boincuser_delete_type'] = array(
32
-    '#type' => 'radios',
33
-    '#title' => t('Type of delete'),
34
-    '#default_value' => $default['boincuser_delete_type'],
35
-    '#options' => array(
36
-       'soft_obfuscate' => t('A soft/obfuscate delete. User\'s account is disabled, but some data is deleted.'),
37
-       'hard_wipe' => t('A hard/wipe delete. User\'s account is deleted along with many data.'),
38
-       'user_decides' => t('User is presented with radio buttons where they choose between the two options above.'),
39
-    ),
40
-    '#weight' => 21,
41
-  );
42
-
43
-  $form['redirect'] = array(
44
-    '#type' => 'fieldset',
45
-    '#title' => t('Redirect'),
46
-  );
47
-  $form['redirect']['boincuser_delete_redirect'] = array(
48
-    '#type' => 'textfield',
49
-    '#title' => t('Redirection page'),
50
-    '#default_value' => $default['boincuser_delete_redirect'],
51
-    '#description' => t('Choose where to redirect your users after account deletion. Any valid Drupal path will do, e.g. %front or %node', array('%front' => '<front>', '%node' => 'node/1')),
52
-  );
53
-
54
-  return system_settings_form($form);
16
+$form = array();
17
+
18
+$default = array(
19
+'boincuser_delete_type' => variable_get('boincuser_delete_type', ''),
20
+'boincuser_delete_redirect' => variable_get('boincuser_delete_redirect', '<front>'),
21
+);
22
+
23
+$form['options'] = array(
24
+'#type' => 'fieldset',
25
+'#title' => t('Options'),
26
+);
27
+$form['options']['help'] = array(
28
+'#value' => t('When a user deletes their account, which option is shown to the user? A soft/obfusate delete, a hard/wipe delete, or let the user chose between the two.'),
29
+'#weight' => 11,
30
+);
31
+$form['options']['boincuser_delete_type'] = array(
32
+'#type' => 'radios',
33
+'#title' => t('Type of delete'),
34
+'#default_value' => $default['boincuser_delete_type'],
35
+'#options' => array(
36
+   'soft_obfuscate' => t('A soft/obfuscate delete. User\'s account is disabled, but some data is deleted.'),
37
+   'hard_wipe' => t('A hard/wipe delete. User\'s account is deleted along with many data.'),
38
+   'user_decides' => t('User is presented with radio buttons where they choose between the two options above.'),
39
+),
40
+'#weight' => 21,
41
+);
42
+
43
+$form['redirect'] = array(
44
+'#type' => 'fieldset',
45
+'#title' => t('Redirect'),
46
+);
47
+$form['redirect']['boincuser_delete_redirect'] = array(
48
+'#type' => 'textfield',
49
+'#title' => t('Redirection page'),
50
+'#default_value' => $default['boincuser_delete_redirect'],
51
+'#description' => t('Choose where to redirect your users after account deletion. Any valid Drupal path will do, e.g. %front or %node', array('%front' => '<front>', '%node' => 'node/1')),
52
+);
53
+
54
+return system_settings_form($form);
55 55
 }
56 56
 
57 57
 
@@ -60,124 +60,124 @@  discard block
 block discarded – undo
60 60
  * password checks.
61 61
  */
62 62
 function boincuser_delete_admindelete(&$form_state, $uid) {
63
-  $form = array();
64
-
65
-  $form['#uid'] = $uid;
66
-
67
-  $form['account']['help'] = array(
68
-    '#value' => "<p>" . t("This form will delete this user <strong>without any email notification</strong> sent to the user. Be very careful in deleting users using this form. Once you select the delete type, check the checkbox, enter your password, and click submit, the user's account will be deleted. This will occur <strong>immediately</strong>. There is no 'undo'!") . "</p><p>" . t("You are deleting the following user, link opens in new window:") . "</p>",
69
-    '#weight' => -1,
70
-    '#prefix' => "<div id='delete-instructions'>",
71
-    '#suffix' => "</div>",
63
+$form = array();
64
+
65
+$form['#uid'] = $uid;
66
+
67
+$form['account']['help'] = array(
68
+'#value' => "<p>" . t("This form will delete this user <strong>without any email notification</strong> sent to the user. Be very careful in deleting users using this form. Once you select the delete type, check the checkbox, enter your password, and click submit, the user's account will be deleted. This will occur <strong>immediately</strong>. There is no 'undo'!") . "</p><p>" . t("You are deleting the following user, link opens in new window:") . "</p>",
69
+'#weight' => -1,
70
+'#prefix' => "<div id='delete-instructions'>",
71
+'#suffix' => "</div>",
72
+);
73
+
74
+$account = user_load($uid);
75
+if ($account) {
76
+drupal_set_title($account->boincuser_name);
77
+
78
+$form['account']['boincuser_name'] = array(
79
+  '#value' => t('<li>BOINC username (public displayname): ') . l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))),
80
+);
81
+$form['account']['boincuser_id'] = array(
82
+  '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id,
83
+);
84
+$form['account']['drupal_name'] = array(
85
+  '#value' => t('<li>Drupal username (internal): ') . $account->name,
86
+);
87
+$form['account']['user_id'] = array(
88
+  '#value' => t('<li>Drupal user ID: ') . $account->uid,
89
+);
90
+
91
+$form['account']['user_delete_action'] = array(
92
+    '#type' => 'radios',
93
+    '#options' => array(
94
+      'soft_obfuscate' => bts('<b>Soft delete</b> the account. The account will be disabled, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted, the host information deleted, and the user will be removed from any team.', array(), NULL, 'boinc:delete-user-account'),
95
+      'hard_wipe' => bts('<b>Delete</b> the account. The account will be deleted, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),),
72 96
   );
73 97
 
74
-  $account = user_load($uid);
75
-  if ($account) {
76
-    drupal_set_title($account->boincuser_name);
77
-
78
-    $form['account']['boincuser_name'] = array(
79
-      '#value' => t('<li>BOINC username (public displayname): ') . l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))),
80
-    );
81
-    $form['account']['boincuser_id'] = array(
82
-      '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id,
83
-    );
84
-    $form['account']['drupal_name'] = array(
85
-      '#value' => t('<li>Drupal username (internal): ') . $account->name,
86
-    );
87
-    $form['account']['user_id'] = array(
88
-      '#value' => t('<li>Drupal user ID: ') . $account->uid,
89
-    );
90
-
91
-    $form['account']['user_delete_action'] = array(
92
-        '#type' => 'radios',
93
-        '#options' => array(
94
-          'soft_obfuscate' => bts('<b>Soft delete</b> the account. The account will be disabled, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted, the host information deleted, and the user will be removed from any team.', array(), NULL, 'boinc:delete-user-account'),
95
-          'hard_wipe' => bts('<b>Delete</b> the account. The account will be deleted, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),),
96
-      );
97
-
98
-    $form['account']['surecheckbox'] = array(
99
-      '#type' => 'checkbox',
100
-      '#title' => t('I am <strong>sure</strong> I know what I am doing. I am <u><strong>deleting user</strong></u> %name.',
101
-        array('%name' => $account->boincuser_name)
102
-      ),
103
-      '#default_value' => FALSE,
104
-    );
105
-
106
-    $form['account']['current_pass'] = array(
107
-      '#type' => 'password',
108
-      '#title' => bts('Enter your password before clicking Submit, or click Cancel to return to the user\'s edit page', array(), NULL, 'boinc:delete-user-account'),
109
-      '#size' => 17,
110
-      '#attributes' => array(
111
-        'autocomplete' => 'off',
112
-      ),
113
-      '#weight' => 25,
114
-    );
115
-
116
-    // Action buttons
117
-    $form['actions']['submit'] = array(
118
-      '#type' => 'submit',
119
-      '#value' => t('Submit'),
120
-    );
121
-    $form['actions']['cancel'] = array(
122
-      '#type' => 'button',
123
-      '#value' => t('Cancel'),
124
-      '#executes_submit_callback' => TRUE,
125
-      '#validate' => array(),
126
-      '#submit' => array('_boincuser_delete_cancel'),
127
-    );
128
-
129
-    $form['#redirect'] = 'account';
130
-  }
131
-  else {
132
-    $form['noaccount'] = array(
133
-      '#value' => t('No such user with UID: %uid', array('%uid' => $uid)),
134
-    );
135
-  }
136
-
137
-  return $form;
98
+$form['account']['surecheckbox'] = array(
99
+  '#type' => 'checkbox',
100
+  '#title' => t('I am <strong>sure</strong> I know what I am doing. I am <u><strong>deleting user</strong></u> %name.',
101
+    array('%name' => $account->boincuser_name)
102
+  ),
103
+  '#default_value' => FALSE,
104
+);
105
+
106
+$form['account']['current_pass'] = array(
107
+  '#type' => 'password',
108
+  '#title' => bts('Enter your password before clicking Submit, or click Cancel to return to the user\'s edit page', array(), NULL, 'boinc:delete-user-account'),
109
+  '#size' => 17,
110
+  '#attributes' => array(
111
+    'autocomplete' => 'off',
112
+  ),
113
+  '#weight' => 25,
114
+);
115
+
116
+// Action buttons
117
+$form['actions']['submit'] = array(
118
+  '#type' => 'submit',
119
+  '#value' => t('Submit'),
120
+);
121
+$form['actions']['cancel'] = array(
122
+  '#type' => 'button',
123
+  '#value' => t('Cancel'),
124
+  '#executes_submit_callback' => TRUE,
125
+  '#validate' => array(),
126
+  '#submit' => array('_boincuser_delete_cancel'),
127
+);
128
+
129
+$form['#redirect'] = 'account';
130
+}
131
+else {
132
+$form['noaccount'] = array(
133
+  '#value' => t('No such user with UID: %uid', array('%uid' => $uid)),
134
+);
135
+}
136
+
137
+return $form;
138 138
 }
139 139
 
140 140
 /**
141 141
  * Validation function for admin delete user.
142 142
  */
143 143
 function boincuser_delete_admindelete_validate($form, &$form_state) {
144
-  global $user;
145
-  $boinc_user = boincuser_load($user->uid, TRUE);
144
+global $user;
145
+$boinc_user = boincuser_load($user->uid, TRUE);
146 146
 
147
-  if ($form_state['values']['user_delete_action'] == '') {
148
-    form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.'));
149
-  }
147
+if ($form_state['values']['user_delete_action'] == '') {
148
+form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.'));
149
+}
150 150
 
151
-  if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) {
152
-    form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.'));
153
-  }
151
+if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) {
152
+form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.'));
153
+}
154 154
 
155
-  if (!($form_state['values']['surecheckbox'])) {
156
-    return form_set_error('surecheckbox', t('Please confirm you are sure you want to delete this account.'));
157
-  }
155
+if (!($form_state['values']['surecheckbox'])) {
156
+return form_set_error('surecheckbox', t('Please confirm you are sure you want to delete this account.'));
157
+}
158 158
 
159
-  if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
160
-    return true;
161
-  }
159
+if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
160
+return true;
161
+}
162 162
 }
163 163
 
164 164
 /**
165 165
  * Submit function for admin delete user.
166 166
  */
167 167
 function boincuser_delete_admindelete_submit($form, &$form_state) {
168
-  // This is the account to be deleted, and not the administrator's
169
-  // account.
170
-  $account = user_load(array('uid' => $form['#uid']));
171
-  $action = $form_state['values']['user_delete_action'];
168
+// This is the account to be deleted, and not the administrator's
169
+// account.
170
+$account = user_load(array('uid' => $form['#uid']));
171
+$action = $form_state['values']['user_delete_action'];
172 172
 
173
-  drupal_set_message(t('WARNING: Account @displayname, Drupal UID=@uid has been deleted.',
174
-    array(
175
-      '@uid' => $form['#uid'],
176
-      '@displayname' => $account->boincuser_name,
177
-    )), 'warning');
173
+drupal_set_message(t('WARNING: Account @displayname, Drupal UID=@uid has been deleted.',
174
+array(
175
+  '@uid' => $form['#uid'],
176
+  '@displayname' => $account->boincuser_name,
177
+)), 'warning');
178 178
 
179
-  // Delete the user
180
-  _boincuser_delete_deleteuser($account, $action);
179
+// Delete the user
180
+_boincuser_delete_deleteuser($account, $action);
181 181
 
182
-  drupal_goto('/admin/boinc/user_delete');
182
+drupal_goto('/admin/boinc/user_delete');
183 183
 }
Please login to merge, or discard this patch.
modules/boincuser/boincuser_delete/includes/boincuser_delete.helpers.inc 1 patch
Switch Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -59,37 +59,37 @@
 block discarded – undo
59 59
   // hook_user() functions.
60 60
 
61 61
   switch ($action) {
62
-    case 'soft_obfuscate':
63
-      obfuscate_account($boinc_user);
64
-      _boincuser_delete_comment_reassign($account);
65
-      _boincuser_delete_node_reassign($account);
66
-      _boincuser_delete_privatemsg_delete($account);
67
-      _boincuser_delete_friends($account);
68
-      // delete the user's profile
69
-      $profile = content_profile_load('profile', $account->uid);
70
-      node_delete($profile->nid);
71
-      // Drupal account -
72
-      //  * 'block'/disable the account
73
-      //  * set name, mail, pass, and init to deleted
74
-      //  * erase signature
75
-      $myarray = array(
76
-        'status'    => 0,
77
-        'name'      => 'deleted_' . time() . '_' . random_string(),
78
-        'mail'      => 'deleted_' . time() . '_' . random_string(),
79
-        'pass'      => 'deleted_' . time() . '_' . random_string(),
80
-        'signature' => '',
81
-        'init'      => 'deleted_' . time() . '_' . random_string(),
82
-      );
83
-      user_save($account, $myarray);
84
-      break;
85
-    case 'hard_wipe':
86
-      wipe_account($boinc_user);
87
-      user_delete(array(), $account->uid);
88
-      break;
89
-    default:
90
-      watchdog('boincuser_delete', 'Delete action is %action, which is not \'soft_obfuscate\' or \'hard_wipe\'.', array(
91
-        '%action' => $action,
92
-      ), WATCHDOG_ERROR);
62
+  case 'soft_obfuscate':
63
+    obfuscate_account($boinc_user);
64
+    _boincuser_delete_comment_reassign($account);
65
+    _boincuser_delete_node_reassign($account);
66
+    _boincuser_delete_privatemsg_delete($account);
67
+    _boincuser_delete_friends($account);
68
+    // delete the user's profile
69
+    $profile = content_profile_load('profile', $account->uid);
70
+    node_delete($profile->nid);
71
+    // Drupal account -
72
+    //  * 'block'/disable the account
73
+    //  * set name, mail, pass, and init to deleted
74
+    //  * erase signature
75
+    $myarray = array(
76
+      'status'    => 0,
77
+      'name'      => 'deleted_' . time() . '_' . random_string(),
78
+      'mail'      => 'deleted_' . time() . '_' . random_string(),
79
+      'pass'      => 'deleted_' . time() . '_' . random_string(),
80
+      'signature' => '',
81
+      'init'      => 'deleted_' . time() . '_' . random_string(),
82
+    );
83
+    user_save($account, $myarray);
84
+    break;
85
+  case 'hard_wipe':
86
+    wipe_account($boinc_user);
87
+    user_delete(array(), $account->uid);
88
+    break;
89
+  default:
90
+    watchdog('boincuser_delete', 'Delete action is %action, which is not \'soft_obfuscate\' or \'hard_wipe\'.', array(
91
+      '%action' => $action,
92
+    ), WATCHDOG_ERROR);
93 93
   }
94 94
 }
95 95
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.views.inc 1 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.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.module 1 patch
Switch Indentation   +304 added lines, -304 removed lines patch added patch discarded remove patch
@@ -94,69 +94,69 @@  discard block
 block discarded – undo
94 94
   global $user;
95 95
 
96 96
   switch($form_id) {
97
-    case 'user_profile_form':
98
-      if ( user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3)=='') ) {
99
-        $form['delete'] = array(
100
-          '#type' => 'submit',
101
-          '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
102
-          '#weight' => 1009,
103
-          '#submit' => array('user_edit_delete_submit'),
104
-          '#prefix' => '<li class="tab">',
105
-          '#suffix' => '</li>',
106
-        );
107
-      }
108
-      else if ( user_access('administer users') ) {
109
-        $form['delete'] = array(
110
-          '#type' => 'submit',
111
-          '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
112
-          '#weight' => 1009,
113
-          '#submit' => array('_boincuser_delete_goto_admindelete'),
114
-          '#prefix' => '<li class="tab">',
115
-          '#suffix' => '</li>',
116
-        );
117
-      }
118
-      else {
119
-        unset($form['delete']);
120
-      }
121
-      break;
122
-    case 'user_confirm_delete':
123
-
124
-      $disable_delete = FALSE;
125
-      // If email address was changed less than 7 days (7 * 86400 s)
126
-      // ago, it cannot be changed again.
127
-      $duration = TOKEN_DURATION_ONE_WEEK;
128
-      if (($form['_account']['#value']->boincuser_email_addr_change_time + $duration) > time()) {
129
-        drupal_set_message(
130
-          bts("INFO: Your email address was changed within the past seven (7) days. You may not delete your account until after !time.",
131
-            array(
132
-              '!time' => date('F j, Y \a\t G:i T', $form['_account']['#value']->boincuser_email_addr_change_time + $duration),
133
-            ), NULL, 'boinc:account-credentials-change')
134
-        , 'info');
135
-        $disable_delete = TRUE;
136
-      }
137
-
138
-      // Configure radio options
139
-      $common_acts = bts("All your posts and comments will be attributed to the Anonymous User. Your user profile will be deleted. Your host information will be deleted. And you will be removed from any team you are a member of.", array(), NULL, 'boinc:delete-user-account');
140
-
141
-      $deleteoptions = array(
142
-        'boincuser_delete_softdelete' => bts('<b>Soft delete</b> your account. Your account will be disabled. ', array(), NULL, 'boinc:delete-user-account'),
143
-        'boincuser_delete_delete' => bts('<b>Delete</b> your account. ', array(), NULL, 'boinc:delete-user-account'),
97
+  case 'user_profile_form':
98
+    if ( user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3)=='') ) {
99
+      $form['delete'] = array(
100
+        '#type' => 'submit',
101
+        '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
102
+        '#weight' => 1009,
103
+        '#submit' => array('user_edit_delete_submit'),
104
+        '#prefix' => '<li class="tab">',
105
+        '#suffix' => '</li>',
106
+      );
107
+    }
108
+    else if ( user_access('administer users') ) {
109
+      $form['delete'] = array(
110
+        '#type' => 'submit',
111
+        '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
112
+        '#weight' => 1009,
113
+        '#submit' => array('_boincuser_delete_goto_admindelete'),
114
+        '#prefix' => '<li class="tab">',
115
+        '#suffix' => '</li>',
144 116
       );
117
+    }
118
+    else {
119
+      unset($form['delete']);
120
+    }
121
+    break;
122
+  case 'user_confirm_delete':
123
+
124
+    $disable_delete = FALSE;
125
+    // If email address was changed less than 7 days (7 * 86400 s)
126
+    // ago, it cannot be changed again.
127
+    $duration = TOKEN_DURATION_ONE_WEEK;
128
+    if (($form['_account']['#value']->boincuser_email_addr_change_time + $duration) > time()) {
129
+      drupal_set_message(
130
+        bts("INFO: Your email address was changed within the past seven (7) days. You may not delete your account until after !time.",
131
+          array(
132
+            '!time' => date('F j, Y \a\t G:i T', $form['_account']['#value']->boincuser_email_addr_change_time + $duration),
133
+          ), NULL, 'boinc:account-credentials-change')
134
+      , 'info');
135
+      $disable_delete = TRUE;
136
+    }
137
+
138
+    // Configure radio options
139
+    $common_acts = bts("All your posts and comments will be attributed to the Anonymous User. Your user profile will be deleted. Your host information will be deleted. And you will be removed from any team you are a member of.", array(), NULL, 'boinc:delete-user-account');
140
+
141
+    $deleteoptions = array(
142
+      'boincuser_delete_softdelete' => bts('<b>Soft delete</b> your account. Your account will be disabled. ', array(), NULL, 'boinc:delete-user-account'),
143
+      'boincuser_delete_delete' => bts('<b>Delete</b> your account. ', array(), NULL, 'boinc:delete-user-account'),
144
+    );
145 145
 
146
-      $dtypes = variable_get('boincuser_delete_type', 'user_decides');
147
-      // Unset the other option if dtype is set. i.e., if dtype is set
148
-      // to soft delete, unset the hard delete option.  Likewise, add
149
-      // the 'common_acts' sentences to the option that remains.
150
-      switch ($dtypes) {
151
-        case 'soft_obfuscate':
152
-          unset($deleteoptions['boincuser_delete_delete']);
153
-          $deleteoptions['boincuser_delete_softdelete'] .= $common_acts;
154
-          break;
155
-        case 'hard_wipe':
156
-          unset($deleteoptions['boincuser_delete_softdelete']);
157
-          $deleteoptions['boincuser_delete_delete'] .= $common_acts;
158
-          break;
159
-      }
146
+    $dtypes = variable_get('boincuser_delete_type', 'user_decides');
147
+    // Unset the other option if dtype is set. i.e., if dtype is set
148
+    // to soft delete, unset the hard delete option.  Likewise, add
149
+    // the 'common_acts' sentences to the option that remains.
150
+    switch ($dtypes) {
151
+    case 'soft_obfuscate':
152
+    unset($deleteoptions['boincuser_delete_delete']);
153
+    $deleteoptions['boincuser_delete_softdelete'] .= $common_acts;
154
+    break;
155
+    case 'hard_wipe':
156
+    unset($deleteoptions['boincuser_delete_softdelete']);
157
+    $deleteoptions['boincuser_delete_delete'] .= $common_acts;
158
+    break;
159
+    }
160 160
 
161 161
       $question = 'Are you sure you want to delete the account <em>' . htmlspecialchars($form['_account']['#value']->boincuser_name) . '</em>?';
162 162
       drupal_set_title($question);
@@ -324,56 +324,56 @@  discard block
 block discarded – undo
324 324
   // create token with 1 day/24 hour expiration
325 325
   $mytoken = create_token($account->boincuser_id, 'D', 24*60*60);
326 326
   switch ($op) {
327
-    case 'boincuser_delete_softdelete':
328
-      $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
327
+  case 'boincuser_delete_softdelete':
328
+    $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
329 329
       break;
330
-    case 'boincuser_delete_delete':
331
-      $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
332
-      break;
333
-  }
334
-
335
-  $mysubject = "Instructions for account deletion at {$site_name}";
336
-  $mymessage = ''
337
-    . "{$account->boincuser_name},\n"
338
-    . "\n"
339
-    . "We have received a request to DELETE your user account at "
340
-    . "${site_name}. Below in this email is a one-time token you must "
341
-    . "use. Either click on the link or copy-and-paste the URL into your "
342
-    . "browser address bar. Then you will be required to enter your password "
343
-    . "again to confirm your identity.\n"
344
-    . "\n"
345
-    . "${myurl}\n"
346
-    . "\n"
347
-    . "This one-time token will expire in 24 hours. Afterwards you must "
348
-    . "re-request deletion of your account in order to generate a new token.\n"
349
-    . "\n"
350
-    . "If you did not initiate this request, please login to the "
351
-    . "${site_name} Web site (${site_url}) and "
352
-    . "then contact the administrators.\n"
353
-    . "\n"
354
-    . "Thanks, \n"
355
-    . "\n"
356
-    . "{$site_name} support team";
357
-
358
-  // Create array for sending email to user to notify account is being
359
-  // disabled/deleted. Then send email.
360
-  $settings = array(
361
-    'from' => '',
362
-    'subject' => $mysubject,
363
-    'message' => $mymessage,
364
-  );
365
-  rules_action_mail_to_user($account, $settings);
366
-
367
-  drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
330
+case 'boincuser_delete_delete':
331
+  $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
332
+  break;
333
+}
368 334
 
369
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
370
-  // Redirect
371
-  if (!empty($redirect)) {
372
-    drupal_goto($redirect);
373
-  }
374
-  else {
375
-    drupal_goto();
376
-  }
335
+$mysubject = "Instructions for account deletion at {$site_name}";
336
+$mymessage = ''
337
+. "{$account->boincuser_name},\n"
338
+. "\n"
339
+. "We have received a request to DELETE your user account at "
340
+. "${site_name}. Below in this email is a one-time token you must "
341
+. "use. Either click on the link or copy-and-paste the URL into your "
342
+. "browser address bar. Then you will be required to enter your password "
343
+. "again to confirm your identity.\n"
344
+. "\n"
345
+. "${myurl}\n"
346
+. "\n"
347
+. "This one-time token will expire in 24 hours. Afterwards you must "
348
+. "re-request deletion of your account in order to generate a new token.\n"
349
+. "\n"
350
+. "If you did not initiate this request, please login to the "
351
+. "${site_name} Web site (${site_url}) and "
352
+. "then contact the administrators.\n"
353
+. "\n"
354
+. "Thanks, \n"
355
+. "\n"
356
+. "{$site_name} support team";
357
+
358
+// Create array for sending email to user to notify account is being
359
+// disabled/deleted. Then send email.
360
+$settings = array(
361
+'from' => '',
362
+'subject' => $mysubject,
363
+'message' => $mymessage,
364
+);
365
+rules_action_mail_to_user($account, $settings);
366
+
367
+drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
368
+
369
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
370
+// Redirect
371
+if (!empty($redirect)) {
372
+drupal_goto($redirect);
373
+}
374
+else {
375
+drupal_goto();
376
+}
377 377
 }
378 378
 
379 379
 
@@ -385,88 +385,88 @@  discard block
 block discarded – undo
385 385
  * The final confirmation form for the user to delete their account.
386 386
  */
387 387
 function boincuser_delete_finalconfirmation(&$form_state, $token) {
388
-  require_boinc('token');
389
-
390
-  global $user;
391
-  $form = array();
392
-
393
-  // check BOINC user exists
394
-  $account = user_load(array('uid' => $user->uid));
395
-  $uid = $user->uid;
396
-  $boincid = $account->boincuser_id;
397
-  // check $token is valid
398
-  if (!is_valid_token($boincid, $token, 'D')) {
399
-    drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
400
-    array(
401
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
402
-    ),
403
-    NULL, 'boinc:delete-user-account'), 'error');
404
-    drupal_goto();
405
-  }
406
-
407
-  // Attach account to this form.
408
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
409
-
410
-  // This form is for hard/wipe delete
411
-  $form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
412
-
413
-  // Instructions
414
-  $form['main']['fs1'] = array(
415
-    '#type' => 'fieldset',
416
-    '#title' => bts('Instructions', array(), NULL, 'boinc:delete-user-account'),
417
-    '#weight' => 10,
418
-    '#collapsible' => TRUE,
419
-    '#collapsed' => TRUE,
420
-  );
421
-  $form['main']['fs1']['instructions1'] = array(
422
-    '#value' => '<p>'.
423
-    bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
424
-    '</p>',
425
-    '#prefix' => "<div id='delete-instructions'>",
426
-    '#suffix' => "</div>",
427
-  );
428
-
429
-  $form['main']['fs1']['instructions2'] = array(
430
-    '#value' => '<p>'.
431
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
432
-    '</p>',
433
-    '#prefix' => "<div id='delete-instructions'>",
434
-    '#suffix' => "</div>",
435
-  );
436
-
437
-  // Password field
438
-  $form['main']['current_pass'] = array(
439
-    '#type' => 'password',
440
-    '#title' => bts('Enter your password to delete your account', array(), NULL, 'boinc:delete-user-account'),
441
-    '#size' => 17,
442
-    '#attributes' => array(
443
-      'autocomplete' => 'off',
444
-    ),
445
-    '#weight' => 25,
446
-  );
447
-
448
-  // Form control
449
-  $form['form control tabs prefix'] = array(
450
-    '#value' => '<ul class="form-control tab-list">',
451
-    '#weight' => 1001,
452
-  );
453
-  $form['submit'] = array(
454
-    '#prefix' => '<li class="first tab">',
455
-    '#type' => 'submit',
456
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
457
-    '#suffix' => '</li>',
458
-    '#weight' => 1002,
459
-  );
460
-  $form['form control tabs'] = array(
461
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
462
-    '#weight' => 1003,
463
-  );
464
-  $form['form control tabs suffix'] = array(
465
-    '#value' => '</ul>',
466
-    '#weight' => 1004,
467
-  );
388
+require_boinc('token');
389
+
390
+global $user;
391
+$form = array();
392
+
393
+// check BOINC user exists
394
+$account = user_load(array('uid' => $user->uid));
395
+$uid = $user->uid;
396
+$boincid = $account->boincuser_id;
397
+// check $token is valid
398
+if (!is_valid_token($boincid, $token, 'D')) {
399
+drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
400
+array(
401
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
402
+),
403
+NULL, 'boinc:delete-user-account'), 'error');
404
+drupal_goto();
405
+}
468 406
 
469
-  return $form;
407
+// Attach account to this form.
408
+$form['_account'] = array('#type' => 'value', '#value' => $account);
409
+
410
+// This form is for hard/wipe delete
411
+$form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
412
+
413
+// Instructions
414
+$form['main']['fs1'] = array(
415
+'#type' => 'fieldset',
416
+'#title' => bts('Instructions', array(), NULL, 'boinc:delete-user-account'),
417
+'#weight' => 10,
418
+'#collapsible' => TRUE,
419
+'#collapsed' => TRUE,
420
+);
421
+$form['main']['fs1']['instructions1'] = array(
422
+'#value' => '<p>'.
423
+bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
424
+'</p>',
425
+'#prefix' => "<div id='delete-instructions'>",
426
+'#suffix' => "</div>",
427
+);
428
+
429
+$form['main']['fs1']['instructions2'] = array(
430
+'#value' => '<p>'.
431
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
432
+'</p>',
433
+'#prefix' => "<div id='delete-instructions'>",
434
+'#suffix' => "</div>",
435
+);
436
+
437
+// Password field
438
+$form['main']['current_pass'] = array(
439
+'#type' => 'password',
440
+'#title' => bts('Enter your password to delete your account', array(), NULL, 'boinc:delete-user-account'),
441
+'#size' => 17,
442
+'#attributes' => array(
443
+  'autocomplete' => 'off',
444
+),
445
+'#weight' => 25,
446
+);
447
+
448
+// Form control
449
+$form['form control tabs prefix'] = array(
450
+'#value' => '<ul class="form-control tab-list">',
451
+'#weight' => 1001,
452
+);
453
+$form['submit'] = array(
454
+'#prefix' => '<li class="first tab">',
455
+'#type' => 'submit',
456
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
457
+'#suffix' => '</li>',
458
+'#weight' => 1002,
459
+);
460
+$form['form control tabs'] = array(
461
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
462
+'#weight' => 1003,
463
+);
464
+$form['form control tabs suffix'] = array(
465
+'#value' => '</ul>',
466
+'#weight' => 1004,
467
+);
468
+
469
+return $form;
470 470
 }
471 471
 
472 472
 /**
@@ -474,133 +474,133 @@  discard block
 block discarded – undo
474 474
  * the soft/obfuscate method.
475 475
  */
476 476
 function boincuser_delete_softdelconfirmation(&$form_state, $token) {
477
-  require_boinc('token');
478
-
479
-  global $user;
480
-  $form = array();
481
-
482
-  // check BOINC user exists
483
-  $account = user_load(array('uid' => $user->uid));
484
-  $uid = $user->uid;
485
-  $boincid = $account->boincuser_id;
486
-
487
-  // check $token is valid
488
-  if (!is_valid_token($boincid, $token, 'D')) {
489
-    drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
490
-    array(
491
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
492
-    ),
493
-    NULL, 'boinc:delete-user-account'), 'error');
494
-    drupal_goto();
495
-  }
496
-
497
-  // Attach account to this form.
498
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
499
-
500
-  // This form is for hard/wipe delete
501
-  $form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
502
-
503
-  // Instructions
504
-  $form['main']['fs1'] = array(
505
-    '#type' => 'fieldset',
506
-    '#title' => bts('Instructions', array(), NULL, 'boinc:delete-user-account'),
507
-    '#weight' => 10,
508
-    '#collapsible' => TRUE,
509
-    '#collapsed' => TRUE,
510
-  );
511
-  $form['main']['fs1']['instructions1'] = array(
512
-    '#value' => '<p>'.
513
-    bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
514
-    '</p>',
515
-    '#prefix' => "<div id='delete-instructions'>",
516
-    '#suffix' => "</div>",
517
-  );
518
-
519
-  $form['main']['fs1']['instructions2'] = array(
520
-    '#value' => '<p>'.
521
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
522
-    '</p>',
523
-    '#prefix' => "<div id='delete-instructions'>",
524
-    '#suffix' => "</div>",
525
-  );
526
-
527
-  // Password field
528
-  $form['main']['current_pass'] = array(
529
-    '#type' => 'password',
530
-    '#title' => bts('Enter your password to delete your account', array(), NULL, 'boinc:delete-user-account'),
531
-    '#size' => 17,
532
-    '#attributes' => array(
533
-      'autocomplete' => 'off',
534
-    ),
535
-    '#weight' => 25,
536
-  );
537
-
538
-  // Form control
539
-  $form['form control tabs prefix'] = array(
540
-    '#value' => '<ul class="form-control tab-list">',
541
-    '#weight' => 1001,
542
-  );
543
-  $form['submit'] = array(
544
-    '#prefix' => '<li class="first tab">',
545
-    '#type' => 'submit',
546
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
547
-    '#suffix' => '</li>',
548
-    '#weight' => 1002,
549
-  );
550
-  $form['form control tabs'] = array(
551
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
552
-    '#weight' => 1003,
553
-  );
554
-  $form['form control tabs suffix'] = array(
555
-    '#value' => '</ul>',
556
-    '#weight' => 1004,
557
-  );
477
+require_boinc('token');
478
+
479
+global $user;
480
+$form = array();
481
+
482
+// check BOINC user exists
483
+$account = user_load(array('uid' => $user->uid));
484
+$uid = $user->uid;
485
+$boincid = $account->boincuser_id;
486
+
487
+// check $token is valid
488
+if (!is_valid_token($boincid, $token, 'D')) {
489
+drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
490
+array(
491
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
492
+),
493
+NULL, 'boinc:delete-user-account'), 'error');
494
+drupal_goto();
495
+}
558 496
 
559
-  //set validation and submit to the functions below
560
-  $form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
561
-  $form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
562
-  return $form;
497
+// Attach account to this form.
498
+$form['_account'] = array('#type' => 'value', '#value' => $account);
499
+
500
+// This form is for hard/wipe delete
501
+$form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
502
+
503
+// Instructions
504
+$form['main']['fs1'] = array(
505
+'#type' => 'fieldset',
506
+'#title' => bts('Instructions', array(), NULL, 'boinc:delete-user-account'),
507
+'#weight' => 10,
508
+'#collapsible' => TRUE,
509
+'#collapsed' => TRUE,
510
+);
511
+$form['main']['fs1']['instructions1'] = array(
512
+'#value' => '<p>'.
513
+bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
514
+'</p>',
515
+'#prefix' => "<div id='delete-instructions'>",
516
+'#suffix' => "</div>",
517
+);
518
+
519
+$form['main']['fs1']['instructions2'] = array(
520
+'#value' => '<p>'.
521
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
522
+'</p>',
523
+'#prefix' => "<div id='delete-instructions'>",
524
+'#suffix' => "</div>",
525
+);
526
+
527
+// Password field
528
+$form['main']['current_pass'] = array(
529
+'#type' => 'password',
530
+'#title' => bts('Enter your password to delete your account', array(), NULL, 'boinc:delete-user-account'),
531
+'#size' => 17,
532
+'#attributes' => array(
533
+  'autocomplete' => 'off',
534
+),
535
+'#weight' => 25,
536
+);
537
+
538
+// Form control
539
+$form['form control tabs prefix'] = array(
540
+'#value' => '<ul class="form-control tab-list">',
541
+'#weight' => 1001,
542
+);
543
+$form['submit'] = array(
544
+'#prefix' => '<li class="first tab">',
545
+'#type' => 'submit',
546
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
547
+'#suffix' => '</li>',
548
+'#weight' => 1002,
549
+);
550
+$form['form control tabs'] = array(
551
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
552
+'#weight' => 1003,
553
+);
554
+$form['form control tabs suffix'] = array(
555
+'#value' => '</ul>',
556
+'#weight' => 1004,
557
+);
558
+
559
+//set validation and submit to the functions below
560
+$form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
561
+$form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
562
+return $form;
563 563
 }
564 564
 
565 565
 /**
566 566
  * Validation for final confirmation
567 567
  */
568 568
 function boincuser_delete_finalconfirmation_validate($form, &$form_state) {
569
-  $account = $form_state['values']['_account'];
570
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
569
+$account = $form_state['values']['_account'];
570
+$boinc_user = BoincUser::lookup_id($account->boincuser_id);
571 571
 
572
-  if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
573
-    return true;
574
-  }
572
+if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
573
+return true;
574
+}
575 575
 }
576 576
 
577 577
 /**
578 578
  * Submit for final confirmation
579 579
  */
580 580
 function boincuser_delete_finalconfirmation_submit($form, &$form_state) {
581
-  global $user;
582
-
583
-  // Delete the user
584
-  $account = $form_state['values']['_account'];
585
-  $action = $form_state['values']['_action'];
586
-  _boincuser_delete_deleteuser($account, $action);
587
-
588
-  // Destroy the current session:
589
-  session_destroy();
590
-  // Only variables can be passed by reference workaround.
591
-  $null = NULL;
592
-  user_module_invoke('logout', $null, $user);
593
-
594
-  // Load the anonymous user
595
-  $user = drupal_anonymous_user();
596
-
597
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
598
-  // Redirect
599
-  if (!empty($redirect)) {
600
-    drupal_goto($redirect);
601
-  }
602
-  else {
603
-    drupal_goto();
604
-  }
581
+global $user;
582
+
583
+// Delete the user
584
+$account = $form_state['values']['_account'];
585
+$action = $form_state['values']['_action'];
586
+_boincuser_delete_deleteuser($account, $action);
587
+
588
+// Destroy the current session:
589
+session_destroy();
590
+// Only variables can be passed by reference workaround.
591
+$null = NULL;
592
+user_module_invoke('logout', $null, $user);
593
+
594
+// Load the anonymous user
595
+$user = drupal_anonymous_user();
596
+
597
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
598
+// Redirect
599
+if (!empty($redirect)) {
600
+drupal_goto($redirect);
601
+}
602
+else {
603
+drupal_goto();
604
+}
605 605
 
606 606
 }
Please login to merge, or discard this patch.