Passed
Pull Request — master (#2712)
by Christian
07:46
created
drupal/sites/default/boinc/modules/contrib/filefield/filefield.theme.inc 1 patch
Switch Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -123,126 +123,126 @@
 block discarded – undo
123 123
 function _filefield_generic_icon_map($file) {
124 124
   switch ($file['filemime']) {
125 125
     // Word document types.
126
-    case 'application/msword':
127
-    case 'application/vnd.ms-word.document.macroEnabled.12':
128
-    case 'application/vnd.oasis.opendocument.text':
129
-    case 'application/vnd.oasis.opendocument.text-template':
130
-    case 'application/vnd.oasis.opendocument.text-master':
131
-    case 'application/vnd.oasis.opendocument.text-web':
132
-    case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
133
-    case 'application/vnd.stardivision.writer':
134
-    case 'application/vnd.sun.xml.writer':
135
-    case 'application/vnd.sun.xml.writer.template':
136
-    case 'application/vnd.sun.xml.writer.global':
137
-    case 'application/vnd.wordperfect':
138
-    case 'application/x-abiword':
139
-    case 'application/x-applix-word':
140
-    case 'application/x-kword':
141
-    case 'application/x-kword-crypt':
142
-      return 'x-office-document';
143
-
144
-    // Spreadsheet document types.
145
-    case 'application/vnd.ms-excel':
146
-    case 'application/vnd.ms-excel.sheet.macroEnabled.12':
147
-    case 'application/vnd.oasis.opendocument.spreadsheet':
148
-    case 'application/vnd.oasis.opendocument.spreadsheet-template':
149
-    case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
150
-    case 'application/vnd.stardivision.calc':
151
-    case 'application/vnd.sun.xml.calc':
152
-    case 'application/vnd.sun.xml.calc.template':
153
-    case 'application/vnd.lotus-1-2-3':
154
-    case 'application/x-applix-spreadsheet':
155
-    case 'application/x-gnumeric':
156
-    case 'application/x-kspread':
157
-    case 'application/x-kspread-crypt':
158
-      return 'x-office-spreadsheet';
159
-
160
-    // Presentation document types.
161
-    case 'application/vnd.ms-powerpoint':
162
-    case 'application/vnd.ms-powerpoint.presentation.macroEnabled.12':
163
-    case 'application/vnd.oasis.opendocument.presentation':
164
-    case 'application/vnd.oasis.opendocument.presentation-template':
165
-    case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
166
-    case 'application/vnd.openxmlformats-officedocument.presentationml.slideshow':
167
-    case 'application/vnd.stardivision.impress':
168
-    case 'application/vnd.sun.xml.impress':
169
-    case 'application/vnd.sun.xml.impress.template':
170
-    case 'application/x-kpresenter':
171
-      return 'x-office-presentation';
172
-
173
-    // Compressed archive types.
174
-    case 'application/zip':
175
-    case 'application/x-zip':
176
-    case 'application/stuffit':
177
-    case 'application/x-stuffit':
178
-    case 'application/x-7z-compressed':
179
-    case 'application/x-ace':
180
-    case 'application/x-arj':
181
-    case 'application/x-bzip':
182
-    case 'application/x-bzip-compressed-tar':
183
-    case 'application/x-compress':
184
-    case 'application/x-compressed-tar':
185
-    case 'application/x-cpio-compressed':
186
-    case 'application/x-deb':
187
-    case 'application/x-gzip':
188
-    case 'application/x-java-archive':
189
-    case 'application/x-lha':
190
-    case 'application/x-lhz':
191
-    case 'application/x-lzop':
192
-    case 'application/x-rar':
193
-    case 'application/x-rpm':
194
-    case 'application/x-tzo':
195
-    case 'application/x-tar':
196
-    case 'application/x-tarz':
197
-    case 'application/x-tgz':
198
-      return 'package-x-generic';
199
-
200
-    // Script file types.
201
-    case 'application/ecmascript':
202
-    case 'application/javascript':
203
-    case 'application/mathematica':
204
-    case 'application/vnd.mozilla.xul+xml':
205
-    case 'application/x-asp':
206
-    case 'application/x-awk':
207
-    case 'application/x-cgi':
208
-    case 'application/x-csh':
209
-    case 'application/x-m4':
210
-    case 'application/x-perl':
211
-    case 'application/x-php':
212
-    case 'application/x-ruby':
213
-    case 'application/x-shellscript':
214
-    case 'text/vnd.wap.wmlscript':
215
-    case 'text/x-emacs-lisp':
216
-    case 'text/x-haskell':
217
-    case 'text/x-literate-haskell':
218
-    case 'text/x-lua':
219
-    case 'text/x-makefile':
220
-    case 'text/x-matlab':
221
-    case 'text/x-python':
222
-    case 'text/x-sql':
223
-    case 'text/x-tcl':
224
-      return 'text-x-script';
225
-
226
-    // HTML aliases.
227
-    case 'application/xhtml+xml':
228
-      return 'text-html';
229
-
230
-    // RTF files.
231
-    case 'application/rtf':
232
-      return 'text-rtf';
233
-
234
-    // Google earth files.
235
-    case 'application/vnd.google-earth.kml+xml':
236
-    case 'application/vnd.google-earth.kmz':
237
-      return 'application-google-earth';
238
-
239
-    // Executable types.
240
-    case 'application/x-macbinary':
241
-    case 'application/x-ms-dos-executable':
242
-    case 'application/x-pef-executable':
243
-      return 'application-x-executable';
244
-
245
-    default:
246
-      return FALSE;
126
+  case 'application/msword':
127
+  case 'application/vnd.ms-word.document.macroEnabled.12':
128
+  case 'application/vnd.oasis.opendocument.text':
129
+  case 'application/vnd.oasis.opendocument.text-template':
130
+  case 'application/vnd.oasis.opendocument.text-master':
131
+  case 'application/vnd.oasis.opendocument.text-web':
132
+  case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
133
+  case 'application/vnd.stardivision.writer':
134
+  case 'application/vnd.sun.xml.writer':
135
+  case 'application/vnd.sun.xml.writer.template':
136
+  case 'application/vnd.sun.xml.writer.global':
137
+  case 'application/vnd.wordperfect':
138
+  case 'application/x-abiword':
139
+  case 'application/x-applix-word':
140
+  case 'application/x-kword':
141
+  case 'application/x-kword-crypt':
142
+    return 'x-office-document';
143
+
144
+  // Spreadsheet document types.
145
+  case 'application/vnd.ms-excel':
146
+  case 'application/vnd.ms-excel.sheet.macroEnabled.12':
147
+  case 'application/vnd.oasis.opendocument.spreadsheet':
148
+  case 'application/vnd.oasis.opendocument.spreadsheet-template':
149
+  case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
150
+  case 'application/vnd.stardivision.calc':
151
+  case 'application/vnd.sun.xml.calc':
152
+  case 'application/vnd.sun.xml.calc.template':
153
+  case 'application/vnd.lotus-1-2-3':
154
+  case 'application/x-applix-spreadsheet':
155
+  case 'application/x-gnumeric':
156
+  case 'application/x-kspread':
157
+  case 'application/x-kspread-crypt':
158
+    return 'x-office-spreadsheet';
159
+
160
+  // Presentation document types.
161
+  case 'application/vnd.ms-powerpoint':
162
+  case 'application/vnd.ms-powerpoint.presentation.macroEnabled.12':
163
+  case 'application/vnd.oasis.opendocument.presentation':
164
+  case 'application/vnd.oasis.opendocument.presentation-template':
165
+  case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
166
+  case 'application/vnd.openxmlformats-officedocument.presentationml.slideshow':
167
+  case 'application/vnd.stardivision.impress':
168
+  case 'application/vnd.sun.xml.impress':
169
+  case 'application/vnd.sun.xml.impress.template':
170
+  case 'application/x-kpresenter':
171
+    return 'x-office-presentation';
172
+
173
+  // Compressed archive types.
174
+  case 'application/zip':
175
+  case 'application/x-zip':
176
+  case 'application/stuffit':
177
+  case 'application/x-stuffit':
178
+  case 'application/x-7z-compressed':
179
+  case 'application/x-ace':
180
+  case 'application/x-arj':
181
+  case 'application/x-bzip':
182
+  case 'application/x-bzip-compressed-tar':
183
+  case 'application/x-compress':
184
+  case 'application/x-compressed-tar':
185
+  case 'application/x-cpio-compressed':
186
+  case 'application/x-deb':
187
+  case 'application/x-gzip':
188
+  case 'application/x-java-archive':
189
+  case 'application/x-lha':
190
+  case 'application/x-lhz':
191
+  case 'application/x-lzop':
192
+  case 'application/x-rar':
193
+  case 'application/x-rpm':
194
+  case 'application/x-tzo':
195
+  case 'application/x-tar':
196
+  case 'application/x-tarz':
197
+  case 'application/x-tgz':
198
+    return 'package-x-generic';
199
+
200
+  // Script file types.
201
+  case 'application/ecmascript':
202
+  case 'application/javascript':
203
+  case 'application/mathematica':
204
+  case 'application/vnd.mozilla.xul+xml':
205
+  case 'application/x-asp':
206
+  case 'application/x-awk':
207
+  case 'application/x-cgi':
208
+  case 'application/x-csh':
209
+  case 'application/x-m4':
210
+  case 'application/x-perl':
211
+  case 'application/x-php':
212
+  case 'application/x-ruby':
213
+  case 'application/x-shellscript':
214
+  case 'text/vnd.wap.wmlscript':
215
+  case 'text/x-emacs-lisp':
216
+  case 'text/x-haskell':
217
+  case 'text/x-literate-haskell':
218
+  case 'text/x-lua':
219
+  case 'text/x-makefile':
220
+  case 'text/x-matlab':
221
+  case 'text/x-python':
222
+  case 'text/x-sql':
223
+  case 'text/x-tcl':
224
+    return 'text-x-script';
225
+
226
+  // HTML aliases.
227
+  case 'application/xhtml+xml':
228
+    return 'text-html';
229
+
230
+  // RTF files.
231
+  case 'application/rtf':
232
+    return 'text-rtf';
233
+
234
+  // Google earth files.
235
+  case 'application/vnd.google-earth.kml+xml':
236
+  case 'application/vnd.google-earth.kmz':
237
+    return 'application-google-earth';
238
+
239
+  // Executable types.
240
+  case 'application/x-macbinary':
241
+  case 'application/x-ms-dos-executable':
242
+  case 'application/x-pef-executable':
243
+    return 'application-x-executable';
244
+
245
+  default:
246
+    return FALSE;
247 247
   }
248 248
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/filefield/filefield.module 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -313,10 +313,10 @@
 block discarded – undo
313 313
  */
314 314
 function filefield_widget_settings($op, $widget) {
315 315
   switch ($op) {
316
-    case 'form':
317
-      return filefield_widget_settings_form($widget);
318
-    case 'save':
319
-      return filefield_widget_settings_save($widget);
316
+  case 'form':
317
+    return filefield_widget_settings_form($widget);
318
+  case 'save':
319
+    return filefield_widget_settings_save($widget);
320 320
   }
321 321
 }
322 322
 
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/forum_access/forum_access.node.inc 1 patch
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -79,27 +79,27 @@  discard block
 block discarded – undo
79 79
     $allowed_options = variable_get('forum_access_allowed_node_edit_options', array('status', 'sticky', 'subscriptions_notify'));
80 80
     foreach (element_children($form) as $key) {
81 81
       switch ($key) {
82
-        case 'options':
83
-          foreach (element_children($form[$key]) as $key2) {
84
-            if (array_search($key2, $allowed_options) === FALSE) {
85
-              $form[$key][$key2]['#access'] = FALSE;
86
-            }
87
-          }
88
-          break;
89
-        case 'buttons':
90
-          $tid = $form['taxonomy'][$vid]['#default_value'][0];
91
-          if (!forum_access_access($tid, 'update')) {
92
-            $form['buttons']['submit']['#access'] = FALSE;
93
-            $form['buttons']['preview']['#access'] = FALSE;
94
-          }
95
-          if (!forum_access_access($tid, 'delete')) {
96
-            $form['buttons']['delete']['#access'] = FALSE;
97
-          }
98
-          break;
99
-        default:
100
-          if (array_search($key, $allowed_elements) === FALSE) {
101
-            $form[$key]['#access'] = FALSE;
82
+      case 'options':
83
+        foreach (element_children($form[$key]) as $key2) {
84
+          if (array_search($key2, $allowed_options) === FALSE) {
85
+            $form[$key][$key2]['#access'] = FALSE;
102 86
           }
87
+        }
88
+        break;
89
+      case 'buttons':
90
+        $tid = $form['taxonomy'][$vid]['#default_value'][0];
91
+        if (!forum_access_access($tid, 'update')) {
92
+          $form['buttons']['submit']['#access'] = FALSE;
93
+          $form['buttons']['preview']['#access'] = FALSE;
94
+        }
95
+        if (!forum_access_access($tid, 'delete')) {
96
+          $form['buttons']['delete']['#access'] = FALSE;
97
+        }
98
+        break;
99
+      default:
100
+        if (array_search($key, $allowed_elements) === FALSE) {
101
+          $form[$key]['#access'] = FALSE;
102
+        }
103 103
       }
104 104
     }
105 105
   }
@@ -120,20 +120,20 @@  discard block
 block discarded – undo
120 120
     if ($tid = _forum_access_get_tid($node)) {
121 121
       if (!forum_access_access($tid, 'comment_create') and !(forum_access_access($tid, 'create') and ($node->uid==$user->uid)) ) {
122 122
         switch (arg(0)) {
123
-          case 'node':
124
-              // Remove the in-line comment form, replace with text message to user.
125
-              $form = NULL;
126
-              $form['from'] = array(
127
-                  '#type'  => 'item',
128
-                  '#value' => 'You do not have permission to post comments in this forum.',);
129
-            break;
130
-            case 'comment':
131
-                if (arg(1)=='reply') {
132
-                    drupal_set_message(t("ERROR: You do not have permission to post comments in this forum."), 'error');
133
-                    drupal_goto("node/$node->nid");
134
-                    exit;
135
-                }
136
-            break;
123
+        case 'node':
124
+            // Remove the in-line comment form, replace with text message to user.
125
+            $form = NULL;
126
+            $form['from'] = array(
127
+                '#type'  => 'item',
128
+                '#value' => 'You do not have permission to post comments in this forum.',);
129
+          break;
130
+        case 'comment':
131
+            if (arg(1)=='reply') {
132
+                drupal_set_message(t("ERROR: You do not have permission to post comments in this forum."), 'error');
133
+                drupal_goto("node/$node->nid");
134
+                exit;
135
+            }
136
+        break;
137 137
         }//switch arg(0)
138 138
       }
139 139
       else {
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.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.module 1 patch
Switch Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -94,64 +94,64 @@  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
-      $deleteoptions = array(
140
-        'boincuser_delete_softdelete' => bts('<b>Soft delete</b> the account. Afterwards your account will be disabled, and all posts/comments will be attributed to the Anonymous User. However, 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'),
141
-        'boincuser_delete_delete' => bts('<b>Delete</b> the account. Afterwards your account will be deleted, and all posts/comments will be attributed to the Anonymous User. Your user profile will be deleted, and your host information will be deleted.', 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>',
142 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
+    $deleteoptions = array(
140
+      'boincuser_delete_softdelete' => bts('<b>Soft delete</b> the account. Afterwards your account will be disabled, and all posts/comments will be attributed to the Anonymous User. However, 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'),
141
+      'boincuser_delete_delete' => bts('<b>Delete</b> the account. Afterwards your account will be deleted, and all posts/comments will be attributed to the Anonymous User. Your user profile will be deleted, and your host information will be deleted.', array(), NULL, 'boinc:delete-user-account'),
142
+    );
143 143
 
144
-      $dtypes = variable_get('boincuser_delete_type', 'user_decides');
145
-      // unset the other option if dtype is set. i.e., if dtype is set
146
-      // to soft delete, unset the hard delete option.
147
-      switch ($dtypes) {
148
-        case 'soft_obfuscate':
149
-          unset($deleteoptions['boincuser_delete_delete']);
150
-          break;
151
-        case 'hard_wipe':
152
-          unset($deleteoptions['boincuser_delete_softdelete']);
153
-          break;
154
-      }
144
+    $dtypes = variable_get('boincuser_delete_type', 'user_decides');
145
+    // unset the other option if dtype is set. i.e., if dtype is set
146
+    // to soft delete, unset the hard delete option.
147
+    switch ($dtypes) {
148
+    case 'soft_obfuscate':
149
+    unset($deleteoptions['boincuser_delete_delete']);
150
+    break;
151
+    case 'hard_wipe':
152
+    unset($deleteoptions['boincuser_delete_softdelete']);
153
+    break;
154
+    }
155 155
 
156 156
       $question = 'Are you sure you want to delete the account <em>' . htmlspecialchars($form['_account']['#value']->boincuser_name) . '</em>?';
157 157
       drupal_set_title($question);
@@ -301,56 +301,56 @@  discard block
 block discarded – undo
301 301
   // create token with 1 day/24 hour expiration
302 302
   $mytoken = create_token($account->boincuser_id, 'D', 24*60*60);
303 303
   switch ($op) {
304
-    case 'boincuser_delete_softdelete':
305
-      $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
306
-      break;
307
-    case 'boincuser_delete_delete':
308
-      $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
304
+  case 'boincuser_delete_softdelete':
305
+    $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
309 306
       break;
310
-  }
311
-
312
-  $mysubject = "Instructions for account deletion at {$site_name}";
313
-  $mymessage = ''
314
-    . "{$account->boincuser_name},\n"
315
-    . "\n"
316
-    . "We have received a request to DELETE your user account at "
317
-    . "${site_name}. Below in this email is a one-time token you must "
318
-    . "use. Either click on the link or copy-and-paste the URL into your "
319
-    . "browser address bar. Then you will be required to enter your password "
320
-    . "again to confirm your identity.\n"
321
-    . "\n"
322
-    . "${myurl}\n"
323
-    . "\n"
324
-    . "This one-time token will expire in 24 hours. Afterwards you must "
325
-    . "re-request deletion of your account in order to generate a new token.\n"
326
-    . "\n"
327
-    . "If you did not initiate this request, please login to the "
328
-    . "${site_name} Web site (${site_url}) and "
329
-    . "then contact the administrators.\n"
330
-    . "\n"
331
-    . "Thanks, \n"
332
-    . "\n"
333
-    . "{$site_name} support team";
334
-
335
-  // Create array for sending email to user to notify account is being
336
-  // disabled/deleted. Then send email.
337
-  $settings = array(
338
-    'from' => '',
339
-    'subject' => $mysubject,
340
-    'message' => $mymessage,
341
-  );
342
-  rules_action_mail_to_user($account, $settings);
343
-
344
-  drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
307
+case 'boincuser_delete_delete':
308
+  $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
309
+  break;
310
+}
345 311
 
346
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
347
-  // Redirect
348
-  if (!empty($redirect)) {
349
-    drupal_goto($redirect);
350
-  }
351
-  else {
352
-    drupal_goto();
353
-  }
312
+$mysubject = "Instructions for account deletion at {$site_name}";
313
+$mymessage = ''
314
+. "{$account->boincuser_name},\n"
315
+. "\n"
316
+. "We have received a request to DELETE your user account at "
317
+. "${site_name}. Below in this email is a one-time token you must "
318
+. "use. Either click on the link or copy-and-paste the URL into your "
319
+. "browser address bar. Then you will be required to enter your password "
320
+. "again to confirm your identity.\n"
321
+. "\n"
322
+. "${myurl}\n"
323
+. "\n"
324
+. "This one-time token will expire in 24 hours. Afterwards you must "
325
+. "re-request deletion of your account in order to generate a new token.\n"
326
+. "\n"
327
+. "If you did not initiate this request, please login to the "
328
+. "${site_name} Web site (${site_url}) and "
329
+. "then contact the administrators.\n"
330
+. "\n"
331
+. "Thanks, \n"
332
+. "\n"
333
+. "{$site_name} support team";
334
+
335
+// Create array for sending email to user to notify account is being
336
+// disabled/deleted. Then send email.
337
+$settings = array(
338
+'from' => '',
339
+'subject' => $mysubject,
340
+'message' => $mymessage,
341
+);
342
+rules_action_mail_to_user($account, $settings);
343
+
344
+drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
345
+
346
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
347
+// Redirect
348
+if (!empty($redirect)) {
349
+drupal_goto($redirect);
350
+}
351
+else {
352
+drupal_goto();
353
+}
354 354
 }
355 355
 
356 356
 
@@ -362,77 +362,77 @@  discard block
 block discarded – undo
362 362
  * The final confirmation form for the user to delete their account.
363 363
  */
364 364
 function boincuser_delete_finalconfirmation(&$form_state, $token) {
365
-  require_boinc('token');
366
-
367
-  global $user;
368
-  $form = array();
369
-
370
-  // check BOINC user exists
371
-  $account = user_load(array('uid' => $user->uid));
372
-  $uid = $user->uid;
373
-  $boincid = $account->boincuser_id;
374
-  // check $token is valid
375
-  if (!is_valid_token($boincid, $token, 'D')) {
376
-    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.',
377
-    array(
378
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
379
-    ),
380
-    NULL, 'boinc:delete-user-account'), 'error');
381
-    drupal_goto();
382
-  }
383
-
384
-  // Attach account to this form.
385
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
386
-
387
-  // This form is for hard/wipe delete
388
-  $form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
389
-
390
-  // Instructions
391
-  $form['main']['instructions1'] = array(
392
-    '#value' => '<p>'.
393
-    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').
394
-    '</p>',
395
-  );
396
-
397
-  $form['main']['instructions2'] = array(
398
-    '#value' => '<p>'.
399
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
400
-    '</p>',
401
-  );
402
-
403
-  // Password field
404
-  $form['main']['current_pass'] = array(
405
-    '#type' => 'password',
406
-    '#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
407
-    '#size' => 17,
408
-    '#attributes' => array(
409
-      'autocomplete' => 'off',
410
-    ),
411
-    '#weight' => 25,
412
-  );
413
-
414
-  // Form control
415
-  $form['form control tabs prefix'] = array(
416
-    '#value' => '<ul class="form-control tab-list">',
417
-    '#weight' => 1001,
418
-  );
419
-  $form['submit'] = array(
420
-    '#prefix' => '<li class="first tab">',
421
-    '#type' => 'submit',
422
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
423
-    '#suffix' => '</li>',
424
-    '#weight' => 1002,
425
-  );
426
-  $form['form control tabs'] = array(
427
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
428
-    '#weight' => 1003,
429
-  );
430
-  $form['form control tabs suffix'] = array(
431
-    '#value' => '</ul>',
432
-    '#weight' => 1004,
433
-  );
365
+require_boinc('token');
366
+
367
+global $user;
368
+$form = array();
369
+
370
+// check BOINC user exists
371
+$account = user_load(array('uid' => $user->uid));
372
+$uid = $user->uid;
373
+$boincid = $account->boincuser_id;
374
+// check $token is valid
375
+if (!is_valid_token($boincid, $token, 'D')) {
376
+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.',
377
+array(
378
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
379
+),
380
+NULL, 'boinc:delete-user-account'), 'error');
381
+drupal_goto();
382
+}
434 383
 
435
-  return $form;
384
+// Attach account to this form.
385
+$form['_account'] = array('#type' => 'value', '#value' => $account);
386
+
387
+// This form is for hard/wipe delete
388
+$form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
389
+
390
+// Instructions
391
+$form['main']['instructions1'] = array(
392
+'#value' => '<p>'.
393
+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').
394
+'</p>',
395
+);
396
+
397
+$form['main']['instructions2'] = array(
398
+'#value' => '<p>'.
399
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
400
+'</p>',
401
+);
402
+
403
+// Password field
404
+$form['main']['current_pass'] = array(
405
+'#type' => 'password',
406
+'#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
407
+'#size' => 17,
408
+'#attributes' => array(
409
+  'autocomplete' => 'off',
410
+),
411
+'#weight' => 25,
412
+);
413
+
414
+// Form control
415
+$form['form control tabs prefix'] = array(
416
+'#value' => '<ul class="form-control tab-list">',
417
+'#weight' => 1001,
418
+);
419
+$form['submit'] = array(
420
+'#prefix' => '<li class="first tab">',
421
+'#type' => 'submit',
422
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
423
+'#suffix' => '</li>',
424
+'#weight' => 1002,
425
+);
426
+$form['form control tabs'] = array(
427
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
428
+'#weight' => 1003,
429
+);
430
+$form['form control tabs suffix'] = array(
431
+'#value' => '</ul>',
432
+'#weight' => 1004,
433
+);
434
+
435
+return $form;
436 436
 }
437 437
 
438 438
 /**
@@ -440,122 +440,122 @@  discard block
 block discarded – undo
440 440
  * the soft/obfuscate method.
441 441
  */
442 442
 function boincuser_delete_softdelconfirmation(&$form_state, $token) {
443
-  require_boinc('token');
444
-
445
-  global $user;
446
-  $form = array();
447
-
448
-  // check BOINC user exists
449
-  $account = user_load(array('uid' => $user->uid));
450
-  $uid = $user->uid;
451
-  $boincid = $account->boincuser_id;
452
-
453
-  // check $token is valid
454
-  if (!is_valid_token($boincid, $token, 'D')) {
455
-    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.',
456
-    array(
457
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
458
-    ),
459
-    NULL, 'boinc:delete-user-account'), 'error');
460
-    drupal_goto();
461
-  }
462
-
463
-  // Attach account to this form.
464
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
465
-
466
-  // This form is for hard/wipe delete
467
-  $form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
468
-
469
-  // Instructions
470
-  $form['main']['instructions1'] = array(
471
-    '#value' => '<p>'.
472
-    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').
473
-    '</p>',
474
-  );
475
-
476
-  $form['main']['instructions2'] = array(
477
-    '#value' => '<p>'.
478
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
479
-    '</p>',
480
-  );
481
-
482
-  // Password field
483
-  $form['main']['current_pass'] = array(
484
-    '#type' => 'password',
485
-    '#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
486
-    '#size' => 17,
487
-    '#attributes' => array(
488
-      'autocomplete' => 'off',
489
-    ),
490
-    '#weight' => 25,
491
-  );
492
-
493
-  // Form control
494
-  $form['form control tabs prefix'] = array(
495
-    '#value' => '<ul class="form-control tab-list">',
496
-    '#weight' => 1001,
497
-  );
498
-  $form['submit'] = array(
499
-    '#prefix' => '<li class="first tab">',
500
-    '#type' => 'submit',
501
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
502
-    '#suffix' => '</li>',
503
-    '#weight' => 1002,
504
-  );
505
-  $form['form control tabs'] = array(
506
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
507
-    '#weight' => 1003,
508
-  );
509
-  $form['form control tabs suffix'] = array(
510
-    '#value' => '</ul>',
511
-    '#weight' => 1004,
512
-  );
443
+require_boinc('token');
444
+
445
+global $user;
446
+$form = array();
447
+
448
+// check BOINC user exists
449
+$account = user_load(array('uid' => $user->uid));
450
+$uid = $user->uid;
451
+$boincid = $account->boincuser_id;
452
+
453
+// check $token is valid
454
+if (!is_valid_token($boincid, $token, 'D')) {
455
+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.',
456
+array(
457
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
458
+),
459
+NULL, 'boinc:delete-user-account'), 'error');
460
+drupal_goto();
461
+}
513 462
 
514
-  //set validation and submit to the functions below
515
-  $form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
516
-  $form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
517
-  return $form;
463
+// Attach account to this form.
464
+$form['_account'] = array('#type' => 'value', '#value' => $account);
465
+
466
+// This form is for hard/wipe delete
467
+$form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
468
+
469
+// Instructions
470
+$form['main']['instructions1'] = array(
471
+'#value' => '<p>'.
472
+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').
473
+'</p>',
474
+);
475
+
476
+$form['main']['instructions2'] = array(
477
+'#value' => '<p>'.
478
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
479
+'</p>',
480
+);
481
+
482
+// Password field
483
+$form['main']['current_pass'] = array(
484
+'#type' => 'password',
485
+'#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
486
+'#size' => 17,
487
+'#attributes' => array(
488
+  'autocomplete' => 'off',
489
+),
490
+'#weight' => 25,
491
+);
492
+
493
+// Form control
494
+$form['form control tabs prefix'] = array(
495
+'#value' => '<ul class="form-control tab-list">',
496
+'#weight' => 1001,
497
+);
498
+$form['submit'] = array(
499
+'#prefix' => '<li class="first tab">',
500
+'#type' => 'submit',
501
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
502
+'#suffix' => '</li>',
503
+'#weight' => 1002,
504
+);
505
+$form['form control tabs'] = array(
506
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
507
+'#weight' => 1003,
508
+);
509
+$form['form control tabs suffix'] = array(
510
+'#value' => '</ul>',
511
+'#weight' => 1004,
512
+);
513
+
514
+//set validation and submit to the functions below
515
+$form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
516
+$form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
517
+return $form;
518 518
 }
519 519
 
520 520
 /**
521 521
  * Validation for final confirmation
522 522
  */
523 523
 function boincuser_delete_finalconfirmation_validate($form, &$form_state) {
524
-  $account = $form_state['values']['_account'];
525
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
524
+$account = $form_state['values']['_account'];
525
+$boinc_user = BoincUser::lookup_id($account->boincuser_id);
526 526
 
527
-  if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
528
-    return true;
529
-  }
527
+if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
528
+return true;
529
+}
530 530
 }
531 531
 
532 532
 /**
533 533
  * Submit for final confirmation
534 534
  */
535 535
 function boincuser_delete_finalconfirmation_submit($form, &$form_state) {
536
-  global $user;
537
-
538
-  // Delete the user
539
-  $account = $form_state['values']['_account'];
540
-  $action = $form_state['values']['_action'];
541
-  _boincuser_delete_deleteuser($account, $action);
542
-
543
-  // Destroy the current session:
544
-  session_destroy();
545
-  // Only variables can be passed by reference workaround.
546
-  $null = NULL;
547
-  user_module_invoke('logout', $null, $user);
548
-
549
-  // Load the anonymous user
550
-  $user = drupal_anonymous_user();
551
-
552
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
553
-  // Redirect
554
-  if (!empty($redirect)) {
555
-    drupal_goto($redirect);
556
-  }
557
-  else {
558
-    drupal_goto();
559
-  }
536
+global $user;
537
+
538
+// Delete the user
539
+$account = $form_state['values']['_account'];
540
+$action = $form_state['values']['_action'];
541
+_boincuser_delete_deleteuser($account, $action);
542
+
543
+// Destroy the current session:
544
+session_destroy();
545
+// Only variables can be passed by reference workaround.
546
+$null = NULL;
547
+user_module_invoke('logout', $null, $user);
548
+
549
+// Load the anonymous user
550
+$user = drupal_anonymous_user();
551
+
552
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
553
+// Redirect
554
+if (!empty($redirect)) {
555
+drupal_goto($redirect);
556
+}
557
+else {
558
+drupal_goto();
559
+}
560 560
 
561 561
 }
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.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.helpers.inc 1 patch
Switch Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -11,25 +11,25 @@  discard block
 block discarded – undo
11 11
  * that was selected
12 12
  */
13 13
 function boincwork_ahah_helper_venue_submit($form, &$form_state) {
14
-  $form_state['storage']['prefs']['preset'] = null;
15
-  ahah_helper_generic_submit($form, $form_state);
14
+$form_state['storage']['prefs']['preset'] = null;
15
+ahah_helper_generic_submit($form, $form_state);
16 16
 }
17 17
 
18 18
 /**
19 19
  * Get a predetermined set of preferences
20 20
  */
21 21
 function boincwork_get_preset_prefs($preset = null) {
22
-  $saved_state = variable_get('boincwork_preset_prefs', null);
22
+$saved_state = variable_get('boincwork_preset_prefs', null);
23 23
   
24
-  // If not configured yet, use these values as for inital
25
-  // computing/general preferences.
26
-  if (!$saved_state) {
27
-    // Get BOINC project disk space configurations from config.xml to
28
-    // fill in initial preference values.
29
-    require_boinc(array('db', 'prefs'));
30
-    $disk_space_config = get_disk_space_config();
31
-
32
-    $saved_state = '
24
+// If not configured yet, use these values as for inital
25
+// computing/general preferences.
26
+if (!$saved_state) {
27
+// Get BOINC project disk space configurations from config.xml to
28
+// fill in initial preference values.
29
+require_boinc(array('db', 'prefs'));
30
+$disk_space_config = get_disk_space_config();
31
+
32
+$saved_state = '
33 33
       <general_preferences>
34 34
         <preset name="standard">
35 35
           <run_on_batteries>0</run_on_batteries>
@@ -160,89 +160,89 @@  discard block
 block discarded – undo
160 160
           <dont_verify_images>0</dont_verify_images>
161 161
         </preset>
162 162
       </general_preferences>';
163
-  }
163
+}
164 164
   
165
-  // Convert XML data to array format
166
-  $preset_prefs = load_configuration($saved_state);
165
+// Convert XML data to array format
166
+$preset_prefs = load_configuration($saved_state);
167 167
   
168
-  if ($preset) {
169
-    // Load preset from configuration
170
-    $preset_prefs = (array) $preset_prefs['general_preferences'];
171
-    if (isset($preset_prefs['preset'])) {
172
-      if (!is_numeric(key($preset_prefs['preset']))) {
173
-        $preset_prefs['preset'] = array($preset_prefs['preset']);
174
-      }
175
-      foreach ($preset_prefs['preset'] as $key => $prefs) {
176
-        if (isset($prefs['@attributes']['name']) AND $prefs['@attributes']['name'] == $preset) {
177
-          return $preset_prefs['preset'][$key];
178
-        }
179
-      }
168
+if ($preset) {
169
+// Load preset from configuration
170
+$preset_prefs = (array) $preset_prefs['general_preferences'];
171
+if (isset($preset_prefs['preset'])) {
172
+  if (!is_numeric(key($preset_prefs['preset']))) {
173
+    $preset_prefs['preset'] = array($preset_prefs['preset']);
174
+  }
175
+  foreach ($preset_prefs['preset'] as $key => $prefs) {
176
+    if (isset($prefs['@attributes']['name']) AND $prefs['@attributes']['name'] == $preset) {
177
+      return $preset_prefs['preset'][$key];
180 178
     }
181 179
   }
182
-  return $preset_prefs;
180
+}
181
+}
182
+return $preset_prefs;
183 183
 }
184 184
 
185 185
 /**
186 186
  * Load (and validate) the project specific configuration XML
187 187
  */
188 188
 function boincwork_get_project_specific_config() {
189
-  $raw_config_data = variable_get('boinc_project_specific_prefs_config', '');
189
+$raw_config_data = variable_get('boinc_project_specific_prefs_config', '');
190 190
   
191
-  $xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
192
-  libxml_use_internal_errors(true);
191
+$xsd = './' . drupal_get_path('module', 'boincwork') . '/includes/projectprefs.xsd';
192
+libxml_use_internal_errors(true);
193 193
   
194
-  $xml = new DomDocument();
195
-  $xml->loadXML($raw_config_data, LIBXML_NOBLANKS);
196
-  if (!$xml->schemaValidate($xsd)) {
197
-    $errors = libxml_get_errors();
198
-    $lines = explode("\r", $raw_config_data);
199
-    drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
200
-      ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
201
-    return NULL;
202
-  }
194
+$xml = new DomDocument();
195
+$xml->loadXML($raw_config_data, LIBXML_NOBLANKS);
196
+if (!$xml->schemaValidate($xsd)) {
197
+$errors = libxml_get_errors();
198
+$lines = explode("\r", $raw_config_data);
199
+drupal_set_message("{$errors[0]->message} at line {$errors[0]->line}" .
200
+  ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), 'error');
201
+return NULL;
202
+}
203 203
   
204
-  // Convert XML to array for validation
205
-  $xml = load_configuration($raw_config_data);
206
-  return $xml;
204
+// Convert XML to array for validation
205
+$xml = load_configuration($raw_config_data);
206
+return $xml;
207 207
 }
208 208
 
209 209
 /**
210 210
  * Get rules by which to validate project specific data
211 211
  */
212 212
 function boincwork_get_project_specific_config_validation_rules($xml = array()) {
213
-  $rules = array();
214
-  if (!$xml) {
215
-    // Read the config XML
216
-    $xml = boincwork_get_project_specific_config();
217
-    $xml = $xml['project_specific_preferences'];
218
-  }
219
-  foreach ($xml as $type => $elements) {
220
-    if (is_array($elements) AND !is_numeric(key($elements))) {
221
-      $elements = array($elements);
222
-    }
223
-    switch ($type) {
224
-    case 'compound':
225
-      foreach ($elements as $element) {
226
-        $name = $element['@attributes']['name'];
227
-        $rules[$name] = boincwork_get_project_specific_config_validation_rules($element['attributes']);
228
-      }
229
-      break;
213
+$rules = array();
214
+if (!$xml) {
215
+// Read the config XML
216
+$xml = boincwork_get_project_specific_config();
217
+$xml = $xml['project_specific_preferences'];
218
+}
219
+foreach ($xml as $type => $elements) {
220
+if (is_array($elements) AND !is_numeric(key($elements))) {
221
+  $elements = array($elements);
222
+}
223
+switch ($type) {
224
+case 'compound':
225
+foreach ($elements as $element) {
226
+$name = $element['@attributes']['name'];
227
+$rules[$name] = boincwork_get_project_specific_config_validation_rules($element['attributes']);
228
+}
229
+break;
230 230
       
231
-    case 'text':
232
-      foreach ($elements as $element) {
233
-        $name = $element['@attributes']['name'];
234
-        $rules[$name] = array(
235
-          'datatype' => $element['@attributes']['datatype']
236
-        );
237
-        if (isset($element['@attributes']['min'])) {
238
-          $rules[$name]['min'] = $element['@attributes']['min'];
239
-        }
240
-        if (isset($element['@attributes']['max'])) {
241
-          $rules[$name]['max'] = $element['@attributes']['max'];
242
-        }
243
-      }
244
-      break;
245
-    /*
231
+case 'text':
232
+foreach ($elements as $element) {
233
+$name = $element['@attributes']['name'];
234
+$rules[$name] = array(
235
+'datatype' => $element['@attributes']['datatype']
236
+);
237
+if (isset($element['@attributes']['min'])) {
238
+$rules[$name]['min'] = $element['@attributes']['min'];
239
+}
240
+if (isset($element['@attributes']['max'])) {
241
+$rules[$name]['max'] = $element['@attributes']['max'];
242
+}
243
+}
244
+break;
245
+/*
246 246
     case 'radio':
247 247
     case 'dropdown':
248 248
       foreach ($elements as $element) {
@@ -260,36 +260,36 @@  discard block
 block discarded – undo
260 260
       }
261 261
       break;
262 262
     */
263
-    case 'apps':
264
-      // At least one app needs to be selected
265
-      $rules['apps'] = array(
266
-        'minimum selected' => 1,
267
-        'list' => array()
268
-      );
269
-      foreach ($elements as $element) {
270
-        foreach ($element['app'] as $app) {
271
-          $name = "app_{$app['@attributes']['id']}";
272
-          $rules['apps']['list'][] = $name;
273
-          //$rules[$name] = array(
274
-          //  'options' => $options
275
-          //);
276
-        }
277
-      }
278
-      break;
263
+case 'apps':
264
+// At least one app needs to be selected
265
+$rules['apps'] = array(
266
+'minimum selected' => 1,
267
+'list' => array()
268
+);
269
+foreach ($elements as $element) {
270
+foreach ($element['app'] as $app) {
271
+$name = "app_{$app['@attributes']['id']}";
272
+$rules['apps']['list'][] = $name;
273
+//$rules[$name] = array(
274
+//  'options' => $options
275
+//);
276
+}
277
+}
278
+break;
279 279
       
280
-    case 'group':
281
-      foreach ($elements as $element) {
282
-        $name = $element['@attributes']['name'];
283
-        $rules += boincwork_get_project_specific_config_validation_rules($element);
284
-      }
285
-      break;
286
-    /*
280
+case 'group':
281
+foreach ($elements as $element) {
282
+$name = $element['@attributes']['name'];
283
+$rules += boincwork_get_project_specific_config_validation_rules($element);
284
+}
285
+break;
286
+/*
287 287
     case 'boolean':
288 288
       // Shouldn't need to validate boolean...
289 289
       break;
290 290
       */
291
-    default:
292
-    }
291
+default:
292
+}
293 293
   }
294 294
   return $rules;
295 295
 }
@@ -643,9 +643,9 @@  discard block
 block discarded – undo
643 643
     }
644 644
     break;
645 645
     
646
-    default:
647
-      // Don't generate form elements for things that aren't explicitly form
648
-      // elements (i.e. 'title', '@attributes' keys, and the like)
646
+  default:
647
+    // Don't generate form elements for things that aren't explicitly form
648
+    // elements (i.e. 'title', '@attributes' keys, and the like)
649 649
   }
650 650
 }
651 651
 
@@ -1965,29 +1965,29 @@  discard block
 block discarded – undo
1965 1965
  */
1966 1966
 function pretty_application_version($appverid, $vernum, $plan_class, $plfm) {
1967 1967
   switch ($appverid) {
1968
-    case ANON_PLATFORM_UNKNOWN:
1969
-      return "Anonymous platform";
1970
-    case ANON_PLATFORM_CPU:
1971
-      return "Anonymous platform CPU";
1972
-    case ANON_PLATFORM_NVIDIA:
1973
-      return "Anonymous platform NVIDIA GPU";
1974
-    case ANON_PLATFORM_ATI:
1975
-      return "Anonymous platform ATI GPU";
1976
-    case ANON_PLATFORM_INTEL:
1977
-      return "Anonymous platform Intel GPU";
1978
-    case 0:
1979
-      return "---";
1980
-    default:
1981
-      // Handle the case where the appversid is still negative. This
1982
-      // may be cause BOINC has introduced a new anonymous platform
1983
-      // that is not handled by the above case statements.
1984
-      if ($appverid < 0) {
1985
-        return "Unknown Anonymous platform";
1986
-      }
1987
-      else {
1988
-        $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
1989
-        $prettyc = ($plan_class) ? "($av->plan_class)" : '';
1990
-        return "v$prettyv $prettyc $plfm";
1991
-      }
1968
+  case ANON_PLATFORM_UNKNOWN:
1969
+    return "Anonymous platform";
1970
+  case ANON_PLATFORM_CPU:
1971
+    return "Anonymous platform CPU";
1972
+  case ANON_PLATFORM_NVIDIA:
1973
+    return "Anonymous platform NVIDIA GPU";
1974
+  case ANON_PLATFORM_ATI:
1975
+    return "Anonymous platform ATI GPU";
1976
+  case ANON_PLATFORM_INTEL:
1977
+    return "Anonymous platform Intel GPU";
1978
+  case 0:
1979
+    return "---";
1980
+  default:
1981
+    // Handle the case where the appversid is still negative. This
1982
+    // may be cause BOINC has introduced a new anonymous platform
1983
+    // that is not handled by the above case statements.
1984
+    if ($appverid < 0) {
1985
+      return "Unknown Anonymous platform";
1986
+    }
1987
+    else {
1988
+      $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
1989
+      $prettyc = ($plan_class) ? "($av->plan_class)" : '';
1990
+      return "v$prettyv $prettyc $plfm";
1991
+    }
1992 1992
   }
1993 1993
 }
Please login to merge, or discard this patch.