Passed
Push — dpa_docker_wrapper12 ( e18bd7 )
by David
08:59
created
drupal/sites/default/boinc/modules/boincwork/boincwork.views.inc 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1637,7 +1637,7 @@
 block discarded – undo
1637 1637
   
1638 1638
   return array(
1639 1639
     'info' => array(
1640
-      'path' => drupal_get_path('module', 'boincwork') . '/views',
1640
+      'path' => drupal_get_path('module', 'boincwork').'/views',
1641 1641
     ),
1642 1642
     'handlers' => array(
1643 1643
       'views_handler_argument_boincuser_id' => array(
Please login to merge, or discard this patch.
Indentation   +793 added lines, -793 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(
37
+    $data['host']['table']['join'] = array(
38 38
     'user' => array(
39
-      'left_field' => 'id',
40
-      'field' => 'userid',
39
+        'left_field' => 'id',
40
+        'field' => 'userid',
41 41
     )
42
-  );
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(
51
+    $data['host']['id'] = array(
52 52
     'title' => bts('Computer ID', array(), NULL, 'boinc:host-list'),
53 53
     'help' => t('The ID number of this host.'),
54 54
     'field' => array(
55
-      'handler' => 'views_handler_field_numeric',
56
-      'click sortable' => TRUE
55
+        'handler' => 'views_handler_field_numeric',
56
+        'click sortable' => TRUE
57 57
     ),
58 58
     'argument' => array(
59
-      'handler' => 'views_handler_argument',
60
-      'name field' => 'title',
61
-      'numeric' => TRUE,
62
-      'validate type' => 'id'
59
+        'handler' => 'views_handler_argument',
60
+        'name field' => 'title',
61
+        'numeric' => TRUE,
62
+        'validate type' => 'id'
63 63
     ),
64 64
     'filter' => array(
65
-      'handler' => 'views_handler_filter_numeric'
65
+        'handler' => 'views_handler_filter_numeric'
66 66
     ),
67 67
     'sort' => array(
68
-      'handler' => 'views_handler_sort_numeric'
68
+        'handler' => 'views_handler_sort_numeric'
69 69
     )
70
-  );
71
-  $data['host']['venue'] = array(
70
+    );
71
+    $data['host']['venue'] = array(
72 72
     'title' => bts('Location', array(), NULL, 'boinc:host-list'),
73 73
     'help' => t('The name of the preference set assigned to this host.'),
74 74
     'field' => array(
75
-      'handler' => 'views_handler_field',
76
-      'click sortable' => TRUE
75
+        'handler' => 'views_handler_field',
76
+        'click sortable' => TRUE
77 77
     ),
78 78
     'argument' => array(
79
-      'handler' => 'views_handler_argument',
80
-      'name field' => 'title'
79
+        'handler' => 'views_handler_argument',
80
+        'name field' => 'title'
81 81
     ),
82 82
     'filter' => array(
83
-      'handler' => 'views_handler_filter_string'
83
+        'handler' => 'views_handler_filter_string'
84 84
     ),
85 85
     'sort' => array(
86
-      'handler' => 'views_handler_sort_string'
86
+        'handler' => 'views_handler_sort_string'
87 87
     )
88
-  );
88
+    );
89 89
 
90
-  // Foreign key fields
90
+    // Foreign key fields
91 91
 
92
-  $data['host']['userid'] = array(
92
+    $data['host']['userid'] = array(
93 93
     'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
94 94
     'help' => t('The owner of this host.'),
95 95
     // Because this is a foreign key to the {user} table. This allows us to
96 96
     // have, when the view is configured with this relationship, all the fields
97 97
     // for the related node available.
98 98
     'argument' => array(
99
-      'handler' => 'views_handler_argument_boincuser_id',
100
-      'name field' => 'title',
101
-      'numeric' => TRUE,
102
-      'validate type' => 'id'
99
+        'handler' => 'views_handler_argument_boincuser_id',
100
+        'name field' => 'title',
101
+        'numeric' => TRUE,
102
+        'validate type' => 'id'
103 103
     ),
104 104
     'relationship' => array(
105
-      'base' => 'user',
106
-      'field' => 'userid',
107
-      'handler' => 'views_handler_relationship',
108
-      'label' => t('User')
105
+        'base' => 'user',
106
+        'field' => 'userid',
107
+        'handler' => 'views_handler_relationship',
108
+        'label' => t('User')
109 109
     ),
110 110
     'field' => array(
111
-      'handler' => 'views_handler_field_numeric',
112
-      'click sortable' => TRUE
111
+        'handler' => 'views_handler_field_numeric',
112
+        'click sortable' => TRUE
113 113
     ),
114 114
     'filter' => array(
115
-      'handler' => 'views_handler_filter_numeric'
115
+        'handler' => 'views_handler_filter_numeric'
116 116
     ),
117 117
     'sort' => array(
118
-      'handler' => 'views_handler_sort_numeric'
118
+        'handler' => 'views_handler_sort_numeric'
119 119
     )
120
-  );
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(
124
+    $data['host']['active_frac'] = array(
125 125
     'title' => bts('While BOINC running, % of time work is allowed', array(), NULL, 'boinc:host-details'),
126 126
     'help' => t('The percentage of time that work is allowed.'),
127 127
     'field' => array(
128
-      'handler' => 'views_handler_field_numeric',
129
-      'click sortable' => TRUE,
130
-      'float' => TRUE
128
+        'handler' => 'views_handler_field_numeric',
129
+        'click sortable' => TRUE,
130
+        'float' => TRUE
131 131
     ),
132 132
     'filter' => array(
133
-      'handler' => 'views_handler_filter_numeric'
133
+        'handler' => 'views_handler_filter_numeric'
134 134
     ),
135 135
     'sort' => array(
136
-      'handler' => 'views_handler_sort_numeric'
136
+        'handler' => 'views_handler_sort_numeric'
137 137
     )
138
-  );
139
-  $data['host']['avg_turnaround'] = array(
138
+    );
139
+    $data['host']['avg_turnaround'] = array(
140 140
     'title' => bts('Average turnaround time', array(), NULL, 'boinc:host-details'),
141 141
     'help' => t('The average time required for work to be completed.'),
142 142
     'field' => array(
143
-      'handler' => 'views_handler_field_numeric',
144
-      'click sortable' => TRUE,
145
-      'float' => TRUE
143
+        'handler' => 'views_handler_field_numeric',
144
+        'click sortable' => TRUE,
145
+        'float' => TRUE
146 146
     ),
147 147
     'filter' => array(
148
-      'handler' => 'views_handler_filter_numeric'
148
+        'handler' => 'views_handler_filter_numeric'
149 149
     ),
150 150
     'sort' => array(
151
-      'handler' => 'views_handler_sort_numeric'
151
+        'handler' => 'views_handler_sort_numeric'
152 152
     )
153
-  );
154
-  $data['host']['create_time'] = array(
153
+    );
154
+    $data['host']['create_time'] = array(
155 155
     'title' => bts('Created', array(), NULL, 'boinc:host-details'),
156 156
     'help' => t('The time the host record was created.'),
157 157
     'field' => array(
158
-      'handler' => 'views_handler_field_date',
159
-      'click sortable' => TRUE
158
+        'handler' => 'views_handler_field_date',
159
+        'click sortable' => TRUE
160 160
     ),
161 161
     'filter' => array(
162
-      'handler' => 'views_handler_filter_date'
162
+        'handler' => 'views_handler_filter_date'
163 163
     ),
164 164
     'sort' => array(
165
-      'handler' => 'views_handler_sort_date'
165
+        'handler' => 'views_handler_sort_date'
166 166
     )
167
-  );
168
-  $data['host']['connected_frac'] = array(
167
+    );
168
+    $data['host']['connected_frac'] = array(
169 169
     'title' => bts('While BOINC running, % of time host has an Internet connection', array(), NULL, 'boinc:host-details'),
170 170
     'help' => t('The percentage of time that the host has an Internet connection.'),
171 171
     'field' => array(
172
-      'handler' => 'views_handler_field_numeric',
173
-      'click sortable' => TRUE,
174
-      'float' => TRUE
172
+        'handler' => 'views_handler_field_numeric',
173
+        'click sortable' => TRUE,
174
+        'float' => TRUE
175 175
     ),
176 176
     'filter' => array(
177
-      'handler' => 'views_handler_filter_numeric'
177
+        'handler' => 'views_handler_filter_numeric'
178 178
     ),
179 179
     'sort' => array(
180
-      'handler' => 'views_handler_sort_numeric'
180
+        'handler' => 'views_handler_sort_numeric'
181 181
     )
182
-  );
183
-  $data['host']['cpu_efficiency'] = array(
182
+    );
183
+    $data['host']['cpu_efficiency'] = array(
184 184
     'title' => bts('Average CPU efficiency', array(), NULL, 'boinc:host-details'),
185 185
     'help' => t('The average efficiency of the host CPU.'),
186 186
     'field' => array(
187
-      'handler' => 'views_handler_field_numeric',
188
-      'click sortable' => TRUE,
189
-      'float' => TRUE
187
+        'handler' => 'views_handler_field_numeric',
188
+        'click sortable' => TRUE,
189
+        'float' => TRUE
190 190
     ),
191 191
     'filter' => array(
192
-      'handler' => 'views_handler_filter_numeric'
192
+        'handler' => 'views_handler_filter_numeric'
193 193
     ),
194 194
     'sort' => array(
195
-      'handler' => 'views_handler_sort_numeric'
195
+        'handler' => 'views_handler_sort_numeric'
196 196
     )
197
-  );
198
-  $data['host']['d_free'] = array(
197
+    );
198
+    $data['host']['d_free'] = array(
199 199
     'title' => bts('Free disk space', array(), NULL, 'boinc:host-details'),
200 200
     'help' => t('The amount of disk space that is not in use.'),
201 201
     'field' => array(
202
-      'handler' => 'views_handler_field_numeric',
203
-      'click sortable' => TRUE
202
+        'handler' => 'views_handler_field_numeric',
203
+        'click sortable' => TRUE
204 204
     ),
205 205
     'filter' => array(
206
-      'handler' => 'views_handler_filter_numeric'
206
+        'handler' => 'views_handler_filter_numeric'
207 207
     ),
208 208
     'sort' => array(
209
-      'handler' => 'views_handler_sort_numeric'
209
+        'handler' => 'views_handler_sort_numeric'
210 210
     )
211
-  );
212
-  $data['host']['d_total'] = array(
211
+    );
212
+    $data['host']['d_total'] = array(
213 213
     'title' => bts('Total disk space', array(), NULL, 'boinc:host-details'),
214 214
     'help' => t('The size of the disk on which BOINC is installed.'),
215 215
     'field' => array(
216
-      'handler' => 'views_handler_field_numeric',
217
-      'click sortable' => TRUE
216
+        'handler' => 'views_handler_field_numeric',
217
+        'click sortable' => TRUE
218 218
     ),
219 219
     'filter' => array(
220
-      'handler' => 'views_handler_filter_numeric'
220
+        'handler' => 'views_handler_filter_numeric'
221 221
     ),
222 222
     'sort' => array(
223
-      'handler' => 'views_handler_sort_numeric'
223
+        'handler' => 'views_handler_sort_numeric'
224 224
     )
225
-  );
226
-  $data['host']['domain_name'] = array(
225
+    );
226
+    $data['host']['domain_name'] = array(
227 227
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
228 228
     'help' => t('The name of the host.'),
229 229
     'field' => array(
230
-      'handler' => 'views_handler_field',
231
-      'click sortable' => TRUE
230
+        'handler' => 'views_handler_field',
231
+        'click sortable' => TRUE
232 232
     ),
233 233
     'filter' => array(
234
-      'handler' => 'views_handler_filter_string'
234
+        'handler' => 'views_handler_filter_string'
235 235
     ),
236 236
     'sort' => array(
237
-      'handler' => 'views_handler_sort_string'
237
+        'handler' => 'views_handler_sort_string'
238 238
     )
239
-  );
240
-  $data['host']['duration_correction_factor'] = array(
239
+    );
240
+    $data['host']['duration_correction_factor'] = array(
241 241
     'title' => bts('Task duration correction factor', array(), NULL, 'boinc:host-details'),
242 242
     'help' => t('Task duration correction factor.'),
243 243
     'field' => array(
244
-      'handler' => 'views_handler_field_numeric',
245
-      'click sortable' => TRUE,
246
-      'float' => TRUE
244
+        'handler' => 'views_handler_field_numeric',
245
+        'click sortable' => TRUE,
246
+        'float' => TRUE
247 247
     ),
248 248
     'filter' => array(
249
-      'handler' => 'views_handler_filter_numeric'
249
+        'handler' => 'views_handler_filter_numeric'
250 250
     ),
251 251
     'sort' => array(
252
-      'handler' => 'views_handler_sort_numeric'
252
+        'handler' => 'views_handler_sort_numeric'
253 253
     )
254
-  );
255
-  $data['host']['expavg_credit'] = array(
254
+    );
255
+    $data['host']['expavg_credit'] = array(
256 256
     'title' => bts('Avg. credit', array(), NULL, 'boinc:host-details'),
257 257
     'help' => t('A decaying average of credit per day.'),
258 258
     'field' => array(
259
-      'handler' => 'views_handler_field_numeric',
260
-      'click sortable' => TRUE,
261
-      'float' => TRUE
259
+        'handler' => 'views_handler_field_numeric',
260
+        'click sortable' => TRUE,
261
+        'float' => TRUE
262 262
     ),
263 263
     'filter' => array(
264
-      'handler' => 'views_handler_filter_numeric'
264
+        'handler' => 'views_handler_filter_numeric'
265 265
     ),
266 266
     'sort' => array(
267
-      'handler' => 'views_handler_sort_numeric'
267
+        'handler' => 'views_handler_sort_numeric'
268 268
     )
269
-  );
270
-  $data['host']['external_ip_addr'] = array(
269
+    );
270
+    $data['host']['external_ip_addr'] = array(
271 271
     'title' => bts('External IP address', array(), NULL, 'boinc:host-details'),
272 272
     'help' => t('The IP address from which the host last communicated.'),
273 273
     'field' => array(
274
-      'handler' => 'views_handler_field',
275
-      'click sortable' => TRUE
274
+        'handler' => 'views_handler_field',
275
+        'click sortable' => TRUE
276 276
     ),
277 277
     'filter' => array(
278
-      'handler' => 'views_handler_filter_string'
278
+        'handler' => 'views_handler_filter_string'
279 279
     ),
280 280
     'sort' => array(
281
-      'handler' => 'views_handler_sort_string'
281
+        'handler' => 'views_handler_sort_string'
282 282
     )
283
-  );
284
-  $data['host']['host_cpid'] = array(
283
+    );
284
+    $data['host']['host_cpid'] = array(
285 285
     'title' => bts('Cross project ID', array(), NULL, 'boinc:host-details'),
286 286
     'help' => t('The consistent identifier of the host across projects.'),
287 287
     'field' => array(
288
-      'handler' => 'views_handler_field',
289
-      'click sortable' => TRUE
288
+        'handler' => 'views_handler_field',
289
+        'click sortable' => TRUE
290 290
     ),
291 291
     'filter' => array(
292
-      'handler' => 'views_handler_filter_string'
292
+        'handler' => 'views_handler_filter_string'
293 293
     ),
294 294
     'sort' => array(
295
-      'handler' => 'views_handler_sort_string'
295
+        'handler' => 'views_handler_sort_string'
296 296
     )
297
-  );
298
-  $data['host']['last_ip_addr'] = array(
297
+    );
298
+    $data['host']['last_ip_addr'] = array(
299 299
     'title' => bts('Last IP address', array(), NULL, 'boinc:host-details'),
300 300
     'help' => t('The IP address of the host at last communication.'),
301 301
     'field' => array(
302
-      'handler' => 'views_handler_field',
303
-      'click sortable' => TRUE
302
+        'handler' => 'views_handler_field',
303
+        'click sortable' => TRUE
304 304
     ),
305 305
     'filter' => array(
306
-      'handler' => 'views_handler_filter_string'
306
+        'handler' => 'views_handler_filter_string'
307 307
     ),
308 308
     'sort' => array(
309
-      'handler' => 'views_handler_sort_string'
309
+        'handler' => 'views_handler_sort_string'
310 310
     )
311
-  );
312
-  $data['host']['m_cache'] = array(
311
+    );
312
+    $data['host']['m_cache'] = array(
313 313
     'title' => bts('Cache', array(), NULL, 'boinc:host-details'),
314 314
     'help' => t('The amount of cache on the processor(s).'),
315 315
     'field' => array(
316
-      'handler' => 'views_handler_field_numeric',
317
-      'click sortable' => TRUE
316
+        'handler' => 'views_handler_field_numeric',
317
+        'click sortable' => TRUE
318 318
     ),
319 319
     'filter' => array(
320
-      'handler' => 'views_handler_filter_numeric'
320
+        'handler' => 'views_handler_filter_numeric'
321 321
     ),
322 322
     'sort' => array(
323
-      'handler' => 'views_handler_sort_numeric'
323
+        'handler' => 'views_handler_sort_numeric'
324 324
     )
325
-  );
326
-  $data['host']['m_nbytes'] = array(
325
+    );
326
+    $data['host']['m_nbytes'] = array(
327 327
     'title' => bts('Memory', array(), NULL, 'boinc:host-details'),
328 328
     'help' => t('The amount of memory installed.'),
329 329
     'field' => array(
330
-      'handler' => 'views_handler_field_numeric',
331
-      'click sortable' => TRUE
330
+        'handler' => 'views_handler_field_numeric',
331
+        'click sortable' => TRUE
332 332
     ),
333 333
     'filter' => array(
334
-      'handler' => 'views_handler_filter_numeric'
334
+        'handler' => 'views_handler_filter_numeric'
335 335
     ),
336 336
     'sort' => array(
337
-      'handler' => 'views_handler_sort_numeric'
337
+        'handler' => 'views_handler_sort_numeric'
338 338
     )
339
-  );
340
-  $data['host']['m_swap'] = array(
339
+    );
340
+    $data['host']['m_swap'] = array(
341 341
     'title' => bts('Swap space', array(), NULL, 'boinc:host-details'),
342 342
     'help' => t('The amount of swap space configured.'),
343 343
     'field' => array(
344
-      'handler' => 'views_handler_field_numeric',
345
-      'click sortable' => TRUE
344
+        'handler' => 'views_handler_field_numeric',
345
+        'click sortable' => TRUE
346 346
     ),
347 347
     'filter' => array(
348
-      'handler' => 'views_handler_filter_numeric'
348
+        'handler' => 'views_handler_filter_numeric'
349 349
     ),
350 350
     'sort' => array(
351
-      'handler' => 'views_handler_sort_numeric'
351
+        'handler' => 'views_handler_sort_numeric'
352 352
     )
353
-  );
354
-  $data['host']['max_results_day'] = array(
353
+    );
354
+    $data['host']['max_results_day'] = array(
355 355
     'title' => bts('Maximum daily WU quota per CPU', array(), NULL, 'boinc:host-details'),
356 356
     'help' => t('The maximum number of workunits to be allocated per CPU.'),
357 357
     'field' => array(
358
-      'handler' => 'views_handler_field_numeric',
359
-      'click sortable' => TRUE
358
+        'handler' => 'views_handler_field_numeric',
359
+        'click sortable' => TRUE
360 360
     ),
361 361
     'filter' => array(
362
-      'handler' => 'views_handler_filter_numeric'
362
+        'handler' => 'views_handler_filter_numeric'
363 363
     ),
364 364
     'sort' => array(
365
-      'handler' => 'views_handler_sort_numeric'
365
+        'handler' => 'views_handler_sort_numeric'
366 366
     )
367
-  );
368
-  $data['host']['n_bwdown'] = array(
367
+    );
368
+    $data['host']['n_bwdown'] = array(
369 369
     'title' => bts('Average download rate', array(), NULL, 'boinc:host-details'),
370 370
     'help' => t('The average rate at which new work is downloaded.'),
371 371
     'field' => array(
372
-      'handler' => 'views_handler_field_numeric',
373
-      'click sortable' => TRUE,
374
-      'float' => TRUE
372
+        'handler' => 'views_handler_field_numeric',
373
+        'click sortable' => TRUE,
374
+        'float' => TRUE
375 375
     ),
376 376
     'filter' => array(
377
-      'handler' => 'views_handler_filter_numeric'
377
+        'handler' => 'views_handler_filter_numeric'
378 378
     ),
379 379
     'sort' => array(
380
-      'handler' => 'views_handler_sort_numeric'
380
+        'handler' => 'views_handler_sort_numeric'
381 381
     )
382
-  );
383
-  $data['host']['n_bwup'] = array(
382
+    );
383
+    $data['host']['n_bwup'] = array(
384 384
     'title' => bts('Average upload rate', array(), NULL, 'boinc:host-details'),
385 385
     'help' => t('The average rate at which completed work is uploaded.'),
386 386
     'field' => array(
387
-      'handler' => 'views_handler_field_numeric',
388
-      'click sortable' => TRUE,
389
-      'float' => TRUE
387
+        'handler' => 'views_handler_field_numeric',
388
+        'click sortable' => TRUE,
389
+        'float' => TRUE
390 390
     ),
391 391
     'filter' => array(
392
-      'handler' => 'views_handler_filter_numeric'
392
+        'handler' => 'views_handler_filter_numeric'
393 393
     ),
394 394
     'sort' => array(
395
-      'handler' => 'views_handler_sort_numeric'
395
+        'handler' => 'views_handler_sort_numeric'
396 396
     )
397
-  );
398
-  $data['host']['nsame_ip_addr'] = array(
397
+    );
398
+    $data['host']['nsame_ip_addr'] = array(
399 399
     'title' => bts('Same IP address count', array(), NULL, 'boinc:host-details'),
400 400
     'help' => t('The number of times the last IP address.'),
401 401
     'field' => array(
402
-      'handler' => 'views_handler_field',
403
-      'click sortable' => TRUE
402
+        'handler' => 'views_handler_field',
403
+        'click sortable' => TRUE
404 404
     ),
405 405
     'filter' => array(
406
-      'handler' => 'views_handler_filter_string'
406
+        'handler' => 'views_handler_filter_string'
407 407
     ),
408 408
     'sort' => array(
409
-      'handler' => 'views_handler_sort_string'
409
+        'handler' => 'views_handler_sort_string'
410 410
     )
411
-  );
412
-  $data['host']['on_frac'] = array(
411
+    );
412
+    $data['host']['on_frac'] = array(
413 413
     'title' => bts('% of time BOINC client is running', array(), NULL, 'boinc:host-details'),
414 414
     'help' => t('The percentage of time that the BOINC client is running.'),
415 415
     'field' => array(
416
-      'handler' => 'views_handler_field_numeric',
417
-      'click sortable' => TRUE,
418
-      'float' => TRUE
416
+        'handler' => 'views_handler_field_numeric',
417
+        'click sortable' => TRUE,
418
+        'float' => TRUE
419 419
     ),
420 420
     'filter' => array(
421
-      'handler' => 'views_handler_filter_numeric'
421
+        'handler' => 'views_handler_filter_numeric'
422 422
     ),
423 423
     'sort' => array(
424
-      'handler' => 'views_handler_sort_numeric'
424
+        'handler' => 'views_handler_sort_numeric'
425 425
     )
426
-  );
427
-  $data['host']['os_name'] = array(
426
+    );
427
+    $data['host']['os_name'] = array(
428 428
     'title' => bts('Operating system', array(), NULL, 'boinc:host-details'),
429 429
     'help' => t('The name of the host operating system.'),
430 430
     'field' => array(
431
-      'handler' => 'views_handler_field',
432
-      'click sortable' => TRUE
431
+        'handler' => 'views_handler_field',
432
+        'click sortable' => TRUE
433 433
     ),
434 434
     'filter' => array(
435
-      'handler' => 'views_handler_filter_string'
435
+        'handler' => 'views_handler_filter_string'
436 436
     ),
437 437
     'sort' => array(
438
-      'handler' => 'views_handler_sort_string'
438
+        'handler' => 'views_handler_sort_string'
439 439
     )
440
-  );
441
-  $data['host']['os_version'] = array(
440
+    );
441
+    $data['host']['os_version'] = array(
442 442
     'title' => bts('Operating system version', array(), NULL, 'boinc:host-details'),
443 443
     'help' => t('The version of the host operating system.'),
444 444
     'field' => array(
445
-      'handler' => 'views_handler_field',
446
-      'click sortable' => TRUE
445
+        'handler' => 'views_handler_field',
446
+        'click sortable' => TRUE
447 447
     ),
448 448
     'filter' => array(
449
-      'handler' => 'views_handler_filter_string'
449
+        'handler' => 'views_handler_filter_string'
450 450
     ),
451 451
     'sort' => array(
452
-      'handler' => 'views_handler_sort_string'
452
+        'handler' => 'views_handler_sort_string'
453 453
     )
454
-  );
455
-  $data['host']['p_fpops'] = array(
454
+    );
455
+    $data['host']['p_fpops'] = array(
456 456
     'title' => bts('Measured floating point speed', array(), NULL, 'boinc:host-details'),
457 457
     'help' => t('The capability of the host in floating point operations per second.'),
458 458
     'field' => array(
459
-      'handler' => 'views_handler_field_numeric',
460
-      'click sortable' => TRUE,
461
-      'float' => TRUE
459
+        'handler' => 'views_handler_field_numeric',
460
+        'click sortable' => TRUE,
461
+        'float' => TRUE
462 462
     ),
463 463
     'filter' => array(
464
-      'handler' => 'views_handler_filter_numeric'
464
+        'handler' => 'views_handler_filter_numeric'
465 465
     ),
466 466
     'sort' => array(
467
-      'handler' => 'views_handler_sort_numeric'
467
+        'handler' => 'views_handler_sort_numeric'
468 468
     )
469
-  );
470
-  $data['host']['p_iops'] = array(
469
+    );
470
+    $data['host']['p_iops'] = array(
471 471
     'title' => bts('Measured integer speed', array(), NULL, 'boinc:host-details'),
472 472
     'help' => t('The capability of the host in integer operations per second.'),
473 473
     'field' => array(
474
-      'handler' => 'views_handler_field_numeric',
475
-      'click sortable' => TRUE,
476
-      'float' => TRUE
474
+        'handler' => 'views_handler_field_numeric',
475
+        'click sortable' => TRUE,
476
+        'float' => TRUE
477 477
     ),
478 478
     'filter' => array(
479
-      'handler' => 'views_handler_filter_numeric'
479
+        'handler' => 'views_handler_filter_numeric'
480 480
     ),
481 481
     'sort' => array(
482
-      'handler' => 'views_handler_sort_numeric'
482
+        'handler' => 'views_handler_sort_numeric'
483 483
     )
484
-  );
485
-  $data['host']['p_model'] = array(
484
+    );
485
+    $data['host']['p_model'] = array(
486 486
     'title' => bts('CPU model', array(), NULL, 'boinc:host-details'),
487 487
     'help' => t('The model of the CPU in the host.'),
488 488
     'field' => array(
489
-      'handler' => 'views_handler_field',
490
-      'click sortable' => TRUE
489
+        'handler' => 'views_handler_field',
490
+        'click sortable' => TRUE
491 491
     ),
492 492
     'filter' => array(
493
-      'handler' => 'views_handler_filter_string'
493
+        'handler' => 'views_handler_filter_string'
494 494
     ),
495 495
     'sort' => array(
496
-      'handler' => 'views_handler_sort_string'
496
+        'handler' => 'views_handler_sort_string'
497 497
     )
498
-  );
499
-  $data['host']['p_ncpus'] = array(
498
+    );
499
+    $data['host']['p_ncpus'] = array(
500 500
     'title' => bts('Number of processors', array(), NULL, 'boinc:host-details'),
501 501
     'help' => t('The count of CPU cores in the system.'),
502 502
     'field' => array(
503
-      'handler' => 'views_handler_field',
504
-      'click sortable' => TRUE
503
+        'handler' => 'views_handler_field',
504
+        'click sortable' => TRUE
505 505
     ),
506 506
     'filter' => array(
507
-      'handler' => 'views_handler_filter_string'
507
+        'handler' => 'views_handler_filter_string'
508 508
     ),
509 509
     'sort' => array(
510
-      'handler' => 'views_handler_sort_string'
510
+        'handler' => 'views_handler_sort_string'
511 511
     )
512
-  );
513
-  $data['host']['p_vendor'] = array(
512
+    );
513
+    $data['host']['p_vendor'] = array(
514 514
     'title' => bts('CPU', array(), NULL, 'boinc:host-details'),
515 515
     'help' => t('The manufacturer of the CPU in the host.'),
516 516
     'field' => array(
517
-      'handler' => 'views_handler_field',
518
-      'click sortable' => TRUE
517
+        'handler' => 'views_handler_field',
518
+        'click sortable' => TRUE
519 519
     ),
520 520
     'filter' => array(
521
-      'handler' => 'views_handler_filter_string'
521
+        'handler' => 'views_handler_filter_string'
522 522
     ),
523 523
     'sort' => array(
524
-      'handler' => 'views_handler_sort_string'
524
+        'handler' => 'views_handler_sort_string'
525 525
     )
526
-  );
527
-  $data['host']['rpc_seqno'] = array(
526
+    );
527
+    $data['host']['rpc_seqno'] = array(
528 528
     'title' => bts('Number of times client has contacted server', array(), NULL, 'boinc:host-details'),
529 529
     'help' => t('The number of times the client has contacted the server.'),
530 530
     'field' => array(
531
-      'handler' => 'views_handler_field_numeric',
532
-      'click sortable' => TRUE
531
+        'handler' => 'views_handler_field_numeric',
532
+        'click sortable' => TRUE
533 533
     ),
534 534
     'filter' => array(
535
-      'handler' => 'views_handler_filter_numeric'
535
+        'handler' => 'views_handler_filter_numeric'
536 536
     ),
537 537
     'sort' => array(
538
-      'handler' => 'views_handler_sort_numeric'
538
+        'handler' => 'views_handler_sort_numeric'
539 539
     )
540
-  );
541
-  $data['host']['rpc_time'] = array(
540
+    );
541
+    $data['host']['rpc_time'] = array(
542 542
     'title' => bts('Last contact', array(), NULL, 'boinc:host-details'),
543 543
     'help' => t('The time of the last RPC contact with the host.'),
544 544
     'field' => array(
545
-      'handler' => 'views_handler_field_date',
546
-      'click sortable' => TRUE
545
+        'handler' => 'views_handler_field_date',
546
+        'click sortable' => TRUE
547 547
     ),
548 548
     'filter' => array(
549
-      'handler' => 'views_handler_filter_date'
549
+        'handler' => 'views_handler_filter_date'
550 550
     ),
551 551
     'sort' => array(
552
-      'handler' => 'views_handler_sort_date'
552
+        'handler' => 'views_handler_sort_date'
553 553
     )
554
-  );
555
-  $data['host']['serialnum'] = array(
554
+    );
555
+    $data['host']['serialnum'] = array(
556 556
     'title' => bts('Serial number', array(), NULL, 'boinc:host-details'),
557 557
     'help' => t('Contains the release number of the BOINC application in use and the GPU of the host.'),
558 558
     'field' => array(
559
-      'handler' => 'views_handler_field',
560
-      'click sortable' => TRUE
559
+        'handler' => 'views_handler_field',
560
+        'click sortable' => TRUE
561 561
     ),
562 562
     'filter' => array(
563
-      'handler' => 'views_handler_filter_string'
563
+        'handler' => 'views_handler_filter_string'
564 564
     ),
565 565
     'sort' => array(
566
-      'handler' => 'views_handler_sort_string'
566
+        'handler' => 'views_handler_sort_string'
567 567
     )
568
-  );
569
-  $data['host']['timezone'] = array(
568
+    );
569
+    $data['host']['timezone'] = array(
570 570
     'title' => bts('Timezone', array(), NULL, 'boinc:host-details'),
571 571
     'help' => t('The UTC offset of the local time.'),
572 572
     'field' => array(
573
-      'handler' => 'views_handler_field_numeric',
574
-      'click sortable' => TRUE
573
+        'handler' => 'views_handler_field_numeric',
574
+        'click sortable' => TRUE
575 575
     ),
576 576
     'filter' => array(
577
-      'handler' => 'views_handler_filter_numeric'
577
+        'handler' => 'views_handler_filter_numeric'
578 578
     ),
579 579
     'sort' => array(
580
-      'handler' => 'views_handler_sort_numeric'
580
+        'handler' => 'views_handler_sort_numeric'
581 581
     )
582
-  );
583
-  $data['host']['total_credit'] = array(
582
+    );
583
+    $data['host']['total_credit'] = array(
584 584
     'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
585 585
     'help' => t('The total accumulated BOINC credit for a host.'),
586 586
     'field' => array(
587
-      'handler' => 'views_handler_field_numeric',
588
-      'click sortable' => TRUE,
589
-      'float' => TRUE
587
+        'handler' => 'views_handler_field_numeric',
588
+        'click sortable' => TRUE,
589
+        'float' => TRUE
590 590
     ),
591 591
     'filter' => array(
592
-      'handler' => 'views_handler_filter_numeric'
592
+        'handler' => 'views_handler_filter_numeric'
593 593
     ),
594 594
     'sort' => array(
595
-      'handler' => 'views_handler_sort_numeric'
595
+        'handler' => 'views_handler_sort_numeric'
596 596
     )
597
-  );
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(
613
+    $data['platform']['id'] = array(
614 614
     'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
615 615
     'help' => t('The ID number of the platform.'),
616 616
     'field' => array(
617
-      'handler' => 'views_handler_field_numeric',
618
-      'click sortable' => TRUE
617
+        'handler' => 'views_handler_field_numeric',
618
+        'click sortable' => TRUE
619 619
     ),
620 620
     'argument' => array(
621
-      'handler' => 'views_handler_argument',
622
-      'name field' => 'title',
623
-      'numeric' => TRUE,
624
-      'validate type' => 'id'
621
+        'handler' => 'views_handler_argument',
622
+        'name field' => 'title',
623
+        'numeric' => TRUE,
624
+        'validate type' => 'id'
625 625
     ),
626 626
     'filter' => array(
627
-      'handler' => 'views_handler_filter_numeric'
627
+        'handler' => 'views_handler_filter_numeric'
628 628
     ),
629 629
     'sort' => array(
630
-      'handler' => 'views_handler_sort_numeric'
630
+        'handler' => 'views_handler_sort_numeric'
631 631
     )
632
-  );
632
+    );
633 633
 
634
-  // Descriptions of app fields (alphabetized)
634
+    // Descriptions of app fields (alphabetized)
635 635
 
636
-  $data['platform']['name'] = array(
636
+    $data['platform']['name'] = array(
637 637
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
638 638
     'help' => t('The name of the platform.'),
639 639
     'field' => array(
640
-      'handler' => 'views_handler_field',
641
-      'click sortable' => TRUE
640
+        'handler' => 'views_handler_field',
641
+        'click sortable' => TRUE
642 642
     ),
643 643
     'filter' => array(
644
-      'handler' => 'views_handler_filter_string'
644
+        'handler' => 'views_handler_filter_string'
645 645
     ),
646 646
     'sort' => array(
647
-      'handler' => 'views_handler_sort_string'
647
+        'handler' => 'views_handler_sort_string'
648 648
     )
649
-  );
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(
665
+    $data['result']['table']['join'] = array(
666 666
     'user' => array(
667
-      'left_field' => 'id',
668
-      'field' => 'userid'
667
+        'left_field' => 'id',
668
+        'field' => 'userid'
669 669
     ),
670 670
     'workunit' => array(
671
-      'left_field' => 'id',
672
-      'field' => 'workunitid'
671
+        'left_field' => 'id',
672
+        'field' => 'workunitid'
673 673
     ),
674 674
     'host' => array(
675
-      'left_field' => 'id',
676
-      'field' => 'hostid'
675
+        'left_field' => 'id',
676
+        'field' => 'hostid'
677 677
     )
678
-  );
678
+    );
679 679
 
680
-  // Primary keys allowed as arguments
680
+    // Primary keys allowed as arguments
681 681
 
682
-  $data['result']['id'] = array(
682
+    $data['result']['id'] = array(
683 683
     'title' => bts('Task ID', array(), NULL, 'boinc:task-details'),
684 684
     'help' => t('The ID number of this result.'),
685 685
     'field' => array(
686
-      'handler' => 'views_handler_field_numeric',
687
-      'click sortable' => TRUE
686
+        'handler' => 'views_handler_field_numeric',
687
+        'click sortable' => TRUE
688 688
     ),
689 689
     'argument' => array(
690
-      'handler' => 'views_handler_argument',
691
-      'name field' => 'title',
692
-      'numeric' => TRUE,
693
-      'validate type' => 'id'
690
+        'handler' => 'views_handler_argument',
691
+        'name field' => 'title',
692
+        'numeric' => TRUE,
693
+        'validate type' => 'id'
694 694
     ),
695 695
     'filter' => array(
696
-      'handler' => 'views_handler_filter_numeric'
696
+        'handler' => 'views_handler_filter_numeric'
697 697
     ),
698 698
     'sort' => array(
699
-      'handler' => 'views_handler_sort_numeric'
699
+        'handler' => 'views_handler_sort_numeric'
700 700
     )
701
-  );
701
+    );
702 702
 
703
-  // Foreign key fields
703
+    // Foreign key fields
704 704
 
705
-  $data['result']['userid'] = array(
705
+    $data['result']['userid'] = array(
706 706
     'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
707 707
     'help' => t('The owner of this result.'),
708 708
     // Foreign key to the {user} table
709 709
     'argument' => array(
710
-      'handler' => 'views_handler_argument_boincuser_id',
711
-      'name field' => 'title',
712
-      'numeric' => TRUE,
713
-      'validate type' => 'id'
710
+        'handler' => 'views_handler_argument_boincuser_id',
711
+        'name field' => 'title',
712
+        'numeric' => TRUE,
713
+        'validate type' => 'id'
714 714
     ),
715 715
     'relationship' => array(
716
-      'base' => 'user',
717
-      'field' => 'userid',
718
-      'handler' => 'views_handler_relationship',
719
-      'label' => t('User')
716
+        'base' => 'user',
717
+        'field' => 'userid',
718
+        'handler' => 'views_handler_relationship',
719
+        'label' => t('User')
720 720
     )
721
-  );
722
-  $data['result']['workunitid'] = array(
721
+    );
722
+    $data['result']['workunitid'] = array(
723 723
     'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
724 724
     'help' => t('The workunit associated with this result.'),
725 725
     // Foreign key to the {workunit} table
726 726
     'argument' => array(
727
-      'handler' => 'views_handler_argument',
728
-      'name field' => 'title',
729
-      'numeric' => TRUE,
730
-      'validate type' => 'id'
727
+        'handler' => 'views_handler_argument',
728
+        'name field' => 'title',
729
+        'numeric' => TRUE,
730
+        'validate type' => 'id'
731 731
     ),
732 732
     'relationship' => array(
733
-      'base' => 'workunit',
734
-      'field' => 'workunitid',
735
-      'handler' => 'views_handler_relationship',
736
-      'label' => t('Workunit')
733
+        'base' => 'workunit',
734
+        'field' => 'workunitid',
735
+        'handler' => 'views_handler_relationship',
736
+        'label' => t('Workunit')
737 737
     ),
738 738
     'field' => array(
739
-      'handler' => 'views_handler_field_numeric',
740
-      'click sortable' => TRUE
739
+        'handler' => 'views_handler_field_numeric',
740
+        'click sortable' => TRUE
741 741
     ),
742 742
     'filter' => array(
743
-      'handler' => 'views_handler_filter_numeric'
743
+        'handler' => 'views_handler_filter_numeric'
744 744
     ),
745 745
     'sort' => array(
746
-      'handler' => 'views_handler_sort_numeric'
746
+        'handler' => 'views_handler_sort_numeric'
747 747
     )
748
-  );
749
-  $data['result']['hostid'] = array(
748
+    );
749
+    $data['result']['hostid'] = array(
750 750
     'title' => bts('Host ID', array(), NULL, 'boinc:task-details'),
751 751
     'help' => t('The host associated with this result.'),
752 752
     // Foreign key to the {host} table
753 753
     'argument' => array(
754
-      'handler' => 'views_handler_argument',
755
-      'name field' => 'title',
756
-      'numeric' => TRUE,
757
-      'validate type' => 'id'
754
+        'handler' => 'views_handler_argument',
755
+        'name field' => 'title',
756
+        'numeric' => TRUE,
757
+        'validate type' => 'id'
758 758
     ),
759 759
     'relationship' => array(
760
-      'base' => 'host',
761
-      'field' => 'hostid',
762
-      'handler' => 'views_handler_relationship',
763
-      'label' => t('Host')
760
+        'base' => 'host',
761
+        'field' => 'hostid',
762
+        'handler' => 'views_handler_relationship',
763
+        'label' => t('Host')
764 764
     ),
765 765
     'field' => array(
766
-      'handler' => 'views_handler_field_numeric',
767
-      'click sortable' => TRUE
766
+        'handler' => 'views_handler_field_numeric',
767
+        'click sortable' => TRUE
768 768
     ),
769 769
     'filter' => array(
770
-      'handler' => 'views_handler_filter_numeric'
770
+        'handler' => 'views_handler_filter_numeric'
771 771
     ),
772 772
     'sort' => array(
773
-      'handler' => 'views_handler_sort_numeric'
773
+        'handler' => 'views_handler_sort_numeric'
774 774
     )
775
-  );
775
+    );
776 776
 
777
-  // Descriptions of result fields (alphabetized)
777
+    // Descriptions of result fields (alphabetized)
778 778
 
779
-  $data['result']['appid'] = array(
779
+    $data['result']['appid'] = array(
780 780
     'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
781 781
     'help' => t('The ID number of the application.'),
782 782
     'field' => array(
783
-      'handler' => 'views_handler_field_numeric',
784
-      'click sortable' => TRUE
783
+        'handler' => 'views_handler_field_numeric',
784
+        'click sortable' => TRUE
785 785
     ),
786 786
     'filter' => array(
787
-      'handler' => 'views_handler_filter_numeric'
787
+        'handler' => 'views_handler_filter_numeric'
788 788
     ),
789 789
     'sort' => array(
790
-      'handler' => 'views_handler_sort_numeric'
790
+        'handler' => 'views_handler_sort_numeric'
791 791
     )
792
-  );
793
-  $data['result']['app_version_id'] = array(
792
+    );
793
+    $data['result']['app_version_id'] = array(
794 794
     'title' => bts('Application version', array(), NULL, 'boinc:task-details'),
795 795
     'help' => t('The version number of the application.'),
796 796
     'field' => array(
797
-      'handler' => 'views_handler_field_numeric',
798
-      'click sortable' => TRUE
797
+        'handler' => 'views_handler_field_numeric',
798
+        'click sortable' => TRUE
799 799
     ),
800 800
     'filter' => array(
801
-      'handler' => 'views_handler_filter_numeric'
801
+        'handler' => 'views_handler_filter_numeric'
802 802
     ),
803 803
     'sort' => array(
804
-      'handler' => 'views_handler_sort_numeric'
804
+        'handler' => 'views_handler_sort_numeric'
805 805
     )
806
-  );
807
-  $data['result']['claimed_credit'] = array(
806
+    );
807
+    $data['result']['claimed_credit'] = array(
808 808
     'title' => bts('Claimed credit', array(), NULL, 'boinc:task-details'),
809 809
     'help' => t('The credit claimed for this result.'),
810 810
     'field' => array(
811
-      'handler' => 'views_handler_field_numeric',
812
-      'click sortable' => TRUE,
813
-      'float' => TRUE
811
+        'handler' => 'views_handler_field_numeric',
812
+        'click sortable' => TRUE,
813
+        'float' => TRUE
814 814
     ),
815 815
     'filter' => array(
816
-      'handler' => 'views_handler_filter_numeric'
816
+        'handler' => 'views_handler_filter_numeric'
817 817
     ),
818 818
     'sort' => array(
819
-      'handler' => 'views_handler_sort_numeric'
819
+        'handler' => 'views_handler_sort_numeric'
820 820
     )
821
-  );
822
-  $data['result']['client_state'] = array(
821
+    );
822
+    $data['result']['client_state'] = array(
823 823
     'title' => bts('Client state', array(), NULL, 'boinc:task-details'),
824 824
     'help' => t('The state of the task on the client side.'),
825 825
     'field' => array(
826
-      'handler' => 'views_handler_field_numeric',
827
-      'click sortable' => TRUE
826
+        'handler' => 'views_handler_field_numeric',
827
+        'click sortable' => TRUE
828 828
     ),
829 829
     'filter' => array(
830
-      'handler' => 'views_handler_filter_numeric'
830
+        'handler' => 'views_handler_filter_numeric'
831 831
     ),
832 832
     'sort' => array(
833
-      'handler' => 'views_handler_sort_numeric'
833
+        'handler' => 'views_handler_sort_numeric'
834 834
     )
835
-  );
836
-  $data['result']['cpu_time'] = array(
835
+    );
836
+    $data['result']['cpu_time'] = array(
837 837
     'title' => bts('CPU time', array(), NULL, 'boinc:task-details'),
838 838
     'help' => t('The CPU time spent on the task.'),
839 839
     'field' => array(
840
-      'handler' => 'views_handler_field_numeric',
841
-      'click sortable' => TRUE,
842
-      'float' => TRUE
840
+        'handler' => 'views_handler_field_numeric',
841
+        'click sortable' => TRUE,
842
+        'float' => TRUE
843 843
     ),
844 844
     'filter' => array(
845
-      'handler' => 'views_handler_filter_numeric'
845
+        'handler' => 'views_handler_filter_numeric'
846 846
     ),
847 847
     'sort' => array(
848
-      'handler' => 'views_handler_sort_numeric'
848
+        'handler' => 'views_handler_sort_numeric'
849 849
     )
850
-  );
851
-  $data['result']['create_time'] = array(
850
+    );
851
+    $data['result']['create_time'] = array(
852 852
     'title' => bts('Created', array(), NULL, 'boinc:task-details:-1:ignoreoverwrite'),
853 853
     'help' => t('The time that the task was created.'),
854 854
     'field' => array(
855
-      'handler' => 'views_handler_field_date',
856
-      'click sortable' => TRUE
855
+        'handler' => 'views_handler_field_date',
856
+        'click sortable' => TRUE
857 857
     ),
858 858
     'filter' => array(
859
-      'handler' => 'views_handler_filter_date'
859
+        'handler' => 'views_handler_filter_date'
860 860
     ),
861 861
     'sort' => array(
862
-      'handler' => 'views_handler_sort_date'
862
+        'handler' => 'views_handler_sort_date'
863 863
     )
864
-  );
865
-  $data['result']['elapsed_time'] = array(
864
+    );
865
+    $data['result']['elapsed_time'] = array(
866 866
     'title' => bts('Run time', array(), NULL, 'boinc:task-details'),
867 867
     'help' => t('The run time of the task.'),
868 868
     'field' => array(
869
-      'handler' => 'views_handler_field_numeric',
870
-      'click sortable' => TRUE,
871
-      'float' => TRUE
869
+        'handler' => 'views_handler_field_numeric',
870
+        'click sortable' => TRUE,
871
+        'float' => TRUE
872 872
     ),
873 873
     'filter' => array(
874
-      'handler' => 'views_handler_filter_numeric'
874
+        'handler' => 'views_handler_filter_numeric'
875 875
     ),
876 876
     'sort' => array(
877
-      'handler' => 'views_handler_sort_numeric'
877
+        'handler' => 'views_handler_sort_numeric'
878 878
     )
879
-  );
880
-  $data['result']['exit_status'] = array(
879
+    );
880
+    $data['result']['exit_status'] = array(
881 881
     'title' => bts('Exit status', array(), NULL, 'boinc:task-details'),
882 882
     'help' => t('The exit code of the task.'),
883 883
     'field' => array(
884
-      'handler' => 'views_handler_field_numeric',
885
-      'click sortable' => TRUE
884
+        'handler' => 'views_handler_field_numeric',
885
+        'click sortable' => TRUE
886 886
     ),
887 887
     'filter' => array(
888
-      'handler' => 'views_handler_filter_numeric'
888
+        'handler' => 'views_handler_filter_numeric'
889 889
     ),
890 890
     'sort' => array(
891
-      'handler' => 'views_handler_sort_numeric'
891
+        'handler' => 'views_handler_sort_numeric'
892 892
     )
893
-  );
894
-  $data['result']['granted_credit'] = array(
893
+    );
894
+    $data['result']['granted_credit'] = array(
895 895
     'title' => bts('Granted credit', array(), NULL, 'boinc:task-details'),
896 896
     'help' => t('The credit granted for this result.'),
897 897
     'field' => array(
898
-      'handler' => 'views_handler_field_numeric',
899
-      'click sortable' => TRUE,
900
-      'float' => TRUE
898
+        'handler' => 'views_handler_field_numeric',
899
+        'click sortable' => TRUE,
900
+        'float' => TRUE
901 901
     ),
902 902
     'filter' => array(
903
-      'handler' => 'views_handler_filter_numeric'
903
+        'handler' => 'views_handler_filter_numeric'
904 904
     ),
905 905
     'sort' => array(
906
-      'handler' => 'views_handler_sort_numeric'
906
+        'handler' => 'views_handler_sort_numeric'
907 907
     )
908
-  );
909
-  $data['result']['name'] = array(
908
+    );
909
+    $data['result']['name'] = array(
910 910
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
911 911
     'help' => t('The name of the task.'),
912 912
     'field' => array(
913
-      'handler' => 'views_handler_field',
914
-      'click sortable' => TRUE
913
+        'handler' => 'views_handler_field',
914
+        'click sortable' => TRUE
915 915
     ),
916 916
     'filter' => array(
917
-      'handler' => 'views_handler_filter_string'
917
+        'handler' => 'views_handler_filter_string'
918 918
     ),
919 919
     'sort' => array(
920
-      'handler' => 'views_handler_sort_string'
920
+        'handler' => 'views_handler_sort_string'
921 921
     )
922
-  );
923
-  $data['result']['outcome'] = array(
922
+    );
923
+    $data['result']['outcome'] = array(
924 924
     'title' => bts('Outcome', array(), NULL, 'boinc:task-details'),
925 925
     'help' => t('The outcome of the task.'),
926 926
     'field' => array(
927
-      'handler' => 'views_handler_field_numeric',
928
-      'click sortable' => TRUE
927
+        'handler' => 'views_handler_field_numeric',
928
+        'click sortable' => TRUE
929 929
     ),
930 930
     'filter' => array(
931
-      'handler' => 'views_handler_filter_numeric'
931
+        'handler' => 'views_handler_filter_numeric'
932 932
     ),
933 933
     'sort' => array(
934
-      'handler' => 'views_handler_sort_numeric'
934
+        'handler' => 'views_handler_sort_numeric'
935 935
     )
936
-  );
937
-  $data['result']['received_time'] = array(
936
+    );
937
+    $data['result']['received_time'] = array(
938 938
     'title' => bts('Received time', array(), NULL, 'boinc:task-details'),
939 939
     'help' => t('The time that the result was received.'),
940 940
     'field' => array(
941
-      'handler' => 'views_handler_field_date',
942
-      'click sortable' => TRUE
941
+        'handler' => 'views_handler_field_date',
942
+        'click sortable' => TRUE
943 943
     ),
944 944
     'filter' => array(
945
-      'handler' => 'views_handler_filter_date'
945
+        'handler' => 'views_handler_filter_date'
946 946
     ),
947 947
     'sort' => array(
948
-      'handler' => 'views_handler_sort_date'
948
+        'handler' => 'views_handler_sort_date'
949 949
     )
950
-  );
951
-  $data['result']['report_deadline'] = array(
950
+    );
951
+    $data['result']['report_deadline'] = array(
952 952
     'title' => bts('Report deadline', array(), NULL, 'boinc:task-details'),
953 953
     'help' => t('The deadline for the task.'),
954 954
     'field' => array(
955
-      'handler' => 'views_handler_field_date',
956
-      'click sortable' => TRUE
955
+        'handler' => 'views_handler_field_date',
956
+        'click sortable' => TRUE
957 957
     ),
958 958
     'filter' => array(
959
-      'handler' => 'views_handler_filter_date'
959
+        'handler' => 'views_handler_filter_date'
960 960
     ),
961 961
     'sort' => array(
962
-      'handler' => 'views_handler_sort_date'
962
+        'handler' => 'views_handler_sort_date'
963 963
     )
964
-  );
965
-  $data['result']['sent_time'] = array(
964
+    );
965
+    $data['result']['sent_time'] = array(
966 966
     'title' => bts('Sent', array(), NULL, 'boinc:task-details'),
967 967
     'help' => t('The time that the task was sent.'),
968 968
     'field' => array(
969
-      'handler' => 'views_handler_field_date',
970
-      'click sortable' => TRUE
969
+        'handler' => 'views_handler_field_date',
970
+        'click sortable' => TRUE
971 971
     ),
972 972
     'filter' => array(
973
-      'handler' => 'views_handler_filter_date'
973
+        'handler' => 'views_handler_filter_date'
974 974
     ),
975 975
     'sort' => array(
976
-      'handler' => 'views_handler_sort_date'
976
+        'handler' => 'views_handler_sort_date'
977 977
     )
978
-  );
979
-  $data['result']['server_state'] = array(
978
+    );
979
+    $data['result']['server_state'] = array(
980 980
     'title' => bts('Server state', array(), NULL, 'boinc:task-details'),
981 981
     'help' => t('The state of task on the server side.'),
982 982
     'field' => array(
983
-      'handler' => 'views_handler_field_numeric',
984
-      'click sortable' => TRUE
983
+        'handler' => 'views_handler_field_numeric',
984
+        'click sortable' => TRUE
985 985
     ),
986 986
     'filter' => array(
987
-      'handler' => 'views_handler_filter_numeric'
987
+        'handler' => 'views_handler_filter_numeric'
988 988
     ),
989 989
     'sort' => array(
990
-      'handler' => 'views_handler_sort_numeric'
990
+        'handler' => 'views_handler_sort_numeric'
991 991
     )
992
-  );
993
-  $data['result']['stderr_out'] = array(
992
+    );
993
+    $data['result']['stderr_out'] = array(
994 994
     'title' => bts('Stderr out', array(), NULL, 'boinc:task-details'),
995 995
     'help' => t('The output to standard error.'),
996 996
     'field' => array(
997
-      'handler' => 'views_handler_field',
998
-      'click sortable' => TRUE
997
+        'handler' => 'views_handler_field',
998
+        'click sortable' => TRUE
999 999
     ),
1000 1000
     'filter' => array(
1001
-      'handler' => 'views_handler_filter_string'
1001
+        'handler' => 'views_handler_filter_string'
1002 1002
     ),
1003 1003
     'sort' => array(
1004
-      'handler' => 'views_handler_sort_string'
1004
+        'handler' => 'views_handler_sort_string'
1005 1005
     )
1006
-  );
1007
-  $data['result']['validate_state'] = array(
1006
+    );
1007
+    $data['result']['validate_state'] = array(
1008 1008
     'title' => bts('Validation state', array(), NULL, 'boinc:task-details'),
1009 1009
     'help' => t('The state of validation of this result.'),
1010 1010
     'field' => array(
1011
-      'handler' => 'views_handler_field_numeric',
1012
-      'click sortable' => TRUE
1011
+        'handler' => 'views_handler_field_numeric',
1012
+        'click sortable' => TRUE
1013 1013
     ),
1014 1014
     'filter' => array(
1015
-      'handler' => 'views_handler_filter_numeric'
1015
+        'handler' => 'views_handler_filter_numeric'
1016 1016
     ),
1017 1017
     'sort' => array(
1018
-      'handler' => 'views_handler_sort_numeric'
1018
+        'handler' => 'views_handler_sort_numeric'
1019 1019
     )
1020
-  );
1021
-  $data['result']['peak_working_set_size'] = array(
1020
+    );
1021
+    $data['result']['peak_working_set_size'] = array(
1022 1022
     'title' => bts('Peak working set size', array(), NULL, 'boinc:task-details'),
1023 1023
     'help' => t('Peak working set size.'),
1024 1024
     'field' => array(
1025
-      'handler' => 'views_handler_field_numeric',
1026
-      'click sortable' => TRUE
1025
+        'handler' => 'views_handler_field_numeric',
1026
+        'click sortable' => TRUE
1027 1027
     ),
1028 1028
     'filter' => array(
1029
-      'handler' => 'views_handler_filter_numeric'
1029
+        'handler' => 'views_handler_filter_numeric'
1030 1030
     ),
1031 1031
     'sort' => array(
1032
-      'handler' => 'views_handler_sort_numeric'
1032
+        'handler' => 'views_handler_sort_numeric'
1033 1033
     )
1034
-  );
1035
-  $data['result']['peak_swap_size'] = array(
1034
+    );
1035
+    $data['result']['peak_swap_size'] = array(
1036 1036
     'title' => bts('Peak swap size', array(), NULL, 'boinc:task-details'),
1037 1037
     'help' => t('Peak swap size.'),
1038 1038
     'field' => array(
1039
-      'handler' => 'views_handler_field_numeric',
1040
-      'click sortable' => TRUE
1039
+        'handler' => 'views_handler_field_numeric',
1040
+        'click sortable' => TRUE
1041 1041
     ),
1042 1042
     'filter' => array(
1043
-      'handler' => 'views_handler_filter_numeric'
1043
+        'handler' => 'views_handler_filter_numeric'
1044 1044
     ),
1045 1045
     'sort' => array(
1046
-      'handler' => 'views_handler_sort_numeric'
1046
+        'handler' => 'views_handler_sort_numeric'
1047 1047
     )
1048
-  );
1048
+    );
1049 1049
     $data['result']['peak_disk_usage'] = array(
1050 1050
     'title' => bts('Peak disk usage', array(), NULL, 'boinc:task-details'),
1051 1051
     'help' => t('Peak disk usage.'),
1052 1052
     'field' => array(
1053
-      'handler' => 'views_handler_field_numeric',
1054
-      'click sortable' => TRUE
1053
+        'handler' => 'views_handler_field_numeric',
1054
+        'click sortable' => TRUE
1055 1055
     ),
1056 1056
     'filter' => array(
1057
-      'handler' => 'views_handler_filter_numeric'
1057
+        'handler' => 'views_handler_filter_numeric'
1058 1058
     ),
1059 1059
     'sort' => array(
1060
-      'handler' => 'views_handler_sort_numeric'
1060
+        'handler' => 'views_handler_sort_numeric'
1061 1061
     )
1062
-  );
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(
1079
+    $data['workunit']['table']['join'] = array(
1080 1080
     'app' => array(
1081
-      'left_field' => 'id',
1082
-      'field' => 'appid'
1081
+        'left_field' => 'id',
1082
+        'field' => 'appid'
1083 1083
     )
1084
-  );
1084
+    );
1085 1085
 
1086
-  // Primary keys allowed as arguments
1086
+    // Primary keys allowed as arguments
1087 1087
 
1088
-  $data['workunit']['id'] = array(
1088
+    $data['workunit']['id'] = array(
1089 1089
     'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
1090 1090
     'help' => t('The ID number of this workunit.'),
1091 1091
     'field' => array(
1092
-      'handler' => 'views_handler_field_numeric',
1093
-      'click sortable' => TRUE
1092
+        'handler' => 'views_handler_field_numeric',
1093
+        'click sortable' => TRUE
1094 1094
     ),
1095 1095
     'argument' => array(
1096
-      'handler' => 'views_handler_argument',
1097
-      'name field' => 'title',
1098
-      'numeric' => TRUE,
1099
-      'validate type' => 'id'
1096
+        'handler' => 'views_handler_argument',
1097
+        'name field' => 'title',
1098
+        'numeric' => TRUE,
1099
+        'validate type' => 'id'
1100 1100
     ),
1101 1101
     'filter' => array(
1102
-      'handler' => 'views_handler_filter_numeric'
1102
+        'handler' => 'views_handler_filter_numeric'
1103 1103
     ),
1104 1104
     'sort' => array(
1105
-      'handler' => 'views_handler_sort_numeric'
1105
+        'handler' => 'views_handler_sort_numeric'
1106 1106
     )
1107
-  );
1107
+    );
1108 1108
 
1109
-  // Foreign key fields
1109
+    // Foreign key fields
1110 1110
 
1111
-  $data['workunit']['appid'] = array(
1111
+    $data['workunit']['appid'] = array(
1112 1112
     'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1113 1113
     'help' => t('The application associated with this workunit.'),
1114 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'
1115
+        'handler' => 'views_handler_argument',
1116
+        'name field' => 'title',
1117
+        'numeric' => TRUE,
1118
+        'validate type' => 'id'
1119 1119
     ),
1120 1120
     'relationship' => array(
1121
-      'base' => 'app',
1122
-      'field' => 'appid',
1123
-      'handler' => 'views_handler_relationship',
1124
-      'label' => t('Application')
1121
+        'base' => 'app',
1122
+        'field' => 'appid',
1123
+        'handler' => 'views_handler_relationship',
1124
+        'label' => t('Application')
1125 1125
     ),
1126 1126
     'field' => array(
1127
-      'handler' => 'views_handler_field_numeric',
1128
-      'click sortable' => TRUE
1127
+        'handler' => 'views_handler_field_numeric',
1128
+        'click sortable' => TRUE
1129 1129
     ),
1130 1130
     'filter' => array(
1131
-      'handler' => 'views_handler_filter_numeric'
1131
+        'handler' => 'views_handler_filter_numeric'
1132 1132
     ),
1133 1133
     'sort' => array(
1134
-      'handler' => 'views_handler_sort_numeric'
1134
+        'handler' => 'views_handler_sort_numeric'
1135 1135
     )
1136
-  );
1136
+    );
1137 1137
 
1138
-  // Descriptions of workunit fields (alphabetized)
1138
+    // Descriptions of workunit fields (alphabetized)
1139 1139
 
1140
-  $data['workunit']['canonical_credit'] = array(
1140
+    $data['workunit']['canonical_credit'] = array(
1141 1141
     'title' => bts('Canonical credit', array(), NULL, 'boinc:workunit-details'),
1142 1142
     'help' => t('The canonical credit of the workunit.'),
1143 1143
     'field' => array(
1144
-      'handler' => 'views_handler_field_numeric',
1145
-      'click sortable' => TRUE,
1146
-      'float' => TRUE
1144
+        'handler' => 'views_handler_field_numeric',
1145
+        'click sortable' => TRUE,
1146
+        'float' => TRUE
1147 1147
     ),
1148 1148
     'filter' => array(
1149
-      'handler' => 'views_handler_filter_numeric'
1149
+        'handler' => 'views_handler_filter_numeric'
1150 1150
     ),
1151 1151
     'sort' => array(
1152
-      'handler' => 'views_handler_sort_numeric'
1152
+        'handler' => 'views_handler_sort_numeric'
1153 1153
     )
1154
-  );
1155
-  $data['workunit']['canonical_resultid'] = array(
1154
+    );
1155
+    $data['workunit']['canonical_resultid'] = array(
1156 1156
     'title' => bts('Canonical result ID', array(), NULL, 'boinc:workunit-details'),
1157 1157
     'help' => t('The ID of the canonical result associated with the workunit.'),
1158 1158
     'field' => array(
1159
-      'handler' => 'views_handler_field_numeric',
1160
-      'click sortable' => TRUE
1159
+        'handler' => 'views_handler_field_numeric',
1160
+        'click sortable' => TRUE
1161 1161
     ),
1162 1162
     'filter' => array(
1163
-      'handler' => 'views_handler_filter_numeric'
1163
+        'handler' => 'views_handler_filter_numeric'
1164 1164
     ),
1165 1165
     'sort' => array(
1166
-      'handler' => 'views_handler_sort_numeric'
1166
+        'handler' => 'views_handler_sort_numeric'
1167 1167
     )
1168
-  );
1169
-  $data['workunit']['create_time'] = array(
1168
+    );
1169
+    $data['workunit']['create_time'] = array(
1170 1170
     'title' => bts('Created time', array(), NULL, 'boinc:workunit-details'),
1171 1171
     'help' => t('The time that the workunit was created.'),
1172 1172
     'field' => array(
1173
-      'handler' => 'views_handler_field_date',
1174
-      'click sortable' => TRUE
1173
+        'handler' => 'views_handler_field_date',
1174
+        'click sortable' => TRUE
1175 1175
     ),
1176 1176
     'filter' => array(
1177
-      'handler' => 'views_handler_filter_date'
1177
+        'handler' => 'views_handler_filter_date'
1178 1178
     ),
1179 1179
     'sort' => array(
1180
-      'handler' => 'views_handler_sort_date'
1180
+        'handler' => 'views_handler_sort_date'
1181 1181
     )
1182
-  );
1183
-  $data['workunit']['error_mask'] = array(
1182
+    );
1183
+    $data['workunit']['error_mask'] = array(
1184 1184
     'title' => bts('Error mask', array(), NULL, 'boinc:workunit-details'),
1185 1185
     'help' => t('Error mask of the workunit.'),
1186 1186
     'field' => array(
1187
-      'handler' => 'views_handler_field_numeric',
1188
-      'click sortable' => TRUE
1187
+        'handler' => 'views_handler_field_numeric',
1188
+        'click sortable' => TRUE
1189 1189
     ),
1190 1190
     'filter' => array(
1191
-      'handler' => 'views_handler_filter_numeric'
1191
+        'handler' => 'views_handler_filter_numeric'
1192 1192
     ),
1193 1193
     'sort' => array(
1194
-      'handler' => 'views_handler_sort_numeric'
1194
+        'handler' => 'views_handler_sort_numeric'
1195 1195
     )
1196
-  );
1197
-  $data['workunit']['min_quorum'] = array(
1196
+    );
1197
+    $data['workunit']['min_quorum'] = array(
1198 1198
     'title' => bts('Minimum quorum', array(), NULL, 'boinc:workunit-details'),
1199 1199
     'help' => t('Minimum quorum of the workunit.'),
1200 1200
     'field' => array(
1201
-      'handler' => 'views_handler_field_numeric',
1202
-      'click sortable' => TRUE
1201
+        'handler' => 'views_handler_field_numeric',
1202
+        'click sortable' => TRUE
1203 1203
     ),
1204 1204
     'filter' => array(
1205
-      'handler' => 'views_handler_filter_numeric'
1205
+        'handler' => 'views_handler_filter_numeric'
1206 1206
     ),
1207 1207
     'sort' => array(
1208
-      'handler' => 'views_handler_sort_numeric'
1208
+        'handler' => 'views_handler_sort_numeric'
1209 1209
     )
1210
-  );
1211
-  $data['workunit']['name'] = array(
1210
+    );
1211
+    $data['workunit']['name'] = array(
1212 1212
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreovewrite'),
1213 1213
     'help' => t('The name of the workunit.'),
1214 1214
     'field' => array(
1215
-      'handler' => 'views_handler_field',
1216
-      'click sortable' => TRUE
1215
+        'handler' => 'views_handler_field',
1216
+        'click sortable' => TRUE
1217 1217
     ),
1218 1218
     'filter' => array(
1219
-      'handler' => 'views_handler_filter_string'
1219
+        'handler' => 'views_handler_filter_string'
1220 1220
     ),
1221 1221
     'sort' => array(
1222
-      'handler' => 'views_handler_sort_string'
1222
+        'handler' => 'views_handler_sort_string'
1223 1223
     )
1224
-  );
1225
-  $data['workunit']['max_error_results'] = array(
1224
+    );
1225
+    $data['workunit']['max_error_results'] = array(
1226 1226
     'title' => bts('Max error tasks', array(), NULL, 'boinc:workunit-details'),
1227 1227
     'help' => t('The maximum number of error tasks in the workunit.'),
1228 1228
     'field' => array(
1229
-      'handler' => 'views_handler_field_numeric',
1230
-      'click sortable' => TRUE
1229
+        'handler' => 'views_handler_field_numeric',
1230
+        'click sortable' => TRUE
1231 1231
     ),
1232 1232
     'filter' => array(
1233
-      'handler' => 'views_handler_filter_numeric'
1233
+        'handler' => 'views_handler_filter_numeric'
1234 1234
     ),
1235 1235
     'sort' => array(
1236
-      'handler' => 'views_handler_sort_numeric'
1236
+        'handler' => 'views_handler_sort_numeric'
1237 1237
     )
1238
-  );
1239
-  $data['workunit']['max_success_results'] = array(
1238
+    );
1239
+    $data['workunit']['max_success_results'] = array(
1240 1240
     'title' => bts('Max success tasks', array(), NULL, 'boinc:workunit-details'),
1241 1241
     'help' => t('The maximum number of successful tasks in the workunit.'),
1242 1242
     'field' => array(
1243
-      'handler' => 'views_handler_field_numeric',
1244
-      'click sortable' => TRUE
1243
+        'handler' => 'views_handler_field_numeric',
1244
+        'click sortable' => TRUE
1245 1245
     ),
1246 1246
     'filter' => array(
1247
-      'handler' => 'views_handler_filter_numeric'
1247
+        'handler' => 'views_handler_filter_numeric'
1248 1248
     ),
1249 1249
     'sort' => array(
1250
-      'handler' => 'views_handler_sort_numeric'
1250
+        'handler' => 'views_handler_sort_numeric'
1251 1251
     )
1252
-  );
1253
-  $data['workunit']['max_total_results'] = array(
1252
+    );
1253
+    $data['workunit']['max_total_results'] = array(
1254 1254
     'title' => bts('Max total tasks', array(), NULL, 'boinc:workunit-details'),
1255 1255
     'help' => t('The maximum number of total tasks in the workunit.'),
1256 1256
     'field' => array(
1257
-      'handler' => 'views_handler_field_numeric',
1258
-      'click sortable' => TRUE
1257
+        'handler' => 'views_handler_field_numeric',
1258
+        'click sortable' => TRUE
1259 1259
     ),
1260 1260
     'filter' => array(
1261
-      'handler' => 'views_handler_filter_numeric'
1261
+        'handler' => 'views_handler_filter_numeric'
1262 1262
     ),
1263 1263
     'sort' => array(
1264
-      'handler' => 'views_handler_sort_numeric'
1264
+        'handler' => 'views_handler_sort_numeric'
1265 1265
     )
1266
-  );
1267
-  $data['workunit']['need_validate'] = array(
1266
+    );
1267
+    $data['workunit']['need_validate'] = array(
1268 1268
     'title' => bts('Needs validation', array(), NULL, 'boinc:workunit-details'),
1269 1269
     'help' => t('Whether or not a workunit needs validation.'),
1270 1270
     'field' => array(
1271
-      'handler' => 'views_handler_field_numeric',
1272
-      'click sortable' => TRUE
1271
+        'handler' => 'views_handler_field_numeric',
1272
+        'click sortable' => TRUE
1273 1273
     ),
1274 1274
     'filter' => array(
1275
-      'handler' => 'views_handler_filter_numeric'
1275
+        'handler' => 'views_handler_filter_numeric'
1276 1276
     ),
1277 1277
     'sort' => array(
1278
-      'handler' => 'views_handler_sort_numeric'
1278
+        'handler' => 'views_handler_sort_numeric'
1279 1279
     )
1280
-  );
1281
-  $data['workunit']['target_nresults'] = array(
1280
+    );
1281
+    $data['workunit']['target_nresults'] = array(
1282 1282
     'title' => bts('Initial replication', array(), NULL, 'boinc:workunit-details'),
1283 1283
     'help' => t('The target number of results for the workunit.'),
1284 1284
     'field' => array(
1285
-      'handler' => 'views_handler_field_numeric',
1286
-      'click sortable' => TRUE
1285
+        'handler' => 'views_handler_field_numeric',
1286
+        'click sortable' => TRUE
1287 1287
     ),
1288 1288
     'filter' => array(
1289
-      'handler' => 'views_handler_filter_numeric'
1289
+        'handler' => 'views_handler_filter_numeric'
1290 1290
     ),
1291 1291
     'sort' => array(
1292
-      'handler' => 'views_handler_sort_numeric'
1292
+        'handler' => 'views_handler_sort_numeric'
1293 1293
     )
1294
-  );
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(
1310
+    $data['app']['id'] = array(
1311 1311
     'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1312 1312
     'help' => t('The ID number of this application.'),
1313 1313
     'field' => array(
1314
-      'handler' => 'views_handler_field_numeric',
1315
-      'click sortable' => TRUE
1314
+        'handler' => 'views_handler_field_numeric',
1315
+        'click sortable' => TRUE
1316 1316
     ),
1317 1317
     'argument' => array(
1318
-      'handler' => 'views_handler_argument',
1319
-      'name field' => 'title',
1320
-      'numeric' => TRUE,
1321
-      'validate type' => 'id'
1318
+        'handler' => 'views_handler_argument',
1319
+        'name field' => 'title',
1320
+        'numeric' => TRUE,
1321
+        'validate type' => 'id'
1322 1322
     ),
1323 1323
     'filter' => array(
1324
-      'handler' => 'views_handler_filter_numeric'
1324
+        'handler' => 'views_handler_filter_numeric'
1325 1325
     ),
1326 1326
     'sort' => array(
1327
-      'handler' => 'views_handler_sort_numeric'
1327
+        'handler' => 'views_handler_sort_numeric'
1328 1328
     )
1329
-  );
1329
+    );
1330 1330
 
1331
-  // Descriptions of app fields (alphabetized)
1331
+    // Descriptions of app fields (alphabetized)
1332 1332
 
1333
-  $data['app']['target_nresults'] = array(
1333
+    $data['app']['target_nresults'] = array(
1334 1334
     'title' => bts('Target number of results', array(), NULL, 'boinc:application-details'),
1335 1335
     'help' => t('The number of times to replicate tasks in this application.'),
1336 1336
     'field' => array(
1337
-      'handler' => 'views_handler_field_numeric',
1338
-      'click sortable' => TRUE
1337
+        'handler' => 'views_handler_field_numeric',
1338
+        'click sortable' => TRUE
1339 1339
     ),
1340 1340
     'filter' => array(
1341
-      'handler' => 'views_handler_filter_numeric'
1341
+        'handler' => 'views_handler_filter_numeric'
1342 1342
     ),
1343 1343
     'sort' => array(
1344
-      'handler' => 'views_handler_sort_numeric'
1344
+        'handler' => 'views_handler_sort_numeric'
1345 1345
     )
1346
-  );
1347
-  $data['app']['user_friendly_name'] = array(
1346
+    );
1347
+    $data['app']['user_friendly_name'] = array(
1348 1348
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1349 1349
     'help' => t('The user friendly name of the application.'),
1350 1350
     'field' => array(
1351
-      'handler' => 'views_handler_field',
1352
-      'click sortable' => TRUE
1351
+        'handler' => 'views_handler_field',
1352
+        'click sortable' => TRUE
1353 1353
     ),
1354 1354
     'filter' => array(
1355
-      'handler' => 'views_handler_filter_string'
1355
+        'handler' => 'views_handler_filter_string'
1356 1356
     ),
1357 1357
     'sort' => array(
1358
-      'handler' => 'views_handler_sort_string'
1358
+        'handler' => 'views_handler_sort_string'
1359 1359
     )
1360
-  );
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(
1376
+    $data['app_version']['id'] = array(
1377 1377
     'title' => bts('Application version ID', array(), NULL, 'boinc:application-details'),
1378 1378
     'help' => t('The ID number of this application version.'),
1379 1379
     'field' => array(
1380
-      'handler' => 'views_handler_field_numeric',
1381
-      'click sortable' => TRUE
1380
+        'handler' => 'views_handler_field_numeric',
1381
+        'click sortable' => TRUE
1382 1382
     ),
1383 1383
     'argument' => array(
1384
-      'handler' => 'views_handler_argument',
1385
-      'name field' => 'title',
1386
-      'numeric' => TRUE,
1387
-      'validate type' => 'id'
1384
+        'handler' => 'views_handler_argument',
1385
+        'name field' => 'title',
1386
+        'numeric' => TRUE,
1387
+        'validate type' => 'id'
1388 1388
     ),
1389 1389
     'filter' => array(
1390
-      'handler' => 'views_handler_filter_numeric'
1390
+        'handler' => 'views_handler_filter_numeric'
1391 1391
     ),
1392 1392
     'sort' => array(
1393
-      'handler' => 'views_handler_sort_numeric'
1393
+        'handler' => 'views_handler_sort_numeric'
1394 1394
     )
1395
-  );
1395
+    );
1396 1396
 
1397
-  // Foreign key fields
1397
+    // Foreign key fields
1398 1398
 
1399
-  $data['app_version']['appid'] = array(
1399
+    $data['app_version']['appid'] = array(
1400 1400
     'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1401 1401
     'help' => t('The application ID associated with this app version.'),
1402 1402
     // Because this is a foreign key to the {app} table. This allows us to
1403 1403
     // have, when the view is configured with this relationship, all the fields
1404 1404
     // for the related node available.
1405 1405
     'argument' => array(
1406
-      'handler' => 'views_handler_argument_numeric',
1407
-      'name field' => 'title',
1408
-      'numeric' => TRUE,
1409
-      'validate type' => 'id'
1406
+        'handler' => 'views_handler_argument_numeric',
1407
+        'name field' => 'title',
1408
+        'numeric' => TRUE,
1409
+        'validate type' => 'id'
1410 1410
     ),
1411 1411
     'relationship' => array(
1412
-      'base' => 'app',
1413
-      'field' => 'id',
1414
-      'handler' => 'views_handler_relationship',
1415
-      'label' => t('App ID')
1412
+        'base' => 'app',
1413
+        'field' => 'id',
1414
+        'handler' => 'views_handler_relationship',
1415
+        'label' => t('App ID')
1416 1416
     ),
1417 1417
     'field' => array(
1418
-      'handler' => 'views_handler_field_numeric',
1419
-      'click sortable' => TRUE
1418
+        'handler' => 'views_handler_field_numeric',
1419
+        'click sortable' => TRUE
1420 1420
     ),
1421 1421
     'filter' => array(
1422
-      'handler' => 'views_handler_filter_numeric'
1422
+        'handler' => 'views_handler_filter_numeric'
1423 1423
     ),
1424 1424
     'sort' => array(
1425
-      'handler' => 'views_handler_sort_numeric'
1425
+        'handler' => 'views_handler_sort_numeric'
1426 1426
     )
1427
-  );
1427
+    );
1428 1428
 
1429
-  $data['app_version']['platformid'] = array(
1429
+    $data['app_version']['platformid'] = array(
1430 1430
     'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
1431 1431
     'help' => t('The platform ID associated with this app version.'),
1432 1432
     // Because this is a foreign key to the {platform} table. This allows us to
1433 1433
     // have, when the view is configured with this relationship, all the fields
1434 1434
     // for the related node available.
1435 1435
     'argument' => array(
1436
-      'handler' => 'views_handler_argument_numeric',
1437
-      'name field' => 'title',
1438
-      'numeric' => TRUE,
1439
-      'validate type' => 'id'
1436
+        'handler' => 'views_handler_argument_numeric',
1437
+        'name field' => 'title',
1438
+        'numeric' => TRUE,
1439
+        'validate type' => 'id'
1440 1440
     ),
1441 1441
     'relationship' => array(
1442
-      'base' => 'platform',
1443
-      'field' => 'id',
1444
-      'handler' => 'views_handler_relationship',
1445
-      'label' => t('Platform ID')
1442
+        'base' => 'platform',
1443
+        'field' => 'id',
1444
+        'handler' => 'views_handler_relationship',
1445
+        'label' => t('Platform ID')
1446 1446
     ),
1447 1447
     'field' => array(
1448
-      'handler' => 'views_handler_field_numeric',
1449
-      'click sortable' => TRUE
1448
+        'handler' => 'views_handler_field_numeric',
1449
+        'click sortable' => TRUE
1450 1450
     ),
1451 1451
     'filter' => array(
1452
-      'handler' => 'views_handler_filter_numeric'
1452
+        'handler' => 'views_handler_filter_numeric'
1453 1453
     ),
1454 1454
     'sort' => array(
1455
-      'handler' => 'views_handler_sort_numeric'
1455
+        'handler' => 'views_handler_sort_numeric'
1456 1456
     )
1457
-  );
1457
+    );
1458 1458
 
1459
-  // Descriptions of app fields (alphabetized)
1459
+    // Descriptions of app fields (alphabetized)
1460 1460
 
1461
-  $data['app_version']['plan_class'] = array(
1461
+    $data['app_version']['plan_class'] = array(
1462 1462
     'title' => bts('Plan class', array(), NULL, 'boinc:application-details'),
1463 1463
     'help' => t('App version plan class.'),
1464 1464
     'field' => array(
1465
-      'handler' => 'views_handler_field',
1466
-      'click sortable' => TRUE
1465
+        'handler' => 'views_handler_field',
1466
+        'click sortable' => TRUE
1467 1467
     ),
1468 1468
     'filter' => array(
1469
-      'handler' => 'views_handler_filter_string'
1469
+        'handler' => 'views_handler_filter_string'
1470 1470
     ),
1471 1471
     'sort' => array(
1472
-      'handler' => 'views_handler_sort_string'
1472
+        'handler' => 'views_handler_sort_string'
1473 1473
     )
1474
-  );
1475
-  $data['app_version']['version_num'] = array(
1474
+    );
1475
+    $data['app_version']['version_num'] = array(
1476 1476
     'title' => bts('Version number', array(), NULL, 'boinc:application-details'),
1477 1477
     'help' => t('The application version number.'),
1478 1478
     'field' => array(
1479
-      'handler' => 'views_handler_field_boincwork_app_version_number',
1480
-      'click sortable' => TRUE,
1481
-      'float' => TRUE,
1479
+        'handler' => 'views_handler_field_boincwork_app_version_number',
1480
+        'click sortable' => TRUE,
1481
+        'float' => TRUE,
1482 1482
     ),
1483 1483
     'filter' => array(
1484
-      'handler' => 'views_handler_filter_numeric'
1484
+        'handler' => 'views_handler_filter_numeric'
1485 1485
     ),
1486 1486
     'sort' => array(
1487
-      'handler' => 'views_handler_sort_numeric'
1487
+        'handler' => 'views_handler_sort_numeric'
1488 1488
     )
1489
-  );
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(
1505
+    $data['host_app_version']['table']['join'] = array(
1506 1506
     'host' => array(
1507
-      'left_field' => 'id',
1508
-      'field' => 'host_id',
1507
+        'left_field' => 'id',
1508
+        'field' => 'host_id',
1509 1509
     )
1510
-  );
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(
1514
+    $data['host_app_version']['host_id'] = array(
1515 1515
     'title' => bts('Computer', array(), NULL, 'boinc:host-details'),
1516 1516
     'help' => t('The host ID connected to this app version data.'),
1517 1517
     'field' => array(
1518
-      'handler' => 'views_handler_field_numeric',
1519
-      'click sortable' => TRUE
1518
+        'handler' => 'views_handler_field_numeric',
1519
+        'click sortable' => TRUE
1520 1520
     ),
1521 1521
     'argument' => array(
1522
-      'handler' => 'views_handler_argument',
1523
-      'name field' => 'title',
1524
-      'numeric' => TRUE,
1525
-      'validate type' => 'id'
1522
+        'handler' => 'views_handler_argument',
1523
+        'name field' => 'title',
1524
+        'numeric' => TRUE,
1525
+        'validate type' => 'id'
1526 1526
     ),
1527 1527
     'filter' => array(
1528
-      'handler' => 'views_handler_filter_numeric'
1528
+        'handler' => 'views_handler_filter_numeric'
1529 1529
     ),
1530 1530
     'sort' => array(
1531
-      'handler' => 'views_handler_sort_numeric'
1531
+        'handler' => 'views_handler_sort_numeric'
1532 1532
     )
1533
-  );
1533
+    );
1534 1534
 
1535
-  // Foreign key fields
1535
+    // Foreign key fields
1536 1536
 
1537
-  $data['host_app_version']['app_version_id'] = array(
1537
+    $data['host_app_version']['app_version_id'] = array(
1538 1538
     'title' => bts('App version ID', array(), NULL, 'boinc:application-details'),
1539 1539
     'help' => t('The app version ID connected to this host data.'),
1540 1540
     // Because this is a foreign key to the {host} table. This allows us to
1541 1541
     // have, when the view is configured with this relationship, all the fields
1542 1542
     // for the related node available.
1543 1543
     'argument' => array(
1544
-      'handler' => 'views_handler_argument_numeric',
1545
-      'name field' => 'title',
1546
-      'numeric' => TRUE,
1547
-      'validate type' => 'id'
1544
+        'handler' => 'views_handler_argument_numeric',
1545
+        'name field' => 'title',
1546
+        'numeric' => TRUE,
1547
+        'validate type' => 'id'
1548 1548
     ),
1549 1549
     'relationship' => array(
1550
-      'base' => 'app_version',
1551
-      'field' => 'id',
1552
-      'handler' => 'views_handler_relationship',
1553
-      'label' => t('App version')
1550
+        'base' => 'app_version',
1551
+        'field' => 'id',
1552
+        'handler' => 'views_handler_relationship',
1553
+        'label' => t('App version')
1554 1554
     ),
1555 1555
     'field' => array(
1556
-      'handler' => 'views_handler_field_numeric',
1557
-      'click sortable' => TRUE
1556
+        'handler' => 'views_handler_field_numeric',
1557
+        'click sortable' => TRUE
1558 1558
     ),
1559 1559
     'filter' => array(
1560
-      'handler' => 'views_handler_filter_numeric'
1560
+        'handler' => 'views_handler_filter_numeric'
1561 1561
     ),
1562 1562
     'sort' => array(
1563
-      'handler' => 'views_handler_sort_numeric'
1563
+        'handler' => 'views_handler_sort_numeric'
1564 1564
     )
1565
-  );
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(
1569
+    $data['host_app_version']['consecutive_valid'] = array(
1570 1570
     'title' => bts('Consecutive valid tasks', array(), NULL, 'boinc:application-details'),
1571 1571
     'help' => t('The number of consecutive valid tasks for this app and by this host.'),
1572 1572
     'field' => array(
1573
-      'handler' => 'views_handler_field_numeric',
1574
-      'click sortable' => TRUE
1573
+        'handler' => 'views_handler_field_numeric',
1574
+        'click sortable' => TRUE
1575 1575
     ),
1576 1576
     'filter' => array(
1577
-      'handler' => 'views_handler_filter_numeric'
1577
+        'handler' => 'views_handler_filter_numeric'
1578 1578
     ),
1579 1579
     'sort' => array(
1580
-      'handler' => 'views_handler_sort_numeric'
1580
+        'handler' => 'views_handler_sort_numeric'
1581 1581
     )
1582
-  );
1583
-  $data['host_app_version']['et_avg'] = array(
1582
+    );
1583
+    $data['host_app_version']['et_avg'] = array(
1584 1584
     'title' => t('Average processing rate'),
1585 1585
     'help' => t('The "et_avg" for this app and by this host.'),
1586 1586
     'field' => array(
1587
-      'handler' => 'views_handler_field_boincwork_host_app_et_avg',
1588
-      'click sortable' => TRUE
1587
+        'handler' => 'views_handler_field_boincwork_host_app_et_avg',
1588
+        'click sortable' => TRUE
1589 1589
     ),
1590 1590
     'filter' => array(
1591
-      'handler' => 'views_handler_filter_numeric'
1591
+        'handler' => 'views_handler_filter_numeric'
1592 1592
     ),
1593 1593
     'sort' => array(
1594
-      'handler' => 'views_handler_sort_numeric'
1594
+        'handler' => 'views_handler_sort_numeric'
1595 1595
     )
1596
-  );
1597
-  $data['host_app_version']['et_n'] = array(
1596
+    );
1597
+    $data['host_app_version']['et_n'] = array(
1598 1598
     'title' => bts('Number of tasks completed', array(), NULL, 'boinc:application-details'),
1599 1599
     'help' => t('The tasks completed for this app and by this host.'),
1600 1600
     'field' => array(
1601
-      'handler' => 'views_handler_field_numeric',
1602
-      'click sortable' => TRUE
1601
+        'handler' => 'views_handler_field_numeric',
1602
+        'click sortable' => TRUE
1603 1603
     ),
1604 1604
     'filter' => array(
1605
-      'handler' => 'views_handler_filter_numeric'
1605
+        'handler' => 'views_handler_filter_numeric'
1606 1606
     ),
1607 1607
     'sort' => array(
1608
-      'handler' => 'views_handler_sort_numeric'
1608
+        'handler' => 'views_handler_sort_numeric'
1609 1609
     )
1610
-  );
1611
-  $data['host_app_version']['max_jobs_per_day'] = array(
1610
+    );
1611
+    $data['host_app_version']['max_jobs_per_day'] = array(
1612 1612
     'title' => bts('Max tasks per day', array(), NULL, 'boinc:application-details'),
1613 1613
     'help' => t('The maximum tasks per day for this app and by this host.'),
1614 1614
     'field' => array(
1615
-      'handler' => 'views_handler_field_numeric',
1616
-      'click sortable' => TRUE
1615
+        'handler' => 'views_handler_field_numeric',
1616
+        'click sortable' => TRUE
1617 1617
     ),
1618 1618
     'filter' => array(
1619
-      'handler' => 'views_handler_filter_numeric'
1619
+        'handler' => 'views_handler_filter_numeric'
1620 1620
     ),
1621 1621
     'sort' => array(
1622
-      'handler' => 'views_handler_sort_numeric'
1622
+        'handler' => 'views_handler_sort_numeric'
1623 1623
     )
1624
-  );
1625
-  $data['host_app_version']['n_jobs_today'] = array(
1624
+    );
1625
+    $data['host_app_version']['n_jobs_today'] = array(
1626 1626
     'title' => bts('Number of tasks today', array(), NULL, 'boinc:application-details'),
1627 1627
     'help' => t('The number of tasks today for this app and by this host.'),
1628 1628
     'field' => array(
1629
-      'handler' => 'views_handler_field_numeric',
1630
-      'click sortable' => TRUE
1629
+        'handler' => 'views_handler_field_numeric',
1630
+        'click sortable' => TRUE
1631 1631
     ),
1632 1632
     'filter' => array(
1633
-      'handler' => 'views_handler_filter_numeric'
1633
+        'handler' => 'views_handler_filter_numeric'
1634 1634
     ),
1635 1635
     'sort' => array(
1636
-      'handler' => 'views_handler_sort_numeric'
1636
+        'handler' => 'views_handler_sort_numeric'
1637 1637
     )
1638
-  );
1639
-  $data['host_app_version']['turnaround_avg'] = array(
1638
+    );
1639
+    $data['host_app_version']['turnaround_avg'] = array(
1640 1640
     'title' => bts('Average turnaround time', array(), NULL, 'boinc:application-details:-1:ignoreoverwrite'),
1641 1641
     'help' => t('The average turnaround time per task for this app and by this host.'),
1642 1642
     'field' => array(
1643
-      'handler' => 'views_handler_field_boincwork_host_app_turnaround_avg',
1644
-      'click sortable' => TRUE,
1645
-      'float' => TRUE,
1643
+        'handler' => 'views_handler_field_boincwork_host_app_turnaround_avg',
1644
+        'click sortable' => TRUE,
1645
+        'float' => TRUE,
1646 1646
     ),
1647 1647
     'filter' => array(
1648
-      'handler' => 'views_handler_filter_numeric'
1648
+        'handler' => 'views_handler_filter_numeric'
1649 1649
     ),
1650 1650
     'sort' => array(
1651
-      'handler' => 'views_handler_sort_numeric'
1651
+        'handler' => 'views_handler_sort_numeric'
1652 1652
     )
1653
-  );
1654
-  $data['host_app_version']['user_friendly_name'] = array(
1653
+    );
1654
+    $data['host_app_version']['user_friendly_name'] = array(
1655 1655
     'title' => bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1656 1656
     'help' => t('The user friendly name of the application.'),
1657 1657
     'field' => array(
1658
-      'handler' => 'views_handler_field',
1659
-      'click sortable' => TRUE
1658
+        'handler' => 'views_handler_field',
1659
+        'click sortable' => TRUE
1660 1660
     ),
1661 1661
     'filter' => array(
1662
-      'handler' => 'views_handler_filter_string'
1662
+        'handler' => 'views_handler_filter_string'
1663 1663
     ),
1664 1664
     'sort' => array(
1665
-      'handler' => 'views_handler_sort_string'
1665
+        'handler' => 'views_handler_sort_string'
1666 1666
     )
1667
-  );
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(
1681
+    return array(
1682 1682
     'info' => array(
1683
-      'path' => drupal_get_path('module', 'boincwork') . '/views',
1683
+        'path' => drupal_get_path('module', 'boincwork') . '/views',
1684 1684
     ),
1685 1685
     'handlers' => array(
1686
-      'views_handler_argument_boincuser_id' => array(
1686
+        'views_handler_argument_boincuser_id' => array(
1687 1687
         'parent' => 'views_handler_argument_numeric'
1688
-      ),
1689
-      'views_handler_field_boincwork_app_version_number' => array(
1688
+        ),
1689
+        'views_handler_field_boincwork_app_version_number' => array(
1690 1690
         'parent' => 'views_handler_field_numeric'
1691
-      ),
1692
-      'views_handler_field_boincwork_host_app_et_avg' => array(
1691
+        ),
1692
+        'views_handler_field_boincwork_host_app_et_avg' => array(
1693 1693
         'parent' => 'views_handler_field_numeric'
1694
-      ),
1695
-      'views_handler_field_boincwork_host_app_turnaround_avg' => array(
1694
+        ),
1695
+        'views_handler_field_boincwork_host_app_turnaround_avg' => array(
1696 1696
         'parent' => 'views_handler_field_numeric'
1697
-      ),
1697
+        ),
1698 1698
     )
1699
-  );
1699
+    );
1700 1700
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
   // Primary keys allowed as arguments
50 50
 
51 51
   $data['host']['id'] = array(
52
-    'title' => bts('Computer ID', array(), NULL, 'boinc:host-list'),
52
+    'title' => bts('Computer ID', array(), null, 'boinc:host-list'),
53 53
     'help' => t('The ID number of this host.'),
54 54
     'field' => array(
55 55
       'handler' => 'views_handler_field_numeric',
56
-      'click sortable' => TRUE
56
+      'click sortable' => true
57 57
     ),
58 58
     'argument' => array(
59 59
       'handler' => 'views_handler_argument',
60 60
       'name field' => 'title',
61
-      'numeric' => TRUE,
61
+      'numeric' => true,
62 62
       'validate type' => 'id'
63 63
     ),
64 64
     'filter' => array(
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
     )
70 70
   );
71 71
   $data['host']['venue'] = array(
72
-    'title' => bts('Location', array(), NULL, 'boinc:host-list'),
72
+    'title' => bts('Location', array(), null, 'boinc:host-list'),
73 73
     'help' => t('The name of the preference set assigned to this host.'),
74 74
     'field' => array(
75 75
       'handler' => 'views_handler_field',
76
-      'click sortable' => TRUE
76
+      'click sortable' => true
77 77
     ),
78 78
     'argument' => array(
79 79
       'handler' => 'views_handler_argument',
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
   // Foreign key fields
91 91
 
92 92
   $data['host']['userid'] = array(
93
-    'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
93
+    'title' => bts('User ID', array(), null, 'boinc:user-details'),
94 94
     'help' => t('The owner of this host.'),
95 95
     // Because this is a foreign key to the {user} table. This allows us to
96 96
     // have, when the view is configured with this relationship, all the fields
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     'argument' => array(
99 99
       'handler' => 'views_handler_argument_boincuser_id',
100 100
       'name field' => 'title',
101
-      'numeric' => TRUE,
101
+      'numeric' => true,
102 102
       'validate type' => 'id'
103 103
     ),
104 104
     'relationship' => array(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     ),
110 110
     'field' => array(
111 111
       'handler' => 'views_handler_field_numeric',
112
-      'click sortable' => TRUE
112
+      'click sortable' => true
113 113
     ),
114 114
     'filter' => array(
115 115
       'handler' => 'views_handler_filter_numeric'
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
   // Descriptions of general host fields (alphabetized)
123 123
 
124 124
   $data['host']['active_frac'] = array(
125
-    'title' => bts('While BOINC running, % of time work is allowed', array(), NULL, 'boinc:host-details'),
125
+    'title' => bts('While BOINC running, % of time work is allowed', array(), null, 'boinc:host-details'),
126 126
     'help' => t('The percentage of time that work is allowed.'),
127 127
     'field' => array(
128 128
       'handler' => 'views_handler_field_numeric',
129
-      'click sortable' => TRUE,
130
-      'float' => TRUE
129
+      'click sortable' => true,
130
+      'float' => true
131 131
     ),
132 132
     'filter' => array(
133 133
       'handler' => 'views_handler_filter_numeric'
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
     )
138 138
   );
139 139
   $data['host']['avg_turnaround'] = array(
140
-    'title' => bts('Average turnaround time', array(), NULL, 'boinc:host-details'),
140
+    'title' => bts('Average turnaround time', array(), null, 'boinc:host-details'),
141 141
     'help' => t('The average time required for work to be completed.'),
142 142
     'field' => array(
143 143
       'handler' => 'views_handler_field_numeric',
144
-      'click sortable' => TRUE,
145
-      'float' => TRUE
144
+      'click sortable' => true,
145
+      'float' => true
146 146
     ),
147 147
     'filter' => array(
148 148
       'handler' => 'views_handler_filter_numeric'
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
     )
153 153
   );
154 154
   $data['host']['create_time'] = array(
155
-    'title' => bts('Created', array(), NULL, 'boinc:host-details'),
155
+    'title' => bts('Created', array(), null, 'boinc:host-details'),
156 156
     'help' => t('The time the host record was created.'),
157 157
     'field' => array(
158 158
       'handler' => 'views_handler_field_date',
159
-      'click sortable' => TRUE
159
+      'click sortable' => true
160 160
     ),
161 161
     'filter' => array(
162 162
       'handler' => 'views_handler_filter_date'
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
     )
167 167
   );
168 168
   $data['host']['connected_frac'] = array(
169
-    'title' => bts('While BOINC running, % of time host has an Internet connection', array(), NULL, 'boinc:host-details'),
169
+    'title' => bts('While BOINC running, % of time host has an Internet connection', array(), null, 'boinc:host-details'),
170 170
     'help' => t('The percentage of time that the host has an Internet connection.'),
171 171
     'field' => array(
172 172
       'handler' => 'views_handler_field_numeric',
173
-      'click sortable' => TRUE,
174
-      'float' => TRUE
173
+      'click sortable' => true,
174
+      'float' => true
175 175
     ),
176 176
     'filter' => array(
177 177
       'handler' => 'views_handler_filter_numeric'
@@ -181,12 +181,12 @@  discard block
 block discarded – undo
181 181
     )
182 182
   );
183 183
   $data['host']['cpu_efficiency'] = array(
184
-    'title' => bts('Average CPU efficiency', array(), NULL, 'boinc:host-details'),
184
+    'title' => bts('Average CPU efficiency', array(), null, 'boinc:host-details'),
185 185
     'help' => t('The average efficiency of the host CPU.'),
186 186
     'field' => array(
187 187
       'handler' => 'views_handler_field_numeric',
188
-      'click sortable' => TRUE,
189
-      'float' => TRUE
188
+      'click sortable' => true,
189
+      'float' => true
190 190
     ),
191 191
     'filter' => array(
192 192
       'handler' => 'views_handler_filter_numeric'
@@ -196,11 +196,11 @@  discard block
 block discarded – undo
196 196
     )
197 197
   );
198 198
   $data['host']['d_free'] = array(
199
-    'title' => bts('Free disk space', array(), NULL, 'boinc:host-details'),
199
+    'title' => bts('Free disk space', array(), null, 'boinc:host-details'),
200 200
     'help' => t('The amount of disk space that is not in use.'),
201 201
     'field' => array(
202 202
       'handler' => 'views_handler_field_numeric',
203
-      'click sortable' => TRUE
203
+      'click sortable' => true
204 204
     ),
205 205
     'filter' => array(
206 206
       'handler' => 'views_handler_filter_numeric'
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
     )
211 211
   );
212 212
   $data['host']['d_total'] = array(
213
-    'title' => bts('Total disk space', array(), NULL, 'boinc:host-details'),
213
+    'title' => bts('Total disk space', array(), null, 'boinc:host-details'),
214 214
     'help' => t('The size of the disk on which BOINC is installed.'),
215 215
     'field' => array(
216 216
       'handler' => 'views_handler_field_numeric',
217
-      'click sortable' => TRUE
217
+      'click sortable' => true
218 218
     ),
219 219
     'filter' => array(
220 220
       'handler' => 'views_handler_filter_numeric'
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
     )
225 225
   );
226 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'),
227
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
228 228
     'help' => t('The name of the host.'),
229 229
     'field' => array(
230 230
       'handler' => 'views_handler_field',
231
-      'click sortable' => TRUE
231
+      'click sortable' => true
232 232
     ),
233 233
     'filter' => array(
234 234
       'handler' => 'views_handler_filter_string'
@@ -238,12 +238,12 @@  discard block
 block discarded – undo
238 238
     )
239 239
   );
240 240
   $data['host']['duration_correction_factor'] = array(
241
-    'title' => bts('Task duration correction factor', array(), NULL, 'boinc:host-details'),
241
+    'title' => bts('Task duration correction factor', array(), null, 'boinc:host-details'),
242 242
     'help' => t('Task duration correction factor.'),
243 243
     'field' => array(
244 244
       'handler' => 'views_handler_field_numeric',
245
-      'click sortable' => TRUE,
246
-      'float' => TRUE
245
+      'click sortable' => true,
246
+      'float' => true
247 247
     ),
248 248
     'filter' => array(
249 249
       'handler' => 'views_handler_filter_numeric'
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
     )
254 254
   );
255 255
   $data['host']['expavg_credit'] = array(
256
-    'title' => bts('Avg. credit', array(), NULL, 'boinc:host-details'),
256
+    'title' => bts('Avg. credit', array(), null, 'boinc:host-details'),
257 257
     'help' => t('A decaying average of credit per day.'),
258 258
     'field' => array(
259 259
       'handler' => 'views_handler_field_numeric',
260
-      'click sortable' => TRUE,
261
-      'float' => TRUE
260
+      'click sortable' => true,
261
+      'float' => true
262 262
     ),
263 263
     'filter' => array(
264 264
       'handler' => 'views_handler_filter_numeric'
@@ -268,11 +268,11 @@  discard block
 block discarded – undo
268 268
     )
269 269
   );
270 270
   $data['host']['external_ip_addr'] = array(
271
-    'title' => bts('External IP address', array(), NULL, 'boinc:host-details'),
271
+    'title' => bts('External IP address', array(), null, 'boinc:host-details'),
272 272
     'help' => t('The IP address from which the host last communicated.'),
273 273
     'field' => array(
274 274
       'handler' => 'views_handler_field',
275
-      'click sortable' => TRUE
275
+      'click sortable' => true
276 276
     ),
277 277
     'filter' => array(
278 278
       'handler' => 'views_handler_filter_string'
@@ -282,11 +282,11 @@  discard block
 block discarded – undo
282 282
     )
283 283
   );
284 284
   $data['host']['host_cpid'] = array(
285
-    'title' => bts('Cross project ID', array(), NULL, 'boinc:host-details'),
285
+    'title' => bts('Cross project ID', array(), null, 'boinc:host-details'),
286 286
     'help' => t('The consistent identifier of the host across projects.'),
287 287
     'field' => array(
288 288
       'handler' => 'views_handler_field',
289
-      'click sortable' => TRUE
289
+      'click sortable' => true
290 290
     ),
291 291
     'filter' => array(
292 292
       'handler' => 'views_handler_filter_string'
@@ -296,11 +296,11 @@  discard block
 block discarded – undo
296 296
     )
297 297
   );
298 298
   $data['host']['last_ip_addr'] = array(
299
-    'title' => bts('Last IP address', array(), NULL, 'boinc:host-details'),
299
+    'title' => bts('Last IP address', array(), null, 'boinc:host-details'),
300 300
     'help' => t('The IP address of the host at last communication.'),
301 301
     'field' => array(
302 302
       'handler' => 'views_handler_field',
303
-      'click sortable' => TRUE
303
+      'click sortable' => true
304 304
     ),
305 305
     'filter' => array(
306 306
       'handler' => 'views_handler_filter_string'
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
     )
311 311
   );
312 312
   $data['host']['m_cache'] = array(
313
-    'title' => bts('Cache', array(), NULL, 'boinc:host-details'),
313
+    'title' => bts('Cache', array(), null, 'boinc:host-details'),
314 314
     'help' => t('The amount of cache on the processor(s).'),
315 315
     'field' => array(
316 316
       'handler' => 'views_handler_field_numeric',
317
-      'click sortable' => TRUE
317
+      'click sortable' => true
318 318
     ),
319 319
     'filter' => array(
320 320
       'handler' => 'views_handler_filter_numeric'
@@ -324,11 +324,11 @@  discard block
 block discarded – undo
324 324
     )
325 325
   );
326 326
   $data['host']['m_nbytes'] = array(
327
-    'title' => bts('Memory', array(), NULL, 'boinc:host-details'),
327
+    'title' => bts('Memory', array(), null, 'boinc:host-details'),
328 328
     'help' => t('The amount of memory installed.'),
329 329
     'field' => array(
330 330
       'handler' => 'views_handler_field_numeric',
331
-      'click sortable' => TRUE
331
+      'click sortable' => true
332 332
     ),
333 333
     'filter' => array(
334 334
       'handler' => 'views_handler_filter_numeric'
@@ -338,11 +338,11 @@  discard block
 block discarded – undo
338 338
     )
339 339
   );
340 340
   $data['host']['m_swap'] = array(
341
-    'title' => bts('Swap space', array(), NULL, 'boinc:host-details'),
341
+    'title' => bts('Swap space', array(), null, 'boinc:host-details'),
342 342
     'help' => t('The amount of swap space configured.'),
343 343
     'field' => array(
344 344
       'handler' => 'views_handler_field_numeric',
345
-      'click sortable' => TRUE
345
+      'click sortable' => true
346 346
     ),
347 347
     'filter' => array(
348 348
       'handler' => 'views_handler_filter_numeric'
@@ -352,11 +352,11 @@  discard block
 block discarded – undo
352 352
     )
353 353
   );
354 354
   $data['host']['max_results_day'] = array(
355
-    'title' => bts('Maximum daily WU quota per CPU', array(), NULL, 'boinc:host-details'),
355
+    'title' => bts('Maximum daily WU quota per CPU', array(), null, 'boinc:host-details'),
356 356
     'help' => t('The maximum number of workunits to be allocated per CPU.'),
357 357
     'field' => array(
358 358
       'handler' => 'views_handler_field_numeric',
359
-      'click sortable' => TRUE
359
+      'click sortable' => true
360 360
     ),
361 361
     'filter' => array(
362 362
       'handler' => 'views_handler_filter_numeric'
@@ -366,12 +366,12 @@  discard block
 block discarded – undo
366 366
     )
367 367
   );
368 368
   $data['host']['n_bwdown'] = array(
369
-    'title' => bts('Average download rate', array(), NULL, 'boinc:host-details'),
369
+    'title' => bts('Average download rate', array(), null, 'boinc:host-details'),
370 370
     'help' => t('The average rate at which new work is downloaded.'),
371 371
     'field' => array(
372 372
       'handler' => 'views_handler_field_numeric',
373
-      'click sortable' => TRUE,
374
-      'float' => TRUE
373
+      'click sortable' => true,
374
+      'float' => true
375 375
     ),
376 376
     'filter' => array(
377 377
       'handler' => 'views_handler_filter_numeric'
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
     )
382 382
   );
383 383
   $data['host']['n_bwup'] = array(
384
-    'title' => bts('Average upload rate', array(), NULL, 'boinc:host-details'),
384
+    'title' => bts('Average upload rate', array(), null, 'boinc:host-details'),
385 385
     'help' => t('The average rate at which completed work is uploaded.'),
386 386
     'field' => array(
387 387
       'handler' => 'views_handler_field_numeric',
388
-      'click sortable' => TRUE,
389
-      'float' => TRUE
388
+      'click sortable' => true,
389
+      'float' => true
390 390
     ),
391 391
     'filter' => array(
392 392
       'handler' => 'views_handler_filter_numeric'
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
     )
397 397
   );
398 398
   $data['host']['nsame_ip_addr'] = array(
399
-    'title' => bts('Same IP address count', array(), NULL, 'boinc:host-details'),
399
+    'title' => bts('Same IP address count', array(), null, 'boinc:host-details'),
400 400
     'help' => t('The number of times the last IP address.'),
401 401
     'field' => array(
402 402
       'handler' => 'views_handler_field',
403
-      'click sortable' => TRUE
403
+      'click sortable' => true
404 404
     ),
405 405
     'filter' => array(
406 406
       'handler' => 'views_handler_filter_string'
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
     )
411 411
   );
412 412
   $data['host']['on_frac'] = array(
413
-    'title' => bts('% of time BOINC client is running', array(), NULL, 'boinc:host-details'),
413
+    'title' => bts('% of time BOINC client is running', array(), null, 'boinc:host-details'),
414 414
     'help' => t('The percentage of time that the BOINC client is running.'),
415 415
     'field' => array(
416 416
       'handler' => 'views_handler_field_numeric',
417
-      'click sortable' => TRUE,
418
-      'float' => TRUE
417
+      'click sortable' => true,
418
+      'float' => true
419 419
     ),
420 420
     'filter' => array(
421 421
       'handler' => 'views_handler_filter_numeric'
@@ -425,11 +425,11 @@  discard block
 block discarded – undo
425 425
     )
426 426
   );
427 427
   $data['host']['os_name'] = array(
428
-    'title' => bts('Operating system', array(), NULL, 'boinc:host-details'),
428
+    'title' => bts('Operating system', array(), null, 'boinc:host-details'),
429 429
     'help' => t('The name of the host operating system.'),
430 430
     'field' => array(
431 431
       'handler' => 'views_handler_field',
432
-      'click sortable' => TRUE
432
+      'click sortable' => true
433 433
     ),
434 434
     'filter' => array(
435 435
       'handler' => 'views_handler_filter_string'
@@ -439,11 +439,11 @@  discard block
 block discarded – undo
439 439
     )
440 440
   );
441 441
   $data['host']['os_version'] = array(
442
-    'title' => bts('Operating system version', array(), NULL, 'boinc:host-details'),
442
+    'title' => bts('Operating system version', array(), null, 'boinc:host-details'),
443 443
     'help' => t('The version of the host operating system.'),
444 444
     'field' => array(
445 445
       'handler' => 'views_handler_field',
446
-      'click sortable' => TRUE
446
+      'click sortable' => true
447 447
     ),
448 448
     'filter' => array(
449 449
       'handler' => 'views_handler_filter_string'
@@ -453,12 +453,12 @@  discard block
 block discarded – undo
453 453
     )
454 454
   );
455 455
   $data['host']['p_fpops'] = array(
456
-    'title' => bts('Measured floating point speed', array(), NULL, 'boinc:host-details'),
456
+    'title' => bts('Measured floating point speed', array(), null, 'boinc:host-details'),
457 457
     'help' => t('The capability of the host in floating point operations per second.'),
458 458
     'field' => array(
459 459
       'handler' => 'views_handler_field_numeric',
460
-      'click sortable' => TRUE,
461
-      'float' => TRUE
460
+      'click sortable' => true,
461
+      'float' => true
462 462
     ),
463 463
     'filter' => array(
464 464
       'handler' => 'views_handler_filter_numeric'
@@ -468,12 +468,12 @@  discard block
 block discarded – undo
468 468
     )
469 469
   );
470 470
   $data['host']['p_iops'] = array(
471
-    'title' => bts('Measured integer speed', array(), NULL, 'boinc:host-details'),
471
+    'title' => bts('Measured integer speed', array(), null, 'boinc:host-details'),
472 472
     'help' => t('The capability of the host in integer operations per second.'),
473 473
     'field' => array(
474 474
       'handler' => 'views_handler_field_numeric',
475
-      'click sortable' => TRUE,
476
-      'float' => TRUE
475
+      'click sortable' => true,
476
+      'float' => true
477 477
     ),
478 478
     'filter' => array(
479 479
       'handler' => 'views_handler_filter_numeric'
@@ -483,11 +483,11 @@  discard block
 block discarded – undo
483 483
     )
484 484
   );
485 485
   $data['host']['p_model'] = array(
486
-    'title' => bts('CPU model', array(), NULL, 'boinc:host-details'),
486
+    'title' => bts('CPU model', array(), null, 'boinc:host-details'),
487 487
     'help' => t('The model of the CPU in the host.'),
488 488
     'field' => array(
489 489
       'handler' => 'views_handler_field',
490
-      'click sortable' => TRUE
490
+      'click sortable' => true
491 491
     ),
492 492
     'filter' => array(
493 493
       'handler' => 'views_handler_filter_string'
@@ -497,11 +497,11 @@  discard block
 block discarded – undo
497 497
     )
498 498
   );
499 499
   $data['host']['p_ncpus'] = array(
500
-    'title' => bts('Number of processors', array(), NULL, 'boinc:host-details'),
500
+    'title' => bts('Number of processors', array(), null, 'boinc:host-details'),
501 501
     'help' => t('The count of CPU cores in the system.'),
502 502
     'field' => array(
503 503
       'handler' => 'views_handler_field',
504
-      'click sortable' => TRUE
504
+      'click sortable' => true
505 505
     ),
506 506
     'filter' => array(
507 507
       'handler' => 'views_handler_filter_string'
@@ -511,11 +511,11 @@  discard block
 block discarded – undo
511 511
     )
512 512
   );
513 513
   $data['host']['p_vendor'] = array(
514
-    'title' => bts('CPU', array(), NULL, 'boinc:host-details'),
514
+    'title' => bts('CPU', array(), null, 'boinc:host-details'),
515 515
     'help' => t('The manufacturer of the CPU in the host.'),
516 516
     'field' => array(
517 517
       'handler' => 'views_handler_field',
518
-      'click sortable' => TRUE
518
+      'click sortable' => true
519 519
     ),
520 520
     'filter' => array(
521 521
       'handler' => 'views_handler_filter_string'
@@ -525,11 +525,11 @@  discard block
 block discarded – undo
525 525
     )
526 526
   );
527 527
   $data['host']['rpc_seqno'] = array(
528
-    'title' => bts('Number of times client has contacted server', array(), NULL, 'boinc:host-details'),
528
+    'title' => bts('Number of times client has contacted server', array(), null, 'boinc:host-details'),
529 529
     'help' => t('The number of times the client has contacted the server.'),
530 530
     'field' => array(
531 531
       'handler' => 'views_handler_field_numeric',
532
-      'click sortable' => TRUE
532
+      'click sortable' => true
533 533
     ),
534 534
     'filter' => array(
535 535
       'handler' => 'views_handler_filter_numeric'
@@ -539,11 +539,11 @@  discard block
 block discarded – undo
539 539
     )
540 540
   );
541 541
   $data['host']['rpc_time'] = array(
542
-    'title' => bts('Last contact', array(), NULL, 'boinc:host-details'),
542
+    'title' => bts('Last contact', array(), null, 'boinc:host-details'),
543 543
     'help' => t('The time of the last RPC contact with the host.'),
544 544
     'field' => array(
545 545
       'handler' => 'views_handler_field_date',
546
-      'click sortable' => TRUE
546
+      'click sortable' => true
547 547
     ),
548 548
     'filter' => array(
549 549
       'handler' => 'views_handler_filter_date'
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
     )
554 554
   );
555 555
   $data['host']['serialnum'] = array(
556
-    'title' => bts('Serial number', array(), NULL, 'boinc:host-details'),
556
+    'title' => bts('Serial number', array(), null, 'boinc:host-details'),
557 557
     'help' => t('Contains the release number of the BOINC application in use and the GPU of the host.'),
558 558
     'field' => array(
559 559
       'handler' => 'views_handler_field',
560
-      'click sortable' => TRUE
560
+      'click sortable' => true
561 561
     ),
562 562
     'filter' => array(
563 563
       'handler' => 'views_handler_filter_string'
@@ -567,11 +567,11 @@  discard block
 block discarded – undo
567 567
     )
568 568
   );
569 569
   $data['host']['timezone'] = array(
570
-    'title' => bts('Timezone', array(), NULL, 'boinc:host-details'),
570
+    'title' => bts('Timezone', array(), null, 'boinc:host-details'),
571 571
     'help' => t('The UTC offset of the local time.'),
572 572
     'field' => array(
573 573
       'handler' => 'views_handler_field_numeric',
574
-      'click sortable' => TRUE
574
+      'click sortable' => true
575 575
     ),
576 576
     'filter' => array(
577 577
       'handler' => 'views_handler_filter_numeric'
@@ -581,12 +581,12 @@  discard block
 block discarded – undo
581 581
     )
582 582
   );
583 583
   $data['host']['total_credit'] = array(
584
-    'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
584
+    'title' => bts('Total credit', array(), null, 'boinc:user-or-team-total-credits'),
585 585
     'help' => t('The total accumulated BOINC credit for a host.'),
586 586
     'field' => array(
587 587
       'handler' => 'views_handler_field_numeric',
588
-      'click sortable' => TRUE,
589
-      'float' => TRUE
588
+      'click sortable' => true,
589
+      'float' => true
590 590
     ),
591 591
     'filter' => array(
592 592
       'handler' => 'views_handler_filter_numeric'
@@ -611,16 +611,16 @@  discard block
 block discarded – undo
611 611
   // Primary keys allowed as arguments
612 612
 
613 613
   $data['platform']['id'] = array(
614
-    'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
614
+    'title' => bts('Platform ID', array(), null, 'boinc:platform-details'),
615 615
     'help' => t('The ID number of the platform.'),
616 616
     'field' => array(
617 617
       'handler' => 'views_handler_field_numeric',
618
-      'click sortable' => TRUE
618
+      'click sortable' => true
619 619
     ),
620 620
     'argument' => array(
621 621
       'handler' => 'views_handler_argument',
622 622
       'name field' => 'title',
623
-      'numeric' => TRUE,
623
+      'numeric' => true,
624 624
       'validate type' => 'id'
625 625
     ),
626 626
     'filter' => array(
@@ -634,11 +634,11 @@  discard block
 block discarded – undo
634 634
   // Descriptions of app fields (alphabetized)
635 635
 
636 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'),
637
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
638 638
     'help' => t('The name of the platform.'),
639 639
     'field' => array(
640 640
       'handler' => 'views_handler_field',
641
-      'click sortable' => TRUE
641
+      'click sortable' => true
642 642
     ),
643 643
     'filter' => array(
644 644
       'handler' => 'views_handler_filter_string'
@@ -680,16 +680,16 @@  discard block
 block discarded – undo
680 680
   // Primary keys allowed as arguments
681 681
 
682 682
   $data['result']['id'] = array(
683
-    'title' => bts('Task ID', array(), NULL, 'boinc:task-details'),
683
+    'title' => bts('Task ID', array(), null, 'boinc:task-details'),
684 684
     'help' => t('The ID number of this result.'),
685 685
     'field' => array(
686 686
       'handler' => 'views_handler_field_numeric',
687
-      'click sortable' => TRUE
687
+      'click sortable' => true
688 688
     ),
689 689
     'argument' => array(
690 690
       'handler' => 'views_handler_argument',
691 691
       'name field' => 'title',
692
-      'numeric' => TRUE,
692
+      'numeric' => true,
693 693
       'validate type' => 'id'
694 694
     ),
695 695
     'filter' => array(
@@ -703,13 +703,13 @@  discard block
 block discarded – undo
703 703
   // Foreign key fields
704 704
 
705 705
   $data['result']['userid'] = array(
706
-    'title' => bts('User ID', array(), NULL, 'boinc:user-details'),
706
+    'title' => bts('User ID', array(), null, 'boinc:user-details'),
707 707
     'help' => t('The owner of this result.'),
708 708
     // Foreign key to the {user} table
709 709
     'argument' => array(
710 710
       'handler' => 'views_handler_argument_boincuser_id',
711 711
       'name field' => 'title',
712
-      'numeric' => TRUE,
712
+      'numeric' => true,
713 713
       'validate type' => 'id'
714 714
     ),
715 715
     'relationship' => array(
@@ -720,13 +720,13 @@  discard block
 block discarded – undo
720 720
     )
721 721
   );
722 722
   $data['result']['workunitid'] = array(
723
-    'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
723
+    'title' => bts('Workunit ID', array(), null, 'boinc:workunit-details'),
724 724
     'help' => t('The workunit associated with this result.'),
725 725
     // Foreign key to the {workunit} table
726 726
     'argument' => array(
727 727
       'handler' => 'views_handler_argument',
728 728
       'name field' => 'title',
729
-      'numeric' => TRUE,
729
+      'numeric' => true,
730 730
       'validate type' => 'id'
731 731
     ),
732 732
     'relationship' => array(
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
     ),
738 738
     'field' => array(
739 739
       'handler' => 'views_handler_field_numeric',
740
-      'click sortable' => TRUE
740
+      'click sortable' => true
741 741
     ),
742 742
     'filter' => array(
743 743
       'handler' => 'views_handler_filter_numeric'
@@ -747,13 +747,13 @@  discard block
 block discarded – undo
747 747
     )
748 748
   );
749 749
   $data['result']['hostid'] = array(
750
-    'title' => bts('Host ID', array(), NULL, 'boinc:task-details'),
750
+    'title' => bts('Host ID', array(), null, 'boinc:task-details'),
751 751
     'help' => t('The host associated with this result.'),
752 752
     // Foreign key to the {host} table
753 753
     'argument' => array(
754 754
       'handler' => 'views_handler_argument',
755 755
       'name field' => 'title',
756
-      'numeric' => TRUE,
756
+      'numeric' => true,
757 757
       'validate type' => 'id'
758 758
     ),
759 759
     'relationship' => array(
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
     ),
765 765
     'field' => array(
766 766
       'handler' => 'views_handler_field_numeric',
767
-      'click sortable' => TRUE
767
+      'click sortable' => true
768 768
     ),
769 769
     'filter' => array(
770 770
       'handler' => 'views_handler_filter_numeric'
@@ -777,11 +777,11 @@  discard block
 block discarded – undo
777 777
   // Descriptions of result fields (alphabetized)
778 778
 
779 779
   $data['result']['appid'] = array(
780
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
780
+    'title' => bts('Application ID', array(), null, 'boinc:application-details'),
781 781
     'help' => t('The ID number of the application.'),
782 782
     'field' => array(
783 783
       'handler' => 'views_handler_field_numeric',
784
-      'click sortable' => TRUE
784
+      'click sortable' => true
785 785
     ),
786 786
     'filter' => array(
787 787
       'handler' => 'views_handler_filter_numeric'
@@ -791,11 +791,11 @@  discard block
 block discarded – undo
791 791
     )
792 792
   );
793 793
   $data['result']['app_version_id'] = array(
794
-    'title' => bts('Application version', array(), NULL, 'boinc:task-details'),
794
+    'title' => bts('Application version', array(), null, 'boinc:task-details'),
795 795
     'help' => t('The version number of the application.'),
796 796
     'field' => array(
797 797
       'handler' => 'views_handler_field_numeric',
798
-      'click sortable' => TRUE
798
+      'click sortable' => true
799 799
     ),
800 800
     'filter' => array(
801 801
       'handler' => 'views_handler_filter_numeric'
@@ -805,12 +805,12 @@  discard block
 block discarded – undo
805 805
     )
806 806
   );
807 807
   $data['result']['claimed_credit'] = array(
808
-    'title' => bts('Claimed credit', array(), NULL, 'boinc:task-details'),
808
+    'title' => bts('Claimed credit', array(), null, 'boinc:task-details'),
809 809
     'help' => t('The credit claimed for this result.'),
810 810
     'field' => array(
811 811
       'handler' => 'views_handler_field_numeric',
812
-      'click sortable' => TRUE,
813
-      'float' => TRUE
812
+      'click sortable' => true,
813
+      'float' => true
814 814
     ),
815 815
     'filter' => array(
816 816
       'handler' => 'views_handler_filter_numeric'
@@ -820,11 +820,11 @@  discard block
 block discarded – undo
820 820
     )
821 821
   );
822 822
   $data['result']['client_state'] = array(
823
-    'title' => bts('Client state', array(), NULL, 'boinc:task-details'),
823
+    'title' => bts('Client state', array(), null, 'boinc:task-details'),
824 824
     'help' => t('The state of the task on the client side.'),
825 825
     'field' => array(
826 826
       'handler' => 'views_handler_field_numeric',
827
-      'click sortable' => TRUE
827
+      'click sortable' => true
828 828
     ),
829 829
     'filter' => array(
830 830
       'handler' => 'views_handler_filter_numeric'
@@ -834,12 +834,12 @@  discard block
 block discarded – undo
834 834
     )
835 835
   );
836 836
   $data['result']['cpu_time'] = array(
837
-    'title' => bts('CPU time', array(), NULL, 'boinc:task-details'),
837
+    'title' => bts('CPU time', array(), null, 'boinc:task-details'),
838 838
     'help' => t('The CPU time spent on the task.'),
839 839
     'field' => array(
840 840
       'handler' => 'views_handler_field_numeric',
841
-      'click sortable' => TRUE,
842
-      'float' => TRUE
841
+      'click sortable' => true,
842
+      'float' => true
843 843
     ),
844 844
     'filter' => array(
845 845
       'handler' => 'views_handler_filter_numeric'
@@ -849,11 +849,11 @@  discard block
 block discarded – undo
849 849
     )
850 850
   );
851 851
   $data['result']['create_time'] = array(
852
-    'title' => bts('Created', array(), NULL, 'boinc:task-details:-1:ignoreoverwrite'),
852
+    'title' => bts('Created', array(), null, 'boinc:task-details:-1:ignoreoverwrite'),
853 853
     'help' => t('The time that the task was created.'),
854 854
     'field' => array(
855 855
       'handler' => 'views_handler_field_date',
856
-      'click sortable' => TRUE
856
+      'click sortable' => true
857 857
     ),
858 858
     'filter' => array(
859 859
       'handler' => 'views_handler_filter_date'
@@ -863,12 +863,12 @@  discard block
 block discarded – undo
863 863
     )
864 864
   );
865 865
   $data['result']['elapsed_time'] = array(
866
-    'title' => bts('Run time', array(), NULL, 'boinc:task-details'),
866
+    'title' => bts('Run time', array(), null, 'boinc:task-details'),
867 867
     'help' => t('The run time of the task.'),
868 868
     'field' => array(
869 869
       'handler' => 'views_handler_field_numeric',
870
-      'click sortable' => TRUE,
871
-      'float' => TRUE
870
+      'click sortable' => true,
871
+      'float' => true
872 872
     ),
873 873
     'filter' => array(
874 874
       'handler' => 'views_handler_filter_numeric'
@@ -878,11 +878,11 @@  discard block
 block discarded – undo
878 878
     )
879 879
   );
880 880
   $data['result']['exit_status'] = array(
881
-    'title' => bts('Exit status', array(), NULL, 'boinc:task-details'),
881
+    'title' => bts('Exit status', array(), null, 'boinc:task-details'),
882 882
     'help' => t('The exit code of the task.'),
883 883
     'field' => array(
884 884
       'handler' => 'views_handler_field_numeric',
885
-      'click sortable' => TRUE
885
+      'click sortable' => true
886 886
     ),
887 887
     'filter' => array(
888 888
       'handler' => 'views_handler_filter_numeric'
@@ -892,12 +892,12 @@  discard block
 block discarded – undo
892 892
     )
893 893
   );
894 894
   $data['result']['granted_credit'] = array(
895
-    'title' => bts('Granted credit', array(), NULL, 'boinc:task-details'),
895
+    'title' => bts('Granted credit', array(), null, 'boinc:task-details'),
896 896
     'help' => t('The credit granted for this result.'),
897 897
     'field' => array(
898 898
       'handler' => 'views_handler_field_numeric',
899
-      'click sortable' => TRUE,
900
-      'float' => TRUE
899
+      'click sortable' => true,
900
+      'float' => true
901 901
     ),
902 902
     'filter' => array(
903 903
       'handler' => 'views_handler_filter_numeric'
@@ -907,11 +907,11 @@  discard block
 block discarded – undo
907 907
     )
908 908
   );
909 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'),
910
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
911 911
     'help' => t('The name of the task.'),
912 912
     'field' => array(
913 913
       'handler' => 'views_handler_field',
914
-      'click sortable' => TRUE
914
+      'click sortable' => true
915 915
     ),
916 916
     'filter' => array(
917 917
       'handler' => 'views_handler_filter_string'
@@ -921,11 +921,11 @@  discard block
 block discarded – undo
921 921
     )
922 922
   );
923 923
   $data['result']['outcome'] = array(
924
-    'title' => bts('Outcome', array(), NULL, 'boinc:task-details'),
924
+    'title' => bts('Outcome', array(), null, 'boinc:task-details'),
925 925
     'help' => t('The outcome of the task.'),
926 926
     'field' => array(
927 927
       'handler' => 'views_handler_field_numeric',
928
-      'click sortable' => TRUE
928
+      'click sortable' => true
929 929
     ),
930 930
     'filter' => array(
931 931
       'handler' => 'views_handler_filter_numeric'
@@ -935,11 +935,11 @@  discard block
 block discarded – undo
935 935
     )
936 936
   );
937 937
   $data['result']['received_time'] = array(
938
-    'title' => bts('Received time', array(), NULL, 'boinc:task-details'),
938
+    'title' => bts('Received time', array(), null, 'boinc:task-details'),
939 939
     'help' => t('The time that the result was received.'),
940 940
     'field' => array(
941 941
       'handler' => 'views_handler_field_date',
942
-      'click sortable' => TRUE
942
+      'click sortable' => true
943 943
     ),
944 944
     'filter' => array(
945 945
       'handler' => 'views_handler_filter_date'
@@ -949,11 +949,11 @@  discard block
 block discarded – undo
949 949
     )
950 950
   );
951 951
   $data['result']['report_deadline'] = array(
952
-    'title' => bts('Report deadline', array(), NULL, 'boinc:task-details'),
952
+    'title' => bts('Report deadline', array(), null, 'boinc:task-details'),
953 953
     'help' => t('The deadline for the task.'),
954 954
     'field' => array(
955 955
       'handler' => 'views_handler_field_date',
956
-      'click sortable' => TRUE
956
+      'click sortable' => true
957 957
     ),
958 958
     'filter' => array(
959 959
       'handler' => 'views_handler_filter_date'
@@ -963,11 +963,11 @@  discard block
 block discarded – undo
963 963
     )
964 964
   );
965 965
   $data['result']['sent_time'] = array(
966
-    'title' => bts('Sent', array(), NULL, 'boinc:task-details'),
966
+    'title' => bts('Sent', array(), null, 'boinc:task-details'),
967 967
     'help' => t('The time that the task was sent.'),
968 968
     'field' => array(
969 969
       'handler' => 'views_handler_field_date',
970
-      'click sortable' => TRUE
970
+      'click sortable' => true
971 971
     ),
972 972
     'filter' => array(
973 973
       'handler' => 'views_handler_filter_date'
@@ -977,11 +977,11 @@  discard block
 block discarded – undo
977 977
     )
978 978
   );
979 979
   $data['result']['server_state'] = array(
980
-    'title' => bts('Server state', array(), NULL, 'boinc:task-details'),
980
+    'title' => bts('Server state', array(), null, 'boinc:task-details'),
981 981
     'help' => t('The state of task on the server side.'),
982 982
     'field' => array(
983 983
       'handler' => 'views_handler_field_numeric',
984
-      'click sortable' => TRUE
984
+      'click sortable' => true
985 985
     ),
986 986
     'filter' => array(
987 987
       'handler' => 'views_handler_filter_numeric'
@@ -991,11 +991,11 @@  discard block
 block discarded – undo
991 991
     )
992 992
   );
993 993
   $data['result']['stderr_out'] = array(
994
-    'title' => bts('Stderr out', array(), NULL, 'boinc:task-details'),
994
+    'title' => bts('Stderr out', array(), null, 'boinc:task-details'),
995 995
     'help' => t('The output to standard error.'),
996 996
     'field' => array(
997 997
       'handler' => 'views_handler_field',
998
-      'click sortable' => TRUE
998
+      'click sortable' => true
999 999
     ),
1000 1000
     'filter' => array(
1001 1001
       'handler' => 'views_handler_filter_string'
@@ -1005,11 +1005,11 @@  discard block
 block discarded – undo
1005 1005
     )
1006 1006
   );
1007 1007
   $data['result']['validate_state'] = array(
1008
-    'title' => bts('Validation state', array(), NULL, 'boinc:task-details'),
1008
+    'title' => bts('Validation state', array(), null, 'boinc:task-details'),
1009 1009
     'help' => t('The state of validation of this result.'),
1010 1010
     'field' => array(
1011 1011
       'handler' => 'views_handler_field_numeric',
1012
-      'click sortable' => TRUE
1012
+      'click sortable' => true
1013 1013
     ),
1014 1014
     'filter' => array(
1015 1015
       'handler' => 'views_handler_filter_numeric'
@@ -1019,11 +1019,11 @@  discard block
 block discarded – undo
1019 1019
     )
1020 1020
   );
1021 1021
   $data['result']['peak_working_set_size'] = array(
1022
-    'title' => bts('Peak working set size', array(), NULL, 'boinc:task-details'),
1022
+    'title' => bts('Peak working set size', array(), null, 'boinc:task-details'),
1023 1023
     'help' => t('Peak working set size.'),
1024 1024
     'field' => array(
1025 1025
       'handler' => 'views_handler_field_numeric',
1026
-      'click sortable' => TRUE
1026
+      'click sortable' => true
1027 1027
     ),
1028 1028
     'filter' => array(
1029 1029
       'handler' => 'views_handler_filter_numeric'
@@ -1033,11 +1033,11 @@  discard block
 block discarded – undo
1033 1033
     )
1034 1034
   );
1035 1035
   $data['result']['peak_swap_size'] = array(
1036
-    'title' => bts('Peak swap size', array(), NULL, 'boinc:task-details'),
1036
+    'title' => bts('Peak swap size', array(), null, 'boinc:task-details'),
1037 1037
     'help' => t('Peak swap size.'),
1038 1038
     'field' => array(
1039 1039
       'handler' => 'views_handler_field_numeric',
1040
-      'click sortable' => TRUE
1040
+      'click sortable' => true
1041 1041
     ),
1042 1042
     'filter' => array(
1043 1043
       'handler' => 'views_handler_filter_numeric'
@@ -1047,11 +1047,11 @@  discard block
 block discarded – undo
1047 1047
     )
1048 1048
   );
1049 1049
     $data['result']['peak_disk_usage'] = array(
1050
-    'title' => bts('Peak disk usage', array(), NULL, 'boinc:task-details'),
1050
+    'title' => bts('Peak disk usage', array(), null, 'boinc:task-details'),
1051 1051
     'help' => t('Peak disk usage.'),
1052 1052
     'field' => array(
1053 1053
       'handler' => 'views_handler_field_numeric',
1054
-      'click sortable' => TRUE
1054
+      'click sortable' => true
1055 1055
     ),
1056 1056
     'filter' => array(
1057 1057
       'handler' => 'views_handler_filter_numeric'
@@ -1086,16 +1086,16 @@  discard block
 block discarded – undo
1086 1086
   // Primary keys allowed as arguments
1087 1087
 
1088 1088
   $data['workunit']['id'] = array(
1089
-    'title' => bts('Workunit ID', array(), NULL, 'boinc:workunit-details'),
1089
+    'title' => bts('Workunit ID', array(), null, 'boinc:workunit-details'),
1090 1090
     'help' => t('The ID number of this workunit.'),
1091 1091
     'field' => array(
1092 1092
       'handler' => 'views_handler_field_numeric',
1093
-      'click sortable' => TRUE
1093
+      'click sortable' => true
1094 1094
     ),
1095 1095
     'argument' => array(
1096 1096
       'handler' => 'views_handler_argument',
1097 1097
       'name field' => 'title',
1098
-      'numeric' => TRUE,
1098
+      'numeric' => true,
1099 1099
       'validate type' => 'id'
1100 1100
     ),
1101 1101
     'filter' => array(
@@ -1109,12 +1109,12 @@  discard block
 block discarded – undo
1109 1109
   // Foreign key fields
1110 1110
 
1111 1111
   $data['workunit']['appid'] = array(
1112
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1112
+    'title' => bts('Application ID', array(), null, 'boinc:application-details'),
1113 1113
     'help' => t('The application associated with this workunit.'),
1114 1114
     'argument' => array( // foreign key to the {app} table
1115 1115
       'handler' => 'views_handler_argument',
1116 1116
       'name field' => 'title',
1117
-      'numeric' => TRUE,
1117
+      'numeric' => true,
1118 1118
       'validate type' => 'id'
1119 1119
     ),
1120 1120
     'relationship' => array(
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
     ),
1126 1126
     'field' => array(
1127 1127
       'handler' => 'views_handler_field_numeric',
1128
-      'click sortable' => TRUE
1128
+      'click sortable' => true
1129 1129
     ),
1130 1130
     'filter' => array(
1131 1131
       'handler' => 'views_handler_filter_numeric'
@@ -1138,12 +1138,12 @@  discard block
 block discarded – undo
1138 1138
   // Descriptions of workunit fields (alphabetized)
1139 1139
 
1140 1140
   $data['workunit']['canonical_credit'] = array(
1141
-    'title' => bts('Canonical credit', array(), NULL, 'boinc:workunit-details'),
1141
+    'title' => bts('Canonical credit', array(), null, 'boinc:workunit-details'),
1142 1142
     'help' => t('The canonical credit of the workunit.'),
1143 1143
     'field' => array(
1144 1144
       'handler' => 'views_handler_field_numeric',
1145
-      'click sortable' => TRUE,
1146
-      'float' => TRUE
1145
+      'click sortable' => true,
1146
+      'float' => true
1147 1147
     ),
1148 1148
     'filter' => array(
1149 1149
       'handler' => 'views_handler_filter_numeric'
@@ -1153,11 +1153,11 @@  discard block
 block discarded – undo
1153 1153
     )
1154 1154
   );
1155 1155
   $data['workunit']['canonical_resultid'] = array(
1156
-    'title' => bts('Canonical result ID', array(), NULL, 'boinc:workunit-details'),
1156
+    'title' => bts('Canonical result ID', array(), null, 'boinc:workunit-details'),
1157 1157
     'help' => t('The ID of the canonical result associated with the workunit.'),
1158 1158
     'field' => array(
1159 1159
       'handler' => 'views_handler_field_numeric',
1160
-      'click sortable' => TRUE
1160
+      'click sortable' => true
1161 1161
     ),
1162 1162
     'filter' => array(
1163 1163
       'handler' => 'views_handler_filter_numeric'
@@ -1167,11 +1167,11 @@  discard block
 block discarded – undo
1167 1167
     )
1168 1168
   );
1169 1169
   $data['workunit']['create_time'] = array(
1170
-    'title' => bts('Created time', array(), NULL, 'boinc:workunit-details'),
1170
+    'title' => bts('Created time', array(), null, 'boinc:workunit-details'),
1171 1171
     'help' => t('The time that the workunit was created.'),
1172 1172
     'field' => array(
1173 1173
       'handler' => 'views_handler_field_date',
1174
-      'click sortable' => TRUE
1174
+      'click sortable' => true
1175 1175
     ),
1176 1176
     'filter' => array(
1177 1177
       'handler' => 'views_handler_filter_date'
@@ -1181,11 +1181,11 @@  discard block
 block discarded – undo
1181 1181
     )
1182 1182
   );
1183 1183
   $data['workunit']['error_mask'] = array(
1184
-    'title' => bts('Error mask', array(), NULL, 'boinc:workunit-details'),
1184
+    'title' => bts('Error mask', array(), null, 'boinc:workunit-details'),
1185 1185
     'help' => t('Error mask of the workunit.'),
1186 1186
     'field' => array(
1187 1187
       'handler' => 'views_handler_field_numeric',
1188
-      'click sortable' => TRUE
1188
+      'click sortable' => true
1189 1189
     ),
1190 1190
     'filter' => array(
1191 1191
       'handler' => 'views_handler_filter_numeric'
@@ -1195,11 +1195,11 @@  discard block
 block discarded – undo
1195 1195
     )
1196 1196
   );
1197 1197
   $data['workunit']['min_quorum'] = array(
1198
-    'title' => bts('Minimum quorum', array(), NULL, 'boinc:workunit-details'),
1198
+    'title' => bts('Minimum quorum', array(), null, 'boinc:workunit-details'),
1199 1199
     'help' => t('Minimum quorum of the workunit.'),
1200 1200
     'field' => array(
1201 1201
       'handler' => 'views_handler_field_numeric',
1202
-      'click sortable' => TRUE
1202
+      'click sortable' => true
1203 1203
     ),
1204 1204
     'filter' => array(
1205 1205
       'handler' => 'views_handler_filter_numeric'
@@ -1209,11 +1209,11 @@  discard block
 block discarded – undo
1209 1209
     )
1210 1210
   );
1211 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'),
1212
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreovewrite'),
1213 1213
     'help' => t('The name of the workunit.'),
1214 1214
     'field' => array(
1215 1215
       'handler' => 'views_handler_field',
1216
-      'click sortable' => TRUE
1216
+      'click sortable' => true
1217 1217
     ),
1218 1218
     'filter' => array(
1219 1219
       'handler' => 'views_handler_filter_string'
@@ -1223,11 +1223,11 @@  discard block
 block discarded – undo
1223 1223
     )
1224 1224
   );
1225 1225
   $data['workunit']['max_error_results'] = array(
1226
-    'title' => bts('Max error tasks', array(), NULL, 'boinc:workunit-details'),
1226
+    'title' => bts('Max error tasks', array(), null, 'boinc:workunit-details'),
1227 1227
     'help' => t('The maximum number of error tasks in the workunit.'),
1228 1228
     'field' => array(
1229 1229
       'handler' => 'views_handler_field_numeric',
1230
-      'click sortable' => TRUE
1230
+      'click sortable' => true
1231 1231
     ),
1232 1232
     'filter' => array(
1233 1233
       'handler' => 'views_handler_filter_numeric'
@@ -1237,11 +1237,11 @@  discard block
 block discarded – undo
1237 1237
     )
1238 1238
   );
1239 1239
   $data['workunit']['max_success_results'] = array(
1240
-    'title' => bts('Max success tasks', array(), NULL, 'boinc:workunit-details'),
1240
+    'title' => bts('Max success tasks', array(), null, 'boinc:workunit-details'),
1241 1241
     'help' => t('The maximum number of successful tasks in the workunit.'),
1242 1242
     'field' => array(
1243 1243
       'handler' => 'views_handler_field_numeric',
1244
-      'click sortable' => TRUE
1244
+      'click sortable' => true
1245 1245
     ),
1246 1246
     'filter' => array(
1247 1247
       'handler' => 'views_handler_filter_numeric'
@@ -1251,11 +1251,11 @@  discard block
 block discarded – undo
1251 1251
     )
1252 1252
   );
1253 1253
   $data['workunit']['max_total_results'] = array(
1254
-    'title' => bts('Max total tasks', array(), NULL, 'boinc:workunit-details'),
1254
+    'title' => bts('Max total tasks', array(), null, 'boinc:workunit-details'),
1255 1255
     'help' => t('The maximum number of total tasks in the workunit.'),
1256 1256
     'field' => array(
1257 1257
       'handler' => 'views_handler_field_numeric',
1258
-      'click sortable' => TRUE
1258
+      'click sortable' => true
1259 1259
     ),
1260 1260
     'filter' => array(
1261 1261
       'handler' => 'views_handler_filter_numeric'
@@ -1265,11 +1265,11 @@  discard block
 block discarded – undo
1265 1265
     )
1266 1266
   );
1267 1267
   $data['workunit']['need_validate'] = array(
1268
-    'title' => bts('Needs validation', array(), NULL, 'boinc:workunit-details'),
1268
+    'title' => bts('Needs validation', array(), null, 'boinc:workunit-details'),
1269 1269
     'help' => t('Whether or not a workunit needs validation.'),
1270 1270
     'field' => array(
1271 1271
       'handler' => 'views_handler_field_numeric',
1272
-      'click sortable' => TRUE
1272
+      'click sortable' => true
1273 1273
     ),
1274 1274
     'filter' => array(
1275 1275
       'handler' => 'views_handler_filter_numeric'
@@ -1279,11 +1279,11 @@  discard block
 block discarded – undo
1279 1279
     )
1280 1280
   );
1281 1281
   $data['workunit']['target_nresults'] = array(
1282
-    'title' => bts('Initial replication', array(), NULL, 'boinc:workunit-details'),
1282
+    'title' => bts('Initial replication', array(), null, 'boinc:workunit-details'),
1283 1283
     'help' => t('The target number of results for the workunit.'),
1284 1284
     'field' => array(
1285 1285
       'handler' => 'views_handler_field_numeric',
1286
-      'click sortable' => TRUE
1286
+      'click sortable' => true
1287 1287
     ),
1288 1288
     'filter' => array(
1289 1289
       'handler' => 'views_handler_filter_numeric'
@@ -1308,16 +1308,16 @@  discard block
 block discarded – undo
1308 1308
   // Primary keys allowed as arguments
1309 1309
 
1310 1310
   $data['app']['id'] = array(
1311
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1311
+    'title' => bts('Application ID', array(), null, 'boinc:application-details'),
1312 1312
     'help' => t('The ID number of this application.'),
1313 1313
     'field' => array(
1314 1314
       'handler' => 'views_handler_field_numeric',
1315
-      'click sortable' => TRUE
1315
+      'click sortable' => true
1316 1316
     ),
1317 1317
     'argument' => array(
1318 1318
       'handler' => 'views_handler_argument',
1319 1319
       'name field' => 'title',
1320
-      'numeric' => TRUE,
1320
+      'numeric' => true,
1321 1321
       'validate type' => 'id'
1322 1322
     ),
1323 1323
     'filter' => array(
@@ -1331,11 +1331,11 @@  discard block
 block discarded – undo
1331 1331
   // Descriptions of app fields (alphabetized)
1332 1332
 
1333 1333
   $data['app']['target_nresults'] = array(
1334
-    'title' => bts('Target number of results', array(), NULL, 'boinc:application-details'),
1334
+    'title' => bts('Target number of results', array(), null, 'boinc:application-details'),
1335 1335
     'help' => t('The number of times to replicate tasks in this application.'),
1336 1336
     'field' => array(
1337 1337
       'handler' => 'views_handler_field_numeric',
1338
-      'click sortable' => TRUE
1338
+      'click sortable' => true
1339 1339
     ),
1340 1340
     'filter' => array(
1341 1341
       'handler' => 'views_handler_filter_numeric'
@@ -1345,11 +1345,11 @@  discard block
 block discarded – undo
1345 1345
     )
1346 1346
   );
1347 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'),
1348
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1349 1349
     'help' => t('The user friendly name of the application.'),
1350 1350
     'field' => array(
1351 1351
       'handler' => 'views_handler_field',
1352
-      'click sortable' => TRUE
1352
+      'click sortable' => true
1353 1353
     ),
1354 1354
     'filter' => array(
1355 1355
       'handler' => 'views_handler_filter_string'
@@ -1374,16 +1374,16 @@  discard block
 block discarded – undo
1374 1374
   // Primary keys allowed as arguments
1375 1375
 
1376 1376
   $data['app_version']['id'] = array(
1377
-    'title' => bts('Application version ID', array(), NULL, 'boinc:application-details'),
1377
+    'title' => bts('Application version ID', array(), null, 'boinc:application-details'),
1378 1378
     'help' => t('The ID number of this application version.'),
1379 1379
     'field' => array(
1380 1380
       'handler' => 'views_handler_field_numeric',
1381
-      'click sortable' => TRUE
1381
+      'click sortable' => true
1382 1382
     ),
1383 1383
     'argument' => array(
1384 1384
       'handler' => 'views_handler_argument',
1385 1385
       'name field' => 'title',
1386
-      'numeric' => TRUE,
1386
+      'numeric' => true,
1387 1387
       'validate type' => 'id'
1388 1388
     ),
1389 1389
     'filter' => array(
@@ -1397,7 +1397,7 @@  discard block
 block discarded – undo
1397 1397
   // Foreign key fields
1398 1398
 
1399 1399
   $data['app_version']['appid'] = array(
1400
-    'title' => bts('Application ID', array(), NULL, 'boinc:application-details'),
1400
+    'title' => bts('Application ID', array(), null, 'boinc:application-details'),
1401 1401
     'help' => t('The application ID associated with this app version.'),
1402 1402
     // Because this is a foreign key to the {app} table. This allows us to
1403 1403
     // have, when the view is configured with this relationship, all the fields
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
     'argument' => array(
1406 1406
       'handler' => 'views_handler_argument_numeric',
1407 1407
       'name field' => 'title',
1408
-      'numeric' => TRUE,
1408
+      'numeric' => true,
1409 1409
       'validate type' => 'id'
1410 1410
     ),
1411 1411
     'relationship' => array(
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
     ),
1417 1417
     'field' => array(
1418 1418
       'handler' => 'views_handler_field_numeric',
1419
-      'click sortable' => TRUE
1419
+      'click sortable' => true
1420 1420
     ),
1421 1421
     'filter' => array(
1422 1422
       'handler' => 'views_handler_filter_numeric'
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
   );
1428 1428
 
1429 1429
   $data['app_version']['platformid'] = array(
1430
-    'title' => bts('Platform ID', array(), NULL, 'boinc:platform-details'),
1430
+    'title' => bts('Platform ID', array(), null, 'boinc:platform-details'),
1431 1431
     'help' => t('The platform ID associated with this app version.'),
1432 1432
     // Because this is a foreign key to the {platform} table. This allows us to
1433 1433
     // have, when the view is configured with this relationship, all the fields
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
     'argument' => array(
1436 1436
       'handler' => 'views_handler_argument_numeric',
1437 1437
       'name field' => 'title',
1438
-      'numeric' => TRUE,
1438
+      'numeric' => true,
1439 1439
       'validate type' => 'id'
1440 1440
     ),
1441 1441
     'relationship' => array(
@@ -1446,7 +1446,7 @@  discard block
 block discarded – undo
1446 1446
     ),
1447 1447
     'field' => array(
1448 1448
       'handler' => 'views_handler_field_numeric',
1449
-      'click sortable' => TRUE
1449
+      'click sortable' => true
1450 1450
     ),
1451 1451
     'filter' => array(
1452 1452
       'handler' => 'views_handler_filter_numeric'
@@ -1459,11 +1459,11 @@  discard block
 block discarded – undo
1459 1459
   // Descriptions of app fields (alphabetized)
1460 1460
 
1461 1461
   $data['app_version']['plan_class'] = array(
1462
-    'title' => bts('Plan class', array(), NULL, 'boinc:application-details'),
1462
+    'title' => bts('Plan class', array(), null, 'boinc:application-details'),
1463 1463
     'help' => t('App version plan class.'),
1464 1464
     'field' => array(
1465 1465
       'handler' => 'views_handler_field',
1466
-      'click sortable' => TRUE
1466
+      'click sortable' => true
1467 1467
     ),
1468 1468
     'filter' => array(
1469 1469
       'handler' => 'views_handler_filter_string'
@@ -1473,12 +1473,12 @@  discard block
 block discarded – undo
1473 1473
     )
1474 1474
   );
1475 1475
   $data['app_version']['version_num'] = array(
1476
-    'title' => bts('Version number', array(), NULL, 'boinc:application-details'),
1476
+    'title' => bts('Version number', array(), null, 'boinc:application-details'),
1477 1477
     'help' => t('The application version number.'),
1478 1478
     'field' => array(
1479 1479
       'handler' => 'views_handler_field_boincwork_app_version_number',
1480
-      'click sortable' => TRUE,
1481
-      'float' => TRUE,
1480
+      'click sortable' => true,
1481
+      'float' => true,
1482 1482
     ),
1483 1483
     'filter' => array(
1484 1484
       'handler' => 'views_handler_filter_numeric'
@@ -1512,16 +1512,16 @@  discard block
 block discarded – undo
1512 1512
   // Primary keys allowed as arguments
1513 1513
 
1514 1514
   $data['host_app_version']['host_id'] = array(
1515
-    'title' => bts('Computer', array(), NULL, 'boinc:host-details'),
1515
+    'title' => bts('Computer', array(), null, 'boinc:host-details'),
1516 1516
     'help' => t('The host ID connected to this app version data.'),
1517 1517
     'field' => array(
1518 1518
       'handler' => 'views_handler_field_numeric',
1519
-      'click sortable' => TRUE
1519
+      'click sortable' => true
1520 1520
     ),
1521 1521
     'argument' => array(
1522 1522
       'handler' => 'views_handler_argument',
1523 1523
       'name field' => 'title',
1524
-      'numeric' => TRUE,
1524
+      'numeric' => true,
1525 1525
       'validate type' => 'id'
1526 1526
     ),
1527 1527
     'filter' => array(
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
   // Foreign key fields
1536 1536
 
1537 1537
   $data['host_app_version']['app_version_id'] = array(
1538
-    'title' => bts('App version ID', array(), NULL, 'boinc:application-details'),
1538
+    'title' => bts('App version ID', array(), null, 'boinc:application-details'),
1539 1539
     'help' => t('The app version ID connected to this host data.'),
1540 1540
     // Because this is a foreign key to the {host} table. This allows us to
1541 1541
     // have, when the view is configured with this relationship, all the fields
@@ -1543,7 +1543,7 @@  discard block
 block discarded – undo
1543 1543
     'argument' => array(
1544 1544
       'handler' => 'views_handler_argument_numeric',
1545 1545
       'name field' => 'title',
1546
-      'numeric' => TRUE,
1546
+      'numeric' => true,
1547 1547
       'validate type' => 'id'
1548 1548
     ),
1549 1549
     'relationship' => array(
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
     ),
1555 1555
     'field' => array(
1556 1556
       'handler' => 'views_handler_field_numeric',
1557
-      'click sortable' => TRUE
1557
+      'click sortable' => true
1558 1558
     ),
1559 1559
     'filter' => array(
1560 1560
       'handler' => 'views_handler_filter_numeric'
@@ -1567,11 +1567,11 @@  discard block
 block discarded – undo
1567 1567
   // Descriptions of host_app_version fields (alphabetized)
1568 1568
 
1569 1569
   $data['host_app_version']['consecutive_valid'] = array(
1570
-    'title' => bts('Consecutive valid tasks', array(), NULL, 'boinc:application-details'),
1570
+    'title' => bts('Consecutive valid tasks', array(), null, 'boinc:application-details'),
1571 1571
     'help' => t('The number of consecutive valid tasks for this app and by this host.'),
1572 1572
     'field' => array(
1573 1573
       'handler' => 'views_handler_field_numeric',
1574
-      'click sortable' => TRUE
1574
+      'click sortable' => true
1575 1575
     ),
1576 1576
     'filter' => array(
1577 1577
       'handler' => 'views_handler_filter_numeric'
@@ -1585,7 +1585,7 @@  discard block
 block discarded – undo
1585 1585
     'help' => t('The "et_avg" for this app and by this host.'),
1586 1586
     'field' => array(
1587 1587
       'handler' => 'views_handler_field_boincwork_host_app_et_avg',
1588
-      'click sortable' => TRUE
1588
+      'click sortable' => true
1589 1589
     ),
1590 1590
     'filter' => array(
1591 1591
       'handler' => 'views_handler_filter_numeric'
@@ -1595,11 +1595,11 @@  discard block
 block discarded – undo
1595 1595
     )
1596 1596
   );
1597 1597
   $data['host_app_version']['et_n'] = array(
1598
-    'title' => bts('Number of tasks completed', array(), NULL, 'boinc:application-details'),
1598
+    'title' => bts('Number of tasks completed', array(), null, 'boinc:application-details'),
1599 1599
     'help' => t('The tasks completed for this app and by this host.'),
1600 1600
     'field' => array(
1601 1601
       'handler' => 'views_handler_field_numeric',
1602
-      'click sortable' => TRUE
1602
+      'click sortable' => true
1603 1603
     ),
1604 1604
     'filter' => array(
1605 1605
       'handler' => 'views_handler_filter_numeric'
@@ -1609,11 +1609,11 @@  discard block
 block discarded – undo
1609 1609
     )
1610 1610
   );
1611 1611
   $data['host_app_version']['max_jobs_per_day'] = array(
1612
-    'title' => bts('Max tasks per day', array(), NULL, 'boinc:application-details'),
1612
+    'title' => bts('Max tasks per day', array(), null, 'boinc:application-details'),
1613 1613
     'help' => t('The maximum tasks per day for this app and by this host.'),
1614 1614
     'field' => array(
1615 1615
       'handler' => 'views_handler_field_numeric',
1616
-      'click sortable' => TRUE
1616
+      'click sortable' => true
1617 1617
     ),
1618 1618
     'filter' => array(
1619 1619
       'handler' => 'views_handler_filter_numeric'
@@ -1623,11 +1623,11 @@  discard block
 block discarded – undo
1623 1623
     )
1624 1624
   );
1625 1625
   $data['host_app_version']['n_jobs_today'] = array(
1626
-    'title' => bts('Number of tasks today', array(), NULL, 'boinc:application-details'),
1626
+    'title' => bts('Number of tasks today', array(), null, 'boinc:application-details'),
1627 1627
     'help' => t('The number of tasks today for this app and by this host.'),
1628 1628
     'field' => array(
1629 1629
       'handler' => 'views_handler_field_numeric',
1630
-      'click sortable' => TRUE
1630
+      'click sortable' => true
1631 1631
     ),
1632 1632
     'filter' => array(
1633 1633
       'handler' => 'views_handler_filter_numeric'
@@ -1637,12 +1637,12 @@  discard block
 block discarded – undo
1637 1637
     )
1638 1638
   );
1639 1639
   $data['host_app_version']['turnaround_avg'] = array(
1640
-    'title' => bts('Average turnaround time', array(), NULL, 'boinc:application-details:-1:ignoreoverwrite'),
1640
+    'title' => bts('Average turnaround time', array(), null, 'boinc:application-details:-1:ignoreoverwrite'),
1641 1641
     'help' => t('The average turnaround time per task for this app and by this host.'),
1642 1642
     'field' => array(
1643 1643
       'handler' => 'views_handler_field_boincwork_host_app_turnaround_avg',
1644
-      'click sortable' => TRUE,
1645
-      'float' => TRUE,
1644
+      'click sortable' => true,
1645
+      'float' => true,
1646 1646
     ),
1647 1647
     'filter' => array(
1648 1648
       'handler' => 'views_handler_filter_numeric'
@@ -1652,11 +1652,11 @@  discard block
 block discarded – undo
1652 1652
     )
1653 1653
   );
1654 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'),
1655
+    'title' => bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'),
1656 1656
     'help' => t('The user friendly name of the application.'),
1657 1657
     'field' => array(
1658 1658
       'handler' => 'views_handler_field',
1659
-      'click sortable' => TRUE
1659
+      'click sortable' => true
1660 1660
     ),
1661 1661
     'filter' => array(
1662 1662
       'handler' => 'views_handler_filter_string'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/boincwork.module 5 patches
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -180,12 +180,12 @@
 block discarded – undo
180 180
  */
181 181
 function boincwork_locale($op = 'groups', $group = NULL) {
182 182
   switch ($op) {
183
-    case 'groups':
184
-      return array('project' => bts('Project'));
185
-    case 'info':
186
-      $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
-      $info['project']['format'] = FALSE;
188
-      return $info;
183
+  case 'groups':
184
+    return array('project' => bts('Project'));
185
+  case 'info':
186
+    $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
+    $info['project']['format'] = FALSE;
188
+    return $info;
189 189
   }
190 190
 }
191 191
 
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
   $items['host/%/set-venue/%'] = array(
134 134
     'title' => 'Set host venue',
135 135
     'page callback' => 'boincwork_host_set_venue',
136
-    'page arguments' => array(1,3),
136
+    'page arguments' => array(1, 3),
137 137
     'access callback' => 'user_is_logged_in',
138 138
     'type' => MENU_CALLBACK,
139 139
   );
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     'title' => 'Account Tasks Table',
185 185
     'description' => '',
186 186
     'page callback' => 'boincwork_account_task_table',
187
-    'page arguments' => array(2,3),
187
+    'page arguments' => array(2, 3),
188 188
     'access arguments' => array('access content'),
189 189
     'type' => MENU_CALLBACK,
190 190
   );
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     'title' => 'Host Tasks Table',
193 193
     'description' => '',
194 194
     'page callback' => 'boincwork_host_task_table',
195
-    'page arguments' => array(1,3,4),
195
+    'page arguments' => array(1, 3, 4),
196 196
     'access arguments' => array('access content'),
197 197
     'type' => MENU_CALLBACK,
198 198
   );
@@ -276,15 +276,15 @@  discard block
 block discarded – undo
276 276
     if ($vars['message']['is_blocked']) {
277 277
       $vars['message_actions']['unignore_user'] = array(
278 278
         'title' => bts('Stop Ignoring User', array(), NULL, 'boinc:ignore-user-remove'),
279
-        'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
280
-        'query' => 'destination=messages/view/' . $thread_id,
279
+        'href' => 'account/prefs/privacy/ignore_user/remove/'.$author->uid,
280
+        'query' => 'destination=messages/view/'.$thread_id,
281 281
       );
282 282
     }
283 283
     else {
284 284
       $vars['message_actions']['ignore_user'] = array(
285 285
         'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
286
-        'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
287
-        'query' => 'destination=messages/view/' . $thread_id,
286
+        'href' => 'account/prefs/privacy/ignore_user/add/'.$author->uid,
287
+        'query' => 'destination=messages/view/'.$thread_id,
288 288
       );
289 289
     }
290 290
   }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
   // Delete expired hosts in the BOINC database, host_delete table.
298 298
   require_boinc('boinc_db');
299 299
   $num_deleted = BoincHostDeleted::delete_expired();
300
-  if ($num_deleted>0) {
300
+  if ($num_deleted > 0) {
301 301
     watchdog('boincwork', "Deleted ${num_deleted} hosts from host_deleted table", WATCHDOG_NOTICE);
302 302
   }
303 303
 }
@@ -344,10 +344,10 @@  discard block
 block discarded – undo
344 344
       drupal_prepare_form('boincwork_generalprefs_form', $prefs[$pref_set], $form_state);
345 345
     }
346 346
 
347
-    $output .= '<p>' . bts('These apply to all BOINC projects in which you participate.', array(), NULL, 'boinc:account-preferences-computing') . '<br/>';
348
-    $output .= bts('On computers attached to multiple projects, the most recently modified preferences will be used.', array(), NULL, 'boinc:account-preferences-computing') . '</p>';
349
-    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['prefs']['modified']['#value'])), NULL, 'boinc:account-preferences') . '</p>';
350
-    $output .= '<h2>' . bts('Combined preferences', array(), NULL, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing') . '</h2>';
347
+    $output .= '<p>'.bts('These apply to all BOINC projects in which you participate.', array(), NULL, 'boinc:account-preferences-computing').'<br/>';
348
+    $output .= bts('On computers attached to multiple projects, the most recently modified preferences will be used.', array(), NULL, 'boinc:account-preferences-computing').'</p>';
349
+    $output .= '<p>'.bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['prefs']['modified']['#value'])), NULL, 'boinc:account-preferences').'</p>';
350
+    $output .= '<h2>'.bts('Combined preferences', array(), NULL, 'boinc:account-preferences').' '.l('('.bts('Switch View', array(), NULL, 'boinc:account-preferences').')', 'account/prefs/computing').'</h2>';
351 351
     
352 352
     $output .= '<table class="preferences combined">';
353 353
     
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
       $output .= '<tr class="section-heading">';
358 358
       $output .= "<td>{$section['name']}</td>";
359 359
       foreach ($pref_sets as $pref_set) {
360
-        $output .= '<td>' . $pref_set . '</td>';
360
+        $output .= '<td>'.$pref_set.'</td>';
361 361
       }
362 362
       $output .= '</tr>';
363 363
       foreach ($section['elements'] as $name => $setting) {
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
               $second_pref = $special_map[$name];
406 406
               $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
407 407
               $second_value = isset($second_pref_setting['#options']) ? $second_pref_setting['#options'][$second_pref_setting['#default_value']] : $second_pref_setting['#default_value'];
408
-              $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
408
+              $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}".
409 409
                 " {$second_value} {$second_pref_setting['#field_suffix']} </td>";
410 410
             }
411 411
           }
412
-          else  {
412
+          else {
413 413
             $output .= '<td>---</td>';
414 414
           }
415 415
         }
@@ -437,12 +437,12 @@  discard block
 block discarded – undo
437 437
       );
438 438
       // Show Clear links for established preference sets
439 439
       if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
440
-        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$pref_set}",
440
+        $output .= ' </li><li class="tab"> '.l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$pref_set}",
441 441
           array(
442 442
             'query' => drupal_get_destination(),
443 443
             'attributes' => array(
444
-              'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
445
-                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-computing-preferences') . '\')'
444
+              'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
445
+                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-computing-preferences').'\')'
446 446
             )
447 447
           )
448 448
         );
@@ -468,8 +468,8 @@  discard block
 block discarded – undo
468 468
         "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
469 469
       );
470 470
       variable_set('jump_use_js_venues-Array', 1);
471
-      drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
472
-      drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
471
+      drupal_add_js(drupal_get_path('module', 'jump').'/jump.js');
472
+      drupal_add_js(drupal_get_path('theme', 'boinc').'/js/prefs.js', 'theme');
473 473
       
474 474
       $output .= '<div id="venue-selector" class="simple-form-controls">';
475 475
       $output .= '  <div class="form-item venue">';
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
     if (!$current_set['#established']) {
490 490
       drupal_set_message(bts(
491 491
           "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
492
-          array( '@venue' => $venue, ),
492
+          array('@venue' => $venue,),
493 493
           NULL, 'boinc:account-preferences'), 'status');
494 494
     }
495 495
     
@@ -548,8 +548,8 @@  discard block
 block discarded – undo
548 548
       drupal_prepare_form('boincwork_projectprefs_form', $prefs[$pref_set], $form_state);
549 549
     }
550 550
 
551
-    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['modified']['#value'])), NULL, 'boinc:account-preferences') . '</p>';
552
-    $output .= '<h2>' . bts('Combined preferences', array(), NULL, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project') . '</h2>';
551
+    $output .= '<p>'.bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['modified']['#value'])), NULL, 'boinc:account-preferences').'</p>';
552
+    $output .= '<h2>'.bts('Combined preferences', array(), NULL, 'boinc:account-preferences').' '.l('('.bts('Switch View', array(), NULL, 'boinc:account-preferences').')', 'account/prefs/project').'</h2>';
553 553
     
554 554
     $output .= '<table class="preferences combined">';
555 555
     
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
       $output .= '<tr class="section-heading">';
560 560
       $output .= "<td>{$section['name']}</td>";
561 561
       foreach ($pref_sets as $pref_set) {
562
-        $output .= '<td>' . $pref_set . '</td>';
562
+        $output .= '<td>'.$pref_set.'</td>';
563 563
       }
564 564
       $output .= '</tr>';
565 565
       foreach ($section['elements'] as $name => $setting) {
@@ -601,12 +601,12 @@  discard block
 block discarded – undo
601 601
       $output .= l($action_text, "account/prefs/project/edit/{$pref_set}");
602 602
       // Show Clear links for established preference sets
603 603
       if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
604
-        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$pref_set}",
604
+        $output .= ' </li><li class="tab"> '.l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$pref_set}",
605 605
           array(
606 606
             'query' => drupal_get_destination(),
607 607
             'attributes' => array(
608
-              'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
609
-                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-preferences-project') . '\')'
608
+              'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
609
+                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-preferences-project').'\')'
610 610
             )
611 611
           )
612 612
         );
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
     // Set this preference set as the one to use for any new hosts attached
623 623
     // to the user account
624 624
     boincwork_set_default_venue($venue);
625
-    drupal_set_message( bts('The primary preference set has been changed to "@set"', array('@set' => $venue), NULL, 'boinc:account-preferences-project') );
625
+    drupal_set_message(bts('The primary preference set has been changed to "@set"', array('@set' => $venue), NULL, 'boinc:account-preferences-project'));
626 626
     drupal_goto('account/prefs/project/combined');
627 627
     break;
628 628
     
@@ -641,8 +641,8 @@  discard block
 block discarded – undo
641 641
         "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
642 642
       );
643 643
       variable_set('jump_use_js_venues-Array', 1);
644
-      drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
645
-      drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
644
+      drupal_add_js(drupal_get_path('module', 'jump').'/jump.js');
645
+      drupal_add_js(drupal_get_path('theme', 'boinc').'/js/prefs.js', 'theme');
646 646
       
647 647
       $output .= '<div id="venue-selector" class="simple-form-controls">';
648 648
       $output .= '  <div class="form-item venue">';
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
     if (!$current_set['#established']) {
663 663
       drupal_set_message(bts(
664 664
           "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
665
-          array( '@venue' => $venue, ),
665
+          array('@venue' => $venue,),
666 666
           NULL, 'boinc:account-preferences'), 'status');
667 667
     }
668 668
     
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     // Edit preferences link
735 735
     $output .= '<tr>';
736 736
     $output .= '<td></td>';
737
-    $output .= '<td>' . l(bts('Edit privacy preferences', array('@project' => PROJECT), NULL, 'boinc:account-preferences-privacy'), "account/prefs/privacy/edit") . '</td>';
737
+    $output .= '<td>'.l(bts('Edit privacy preferences', array('@project' => PROJECT), NULL, 'boinc:account-preferences-privacy'), "account/prefs/privacy/edit").'</td>';
738 738
     $output .= '</tr>';
739 739
     
740 740
     $output .= '</table>';
@@ -769,15 +769,15 @@  discard block
 block discarded – undo
769 769
   switch ($type) {
770 770
   case 'all':
771 771
     //include_boinc('user/cert_all.php');
772
-    require_boinc(array('util','cert','user'));
772
+    require_boinc(array('util', 'cert', 'user'));
773 773
 
774 774
     $join = date('j F Y', $boincuser->create_time);
775 775
     $today = date('j F Y', time(0));
776 776
 
777
-    if ($border=="no") {
777
+    if ($border == "no") {
778 778
         $border = 0;
779 779
     } else {
780
-        $border=8;
780
+        $border = 8;
781 781
     }
782 782
 
783 783
     $title_font = "\"Optima,ZapfChancery\"";
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
         <tr><th align=left>Project</th><th align=left>Cobblestones</th><th align=left>Joined</th></tr>
822 822
     ";
823 823
     foreach ($boincuser->projects as $p) {
824
-        if ($p->total_credit<100) continue;
824
+        if ($p->total_credit < 100) continue;
825 825
         show_proj($p);
826 826
     }
827 827
     echo "
@@ -840,15 +840,15 @@  discard block
 block discarded – undo
840 840
   case 'account':
841 841
   default:
842 842
     //include_boinc('user/cert1.php');
843
-    require_boinc(array('util','cert'));
843
+    require_boinc(array('util', 'cert'));
844 844
 
845 845
     $join = date('j F Y', $boincuser->create_time);
846 846
     $today = date('j F Y', time(0));
847 847
 
848
-    if ($border=="no") {
848
+    if ($border == "no") {
849 849
         $border = 0;
850 850
     } else {
851
-        $border=8;
851
+        $border = 8;
852 852
     }
853 853
 
854 854
     $credit = credit_string($boincuser->total_credit, false);
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
 
1065 1065
   // If terms of use string exists and override is true, set terms-of-use
1066 1066
   // to Drupal varaible.
1067
-  if ( (!empty($termsofuse) && ($overrideboinctou)) ) {
1067
+  if ((!empty($termsofuse) && ($overrideboinctou))) {
1068 1068
     if (!empty($xml['project_config']['terms_of_use'])) {
1069 1069
       // Remove any existing terms of use
1070 1070
       unset($xml['project_config']['terms_of_use']);
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
  * Page callback for host task table
1112 1112
  */
1113 1113
 function boincwork_host_task_table($host_id = NULL, $tselect = NULL, $app_id = NULL) {
1114
-  require_boinc( array('util', 'result') );
1114
+  require_boinc(array('util', 'result'));
1115 1115
 
1116 1116
   $title = bts('Tasks for computer @host_id', array('@host_id' => $host_id), NULL, 'boinc:host-task-table');
1117 1117
   drupal_set_title($title);
Please login to merge, or discard this patch.
Indentation   +383 added lines, -383 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 // $Id$
3 3
 
4 4
 /**
5
-  * @file
6
-  * Enable BOINC features related to processing work and credit.
7
-  */
5
+ * @file
6
+ * Enable BOINC features related to processing work and credit.
7
+ */
8 8
 
9 9
 
10 10
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -21,70 +21,70 @@  discard block
 block discarded – undo
21 21
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
22 22
 
23 23
 /**
24
-  * Implementation of hook_menu().
25
-  */
24
+ * Implementation of hook_menu().
25
+ */
26 26
 function boincwork_menu() {
27
-  require_boinc('util');
28
-  $items['account/prefs'] = array(
27
+    require_boinc('util');
28
+    $items['account/prefs'] = array(
29 29
     'title' => 'Computing',
30 30
     'description' => '',
31 31
     'page callback' => 'generalprefs_page',
32 32
     'access callback' => 'user_is_logged_in',
33 33
     'type' => MENU_NORMAL_ITEM
34
-  );
35
-  $items['account/prefs/computing'] = array(
34
+    );
35
+    $items['account/prefs/computing'] = array(
36 36
     'title' => 'Computing',
37 37
     'page callback' => 'generalprefs_page',
38 38
     'access callback' => 'user_is_logged_in',
39 39
     'type' => MENU_DEFAULT_LOCAL_TASK,
40 40
     'weight' => 0
41
-  );
42
-  $items['account/prefs/project'] = array(
41
+    );
42
+    $items['account/prefs/project'] = array(
43 43
     'title' => 'Project',
44 44
     'page callback' => 'projectprefs_page',
45 45
     'access callback' => 'user_is_logged_in',
46 46
     'type' => MENU_LOCAL_TASK,
47 47
     'weight' => 5
48
-  );
49
-  $items['account/prefs/community'] = array(
48
+    );
49
+    $items['account/prefs/community'] = array(
50 50
     'title' => 'Community',
51 51
     'page callback' => 'communityprefs_page',
52 52
     'access callback' => 'user_is_logged_in',
53 53
     'type' => MENU_LOCAL_TASK,
54 54
     'weight' => 10
55
-  );
56
-  $items['account/prefs/privacy'] = array(
55
+    );
56
+    $items['account/prefs/privacy'] = array(
57 57
     'title' => 'Privacy',
58 58
     'page callback' => 'privacyprefs_page',
59 59
     'access callback' => 'user_is_logged_in',
60 60
     'type' => MENU_LOCAL_TASK,
61 61
     'weight' => 15
62
-  );
63
-  if (module_exists('ignore_user')) {
62
+    );
63
+    if (module_exists('ignore_user')) {
64 64
     $items['account/prefs/privacy/ignore_user/add'] = array(
65
-      'title' => 'Add from ignore list',
66
-      'description' => 'Add user that you with to ignore to your ignore list.',
67
-      'page callback' => 'boincwork_ignore_user_add_user',
68
-      'access callback' => 'user_access',
69
-      'access arguments' => array('ignore user'),
70
-      'type' => MENU_CALLBACK,
65
+        'title' => 'Add from ignore list',
66
+        'description' => 'Add user that you with to ignore to your ignore list.',
67
+        'page callback' => 'boincwork_ignore_user_add_user',
68
+        'access callback' => 'user_access',
69
+        'access arguments' => array('ignore user'),
70
+        'type' => MENU_CALLBACK,
71 71
     );
72 72
     $items['account/prefs/privacy/ignore_user/remove'] = array(
73
-      'title' => 'Remove from ignore list',
74
-      'description' => 'Remove user from your ignore list.',
75
-      'page callback' => 'boincwork_ignore_user_remove_user',
76
-      'access callback' => 'user_access',
77
-      'access arguments' => array('ignore user'),
78
-      'type' => MENU_CALLBACK,
73
+        'title' => 'Remove from ignore list',
74
+        'description' => 'Remove user from your ignore list.',
75
+        'page callback' => 'boincwork_ignore_user_remove_user',
76
+        'access callback' => 'user_access',
77
+        'access arguments' => array('ignore user'),
78
+        'type' => MENU_CALLBACK,
79 79
     );
80
-  }// endif module_exists
81
-  $items['account/certs'] = array(
80
+    }// endif module_exists
81
+    $items['account/certs'] = array(
82 82
     'title' =>'Account certificate',
83 83
     'page callback' => 'boincwork_certificates',
84 84
     'access arguments' => array('access content'),
85 85
     'type' => MENU_CALLBACK
86
-  );
87
-  $items['admin/boinc/prefs/general'] = array(
86
+    );
87
+    $items['admin/boinc/prefs/general'] = array(
88 88
     'title' => 'Preferences: General',
89 89
     'description' => 'Set options for BOINC preference set pages',
90 90
     'page callback' => 'drupal_get_form',
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
     'access arguments' => array('administer site configuration'),
93 93
     'type' => MENU_NORMAL_ITEM,
94 94
     'file' => 'boincwork.admin.inc'
95
-  );
96
-  $items['admin/boinc/prefs/presets'] = array(
95
+    );
96
+    $items['admin/boinc/prefs/presets'] = array(
97 97
     'title' => 'Preferences: Presets',
98 98
     'description' => 'Set values for BOINC preference set presets.',
99 99
     'page callback' => 'boincwork_admin_prefs_presets_page',
100 100
     'access arguments' => array('administer site configuration'),
101 101
     'type' => MENU_NORMAL_ITEM,
102 102
     'file' => 'boincwork.admin.inc'
103
-  );
104
-  $items['admin/boinc/prefs/upload'] = array(
103
+    );
104
+    $items['admin/boinc/prefs/upload'] = array(
105 105
     'title' => 'Preferences: Project-specific XML upload',
106 106
     'description' => 'Upload XML configuration for project specific preferences.',
107 107
     'page callback' => 'drupal_get_form',
@@ -109,153 +109,153 @@  discard block
 block discarded – undo
109 109
     'access arguments' => array('administer site configuration'),
110 110
     'type' => MENU_NORMAL_ITEM,
111 111
     'file' => 'boincwork.admin.inc'
112
-  );
113
-  $items['host/%/delete'] = array(
112
+    );
113
+    $items['host/%/delete'] = array(
114 114
     'title' => 'Delete host',
115 115
     'page callback' => 'boincwork_host_delete',
116 116
     'page arguments' => array(1),
117 117
     'access callback' => 'user_is_logged_in',
118 118
     'type' => MENU_CALLBACK,
119
-  );
120
-  $items['host/%/log'] = array(
119
+    );
120
+    $items['host/%/log'] = array(
121 121
     'title' => 'Host log',
122 122
     'page callback' => 'boincwork_host_log',
123 123
     'page arguments' => array(1),
124 124
     'access callback' => 'user_is_logged_in',
125 125
     'type' => MENU_CALLBACK,
126
-  );
127
-  $items['host/%/merge'] = array(
126
+    );
127
+    $items['host/%/merge'] = array(
128 128
     'title' => 'Merge computer',
129 129
     'page callback' => 'drupal_get_form',
130 130
     'page arguments' => array('boincwork_host_merge_form', 1),
131 131
     'access callback' => 'user_is_logged_in',
132 132
     'type' => MENU_CALLBACK,
133
-  );
134
-  $items['host/%/set-venue/%'] = array(
133
+    );
134
+    $items['host/%/set-venue/%'] = array(
135 135
     'title' => 'Set host venue',
136 136
     'page callback' => 'boincwork_host_set_venue',
137 137
     'page arguments' => array(1,3),
138 138
     'access callback' => 'user_is_logged_in',
139 139
     'type' => MENU_CALLBACK,
140
-  );
141
-  $items['user/%/mobile'] = array(
140
+    );
141
+    $items['user/%/mobile'] = array(
142 142
     'title' => 'Mobile stats',
143 143
     'page callback' => 'boincwork_mobile_stats',
144 144
     'page arguments' => array(1),
145 145
     'access callback' => 'user_is_logged_in',
146 146
     'type' => MENU_CALLBACK
147
-  );
148
-  $items['server_status.php'] = array(
147
+    );
148
+    $items['server_status.php'] = array(
149 149
     'title' => 'Server status',
150 150
     'page callback' => 'boincwork_server_status',
151 151
     'access arguments' => array('access content'),
152 152
     'type' => MENU_CALLBACK
153
-  );
154
-  $items['job_file.php'] = array(
153
+    );
154
+    $items['job_file.php'] = array(
155 155
     'title' => 'Job file input',
156 156
     'page callback' => 'boincwork_job_file',
157 157
     'access arguments' => array('access content'),
158 158
     'type' => MENU_CALLBACK
159
-  );
160
-  $items['get_output.php'] = array(
159
+    );
160
+    $items['get_output.php'] = array(
161 161
     'title' => 'Get output file',
162 162
     'page callback' => 'boincwork_get_output',
163 163
     'access arguments' => array('access content'),
164 164
     'type' => MENU_CALLBACK
165
-  );
166
-  $items['get_project_config.php'] = array(
165
+    );
166
+    $items['get_project_config.php'] = array(
167 167
     'title' => 'Project config',
168 168
     'page callback' => 'boincwork_get_project_config',
169 169
     'access arguments' => array('access content'),
170 170
     'type' => MENU_CALLBACK
171
-  );
172
-  $items['submit_rpc_handler.php'] = array(
171
+    );
172
+    $items['submit_rpc_handler.php'] = array(
173 173
     'title' => 'Remote job submission',
174 174
     'page callback' => 'boincwork_submit_rpc_handler',
175 175
     'access arguments' => array('access content'),
176 176
     'type' => MENU_CALLBACK
177
-  );
178
-  $items['userw.php'] = array(
177
+    );
178
+    $items['userw.php'] = array(
179 179
     'title' => 'User WAP',
180 180
     'page callback' => 'boincwork_user_wap',
181 181
     'access arguments' => array('access content'),
182 182
     'type' => MENU_CALLBACK
183
-  );
184
-  $items['account/tasks/%/%'] = array(
183
+    );
184
+    $items['account/tasks/%/%'] = array(
185 185
     'title' => 'Account Tasks Table',
186 186
     'description' => '',
187 187
     'page callback' => 'boincwork_account_task_table',
188 188
     'page arguments' => array(2,3),
189 189
     'access arguments' => array('access content'),
190 190
     'type' => MENU_CALLBACK,
191
-  );
192
-  $items['host/%/tasks/%/%'] = array(
191
+    );
192
+    $items['host/%/tasks/%/%'] = array(
193 193
     'title' => 'Host Tasks Table',
194 194
     'description' => '',
195 195
     'page callback' => 'boincwork_host_task_table',
196 196
     'page arguments' => array(1,3,4),
197 197
     'access arguments' => array('access content'),
198 198
     'type' => MENU_CALLBACK,
199
-  );
200
-  // Workunit task table disabled
201
-  //$items['workunit/%/tasks/%/%'] = array(
202
-  //  'title' => 'Workunit Tasks Table',
203
-  //  'description' => '',
204
-  //  'page callback' => 'boincwork_workunit_task_table',
205
-  //  'page arguments' => array(1,3,4),
206
-  //  'access arguments' => array('access content'),
207
-  //  'type' => MENU_CALLBACK,
208
-  //);
209
-  return $items;
199
+    );
200
+    // Workunit task table disabled
201
+    //$items['workunit/%/tasks/%/%'] = array(
202
+    //  'title' => 'Workunit Tasks Table',
203
+    //  'description' => '',
204
+    //  'page callback' => 'boincwork_workunit_task_table',
205
+    //  'page arguments' => array(1,3,4),
206
+    //  'access arguments' => array('access content'),
207
+    //  'type' => MENU_CALLBACK,
208
+    //);
209
+    return $items;
210 210
 }
211 211
 
212 212
 /**
213 213
  * Implementation of hook_theme().
214 214
  */
215 215
 function boincwork_theme() {
216
-  return array(
216
+    return array(
217 217
     'boincwork_privacyprefs_form' => array(
218
-      'arguments' => array('form'),
218
+        'arguments' => array('form'),
219 219
     ),
220
-  );
220
+    );
221 221
 }
222 222
 
223 223
 /**
224 224
 * Implementation of hook_views_api().
225 225
 */
226 226
 function boincwork_views_api() {
227
-  return array(
227
+    return array(
228 228
     'api' => 2.0,
229 229
     'path' => drupal_get_path('module', 'boincwork')
230
-  );
230
+    );
231 231
 }
232 232
 
233 233
 /**
234 234
  * Implementation of hook_locale().
235 235
  */
236 236
 function boincwork_locale($op = 'groups', $group = NULL) {
237
-  switch ($op) {
237
+    switch ($op) {
238 238
     case 'groups':
239 239
       return array('project' => bts('Project'));
240 240
     case 'info':
241 241
       $info['project']['refresh callback'] = 'boincwork_locale_refresh';
242
-      $info['project']['format'] = FALSE;
243
-      return $info;
244
-  }
242
+        $info['project']['format'] = FALSE;
243
+        return $info;
244
+    }
245 245
 }
246 246
 
247 247
 /**
248 248
  * Refresh strings.
249 249
  */
250 250
 function boincwork_locale_refresh() {
251
-  // Mimic process of adding project specific prefs to the project preferences
252
-  // form -- this parses the prefs XML and calls i18nstrings_update()
253
-  $form = array();
254
-  $prefs = array(
251
+    // Mimic process of adding project specific prefs to the project preferences
252
+    // form -- this parses the prefs XML and calls i18nstrings_update()
253
+    $form = array();
254
+    $prefs = array(
255 255
     'project_specific' => array(),
256
-  );
257
-  boincwork_add_project_specific_prefs($form, $prefs);
258
-  return TRUE; // Meaning it completed with no issues
256
+    );
257
+    boincwork_add_project_specific_prefs($form, $prefs);
258
+    return TRUE; // Meaning it completed with no issues
259 259
 }
260 260
 
261 261
 
@@ -264,43 +264,43 @@  discard block
 block discarded – undo
264 264
  */
265 265
 
266 266
 function boincwork_privatemsg_message_view_alter(&$vars) {
267
-  global $user;
267
+    global $user;
268 268
 
269
-  $author = $vars['message']['author'];
270
-  if (!isset($vars['message']['thread_id'])) {
269
+    $author = $vars['message']['author'];
270
+    if (!isset($vars['message']['thread_id'])) {
271 271
     // No thread id, this is probably only a preview
272 272
     return;
273
-  }
274
-  $thread_id = $vars['message']['thread_id'];
273
+    }
274
+    $thread_id = $vars['message']['thread_id'];
275 275
 
276
-  if ($user->uid != $author->uid) {
276
+    if ($user->uid != $author->uid) {
277 277
     if ($vars['message']['is_blocked']) {
278
-      $vars['message_actions']['unignore_user'] = array(
278
+        $vars['message_actions']['unignore_user'] = array(
279 279
         'title' => bts('Stop Ignoring User', array(), NULL, 'boinc:ignore-user-remove'),
280 280
         'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
281 281
         'query' => 'destination=messages/view/' . $thread_id,
282
-      );
282
+        );
283 283
     }
284 284
     else {
285
-      $vars['message_actions']['ignore_user'] = array(
285
+        $vars['message_actions']['ignore_user'] = array(
286 286
         'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
287 287
         'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
288 288
         'query' => 'destination=messages/view/' . $thread_id,
289
-      );
289
+        );
290
+    }
290 291
     }
291
-  }
292 292
 }
293 293
 
294 294
 /**
295 295
  * Implementation of hook_cron()
296 296
  */
297 297
 function boincwork_cron() {
298
-  // Delete expired hosts in the BOINC database, host_delete table.
299
-  require_boinc('boinc_db');
300
-  $num_deleted = BoincHostDeleted::delete_expired();
301
-  if ($num_deleted>0) {
298
+    // Delete expired hosts in the BOINC database, host_delete table.
299
+    require_boinc('boinc_db');
300
+    $num_deleted = BoincHostDeleted::delete_expired();
301
+    if ($num_deleted>0) {
302 302
     watchdog('boincwork', "Deleted ${num_deleted} hosts from host_deleted table", WATCHDOG_NOTICE);
303
-  }
303
+    }
304 304
 }
305 305
 
306 306
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -308,41 +308,41 @@  discard block
 block discarded – undo
308 308
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
309 309
 
310 310
 /**
311
-  * General preferences menu callback.
312
-  * Called when user goes to edit preferences page
313
-  */
311
+ * General preferences menu callback.
312
+ * Called when user goes to edit preferences page
313
+ */
314 314
 function generalprefs_page($action = null, $venue = null, $advanced = FALSE) {
315 315
 
316
-  // Keep the venue selected across preference pages
317
-  boincwork_select_venue($venue);
316
+    // Keep the venue selected across preference pages
317
+    boincwork_select_venue($venue);
318 318
 
319
-  $pref_sets = array('generic', 'home', 'school', 'work');
320
-  $output = null;
321
-  // Set the page title
322
-  $title = 'Computing';
323
-  drupal_set_title($title);
319
+    $pref_sets = array('generic', 'home', 'school', 'work');
320
+    $output = null;
321
+    // Set the page title
322
+    $title = 'Computing';
323
+    drupal_set_title($title);
324 324
 
325
-  switch ($action) {
325
+    switch ($action) {
326 326
 
327
-  case 'clear':
327
+    case 'clear':
328 328
     // Remove settings from this preference set
329 329
     if ($venue AND $venue != 'generic') {
330
-      boincwork_save_prefs(NULL, 'general', $venue);
331
-      drupal_set_message(t('Settings for the "@name" preference set have been
330
+        boincwork_save_prefs(NULL, 'general', $venue);
331
+        drupal_set_message(t('Settings for the "@name" preference set have been
332 332
         cleared', array('@name' => ucfirst($venue))));
333
-      // Set the generic preference set as active
334
-      $_SESSION['prefs venue'] = 'generic';
333
+        // Set the generic preference set as active
334
+        $_SESSION['prefs venue'] = 'generic';
335 335
     }
336 336
     drupal_goto();
337 337
     break;
338 338
 
339
-  case 'combined':
339
+    case 'combined':
340 340
     // Compare preference sets; tabular view
341 341
 
342 342
     foreach ($pref_sets as $pref_set) {
343
-      $form_state = array();
344
-      $prefs[$pref_set] = drupal_retrieve_form('boincwork_generalprefs_form', $form_state, $pref_set);
345
-      drupal_prepare_form('boincwork_generalprefs_form', $prefs[$pref_set], $form_state);
343
+        $form_state = array();
344
+        $prefs[$pref_set] = drupal_retrieve_form('boincwork_generalprefs_form', $form_state, $pref_set);
345
+        drupal_prepare_form('boincwork_generalprefs_form', $prefs[$pref_set], $form_state);
346 346
     }
347 347
 
348 348
     $output .= '<p>' . bts('These apply to all BOINC projects in which you participate.', array(), NULL, 'boinc:account-preferences-computing') . '<br/>';
@@ -355,29 +355,29 @@  discard block
 block discarded – undo
355 355
     $prefs_table = boincwork_make_prefs_table($prefs['generic']['prefs']['advanced']);
356 356
 
357 357
     foreach ($prefs_table as $category => $section) {
358
-      $output .= '<tr class="section-heading">';
359
-      $output .= "<td>{$section['name']}</td>";
360
-      foreach ($pref_sets as $pref_set) {
358
+        $output .= '<tr class="section-heading">';
359
+        $output .= "<td>{$section['name']}</td>";
360
+        foreach ($pref_sets as $pref_set) {
361 361
         $output .= '<td>' . $pref_set . '</td>';
362
-      }
363
-      $output .= '</tr>';
364
-      foreach ($section['elements'] as $name => $setting) {
362
+        }
363
+        $output .= '</tr>';
364
+        foreach ($section['elements'] as $name => $setting) {
365 365
         // Output the setting name and description, with an ugly exception
366 366
         // made for preferences with special formatting
367 367
         $special_map = array(
368
-          'start_hour' => 'end_hour',
369
-          'net_start_hour'=> 'net_end_hour',
370
-          'daily_xfer_limit_mb' => 'daily_xfer_period_days',
368
+            'start_hour' => 'end_hour',
369
+            'net_start_hour'=> 'net_end_hour',
370
+            'daily_xfer_limit_mb' => 'daily_xfer_period_days',
371 371
         );
372 372
         $special_delimiter = array(
373
-          'start_hour' => bts('and', array(), NULL, 'boinc:account-preference'),
374
-          'net_start_hour'=> bts('and', array(), NULL, 'boinc:account-preference'),
375
-          'daily_xfer_limit_mb' => bts('every', array(), NULL, 'boinc:account-preference'),
373
+            'start_hour' => bts('and', array(), NULL, 'boinc:account-preference'),
374
+            'net_start_hour'=> bts('and', array(), NULL, 'boinc:account-preference'),
375
+            'daily_xfer_limit_mb' => bts('every', array(), NULL, 'boinc:account-preference'),
376 376
         );
377 377
         $special = isset($special_map[$name]);
378 378
         $very_special = in_array($name, $special_map);
379 379
         if ($very_special) {
380
-          continue;
380
+            continue;
381 381
         }
382 382
         $output .= '<tr>';
383 383
         $output .= '<td>';
@@ -387,35 +387,35 @@  discard block
 block discarded – undo
387 387
         // Output values for each preference set, again with ugly hacks for
388 388
         // time range preferences
389 389
         foreach ($pref_sets as $pref_set) {
390
-          if (($prefs[$pref_set]) AND
390
+            if (($prefs[$pref_set]) AND
391 391
               $prefs[$pref_set]['#established'] AND
392 392
               isset($prefs[$pref_set]['prefs']['advanced'][$category])) {
393 393
             $pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$name];
394 394
             $value = isset($pref_setting['#options']) ? $pref_setting['#options'][$pref_setting['#default_value']] : $pref_setting['#default_value'];
395 395
             if ($value == '') {
396
-              $value = '---';
396
+                $value = '---';
397 397
             }
398 398
             if (!isset($pref_setting['#field_suffix'])) {
399
-              $pref_setting['#field_suffix'] = '';
399
+                $pref_setting['#field_suffix'] = '';
400 400
             }
401 401
             if (!$special) {
402
-              $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
402
+                $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
403 403
             }
404 404
             else {
405
-              // The "very special" case where we merge two prefs
406
-              $second_pref = $special_map[$name];
407
-              $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
408
-              $second_value = isset($second_pref_setting['#options']) ? $second_pref_setting['#options'][$second_pref_setting['#default_value']] : $second_pref_setting['#default_value'];
409
-              $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
405
+                // The "very special" case where we merge two prefs
406
+                $second_pref = $special_map[$name];
407
+                $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
408
+                $second_value = isset($second_pref_setting['#options']) ? $second_pref_setting['#options'][$second_pref_setting['#default_value']] : $second_pref_setting['#default_value'];
409
+                $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
410 410
                 " {$second_value} {$second_pref_setting['#field_suffix']} </td>";
411 411
             }
412
-          }
413
-          else  {
412
+            }
413
+            else  {
414 414
             $output .= '<td>---</td>';
415
-          }
415
+            }
416 416
         }
417 417
         $output .= '</tr>';
418
-      }
418
+        }
419 419
     }
420 420
 
421 421
     // Empty line above action links... :/
@@ -431,24 +431,24 @@  discard block
 block discarded – undo
431 431
     $output .= '<tr>';
432 432
     $output .= '<td></td>';
433 433
     foreach ($pref_sets as $pref_set) {
434
-      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
435
-      $output .= '<td><ul class="tab-list"><li class="first tab">';
436
-      $output .= l($action_text, "account/prefs/computing/edit/{$pref_set}/1",
434
+        $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
435
+        $output .= '<td><ul class="tab-list"><li class="first tab">';
436
+        $output .= l($action_text, "account/prefs/computing/edit/{$pref_set}/1",
437 437
         array('fragment' => "")
438
-      );
439
-      // Show Clear links for established preference sets
440
-      if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
438
+        );
439
+        // Show Clear links for established preference sets
440
+        if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
441 441
         $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$pref_set}",
442
-          array(
442
+            array(
443 443
             'query' => drupal_get_destination(),
444 444
             'attributes' => array(
445
-              'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
445
+                'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
446 446
                 array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-computing-preferences') . '\')'
447 447
             )
448
-          )
448
+            )
449 449
         );
450
-      }
451
-      $output .= '</li></ul></td>';
450
+        }
451
+        $output .= '</li></ul></td>';
452 452
     }
453 453
     $output .= '</tr>';
454 454
 
@@ -456,28 +456,28 @@  discard block
 block discarded – undo
456 456
 
457 457
     break;
458 458
 
459
-  case 'edit':
459
+    case 'edit':
460 460
   default:
461 461
 
462 462
     // Return the HTML generated from the $form data structure.
463 463
     if (function_exists('jump_quickly')) {
464
-      $path = 'account/prefs/computing/edit';
465
-      $venues = array(
464
+        $path = 'account/prefs/computing/edit';
465
+        $venues = array(
466 466
         "{$path}/generic" => bts('Generic', array(), NULL, 'boinc:account-preferences-location'),
467 467
         "{$path}/home" => bts('Home', array(), NULL, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
468 468
         "{$path}/school" => bts('School', array(), NULL, 'boinc:account-preferences-location'),
469 469
         "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
470
-      );
471
-      variable_set('jump_use_js_venues-Array', 1);
472
-      drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
473
-      drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
474
-
475
-      $output .= '<div id="venue-selector" class="simple-form-controls">';
476
-      $output .= '  <div class="form-item venue">';
477
-      $output .= '    <label>Preference set:</label>';
478
-      $output .= jump_quickly($venues, 'venues', 1, "{$path}/{$venue}");
479
-      $output .= '  </div>';
480
-      $output .= '</div>';
470
+        );
471
+        variable_set('jump_use_js_venues-Array', 1);
472
+        drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
473
+        drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
474
+
475
+        $output .= '<div id="venue-selector" class="simple-form-controls">';
476
+        $output .= '  <div class="form-item venue">';
477
+        $output .= '    <label>Preference set:</label>';
478
+        $output .= jump_quickly($venues, 'venues', 1, "{$path}/{$venue}");
479
+        $output .= '  </div>';
480
+        $output .= '</div>';
481 481
     }
482 482
     $output .= drupal_get_form('boincwork_generalprefs_form', $venue, NULL, $advanced);
483 483
 
@@ -488,54 +488,54 @@  discard block
 block discarded – undo
488 488
     drupal_prepare_form('boincwork_generalprefs_form', $current_set, $form_state);
489 489
 
490 490
     if (!$current_set['#established']) {
491
-      drupal_set_message(bts(
492
-          "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
493
-          array( '@venue' => $venue, ),
494
-          NULL, 'boinc:account-preferences'), 'status');
491
+        drupal_set_message(bts(
492
+            "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
493
+            array( '@venue' => $venue, ),
494
+            NULL, 'boinc:account-preferences'), 'status');
495 495
     }
496 496
 
497 497
     break;
498
-  }
498
+    }
499 499
 
500
-  return $output;
500
+    return $output;
501 501
 }
502 502
 
503 503
 /**
504
-  * Project preferences menu callback
505
-  * Called when user goes to edit project preferences page.
506
-  */
504
+ * Project preferences menu callback
505
+ * Called when user goes to edit project preferences page.
506
+ */
507 507
 function projectprefs_page($action = null, $venue = null) {
508 508
 
509
-  // Keep the venue selected across preference pages
510
-  boincwork_select_venue($venue);
509
+    // Keep the venue selected across preference pages
510
+    boincwork_select_venue($venue);
511 511
 
512
-  require_boinc(array('util', 'prefs'));
513
-  global $project_has_beta;
514
-  $pref_sets = array('generic', 'home', 'school', 'work');
515
-  $output = null;
512
+    require_boinc(array('util', 'prefs'));
513
+    global $project_has_beta;
514
+    $pref_sets = array('generic', 'home', 'school', 'work');
515
+    $output = null;
516 516
 
517
-  $title = 'Project';
518
-  drupal_set_title($title);
517
+    $title = 'Project';
518
+    drupal_set_title($title);
519 519
 
520
-  switch ($action) {
520
+    switch ($action) {
521 521
 
522
-  case 'clear':
522
+    case 'clear':
523 523
     // Remove settings from this preference set
524 524
     if ($venue AND $venue != 'generic') {
525
-      boincwork_save_prefs(NULL, 'project', $venue);
526
-      drupal_set_message(t('Settings for the "@name" preference set have been
525
+        boincwork_save_prefs(NULL, 'project', $venue);
526
+        drupal_set_message(t('Settings for the "@name" preference set have been
527 527
         cleared', array('@name' => ucfirst($venue))));
528 528
 
529
-      // Set the generic preference set as active
530
-      $_SESSION['prefs venue'] = 'generic';
529
+        // Set the generic preference set as active
530
+        $_SESSION['prefs venue'] = 'generic';
531 531
 
532
-      // If the user has removed their default preference set, make it generic
533
-      boincwork_set_default_venue();
532
+        // If the user has removed their default preference set, make it generic
533
+        boincwork_set_default_venue();
534 534
     }
535 535
     drupal_goto();
536 536
     break;
537 537
 
538
-  case 'combined':
538
+    case 'combined':
539 539
 
540 540
     // Compare preference sets; tabular view
541 541
 
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
     $boincuser = BoincUser::lookup_id($account->boincuser_id);
545 545
 
546 546
     foreach ($pref_sets as $pref_set) {
547
-      $form_state = array();
548
-      $prefs[$pref_set] = drupal_retrieve_form('boincwork_projectprefs_form', $form_state, $pref_set);
549
-      drupal_prepare_form('boincwork_projectprefs_form', $prefs[$pref_set], $form_state);
547
+        $form_state = array();
548
+        $prefs[$pref_set] = drupal_retrieve_form('boincwork_projectprefs_form', $form_state, $pref_set);
549
+        drupal_prepare_form('boincwork_projectprefs_form', $prefs[$pref_set], $form_state);
550 550
     }
551 551
 
552 552
     $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['modified']['#value'])), NULL, 'boinc:account-preferences') . '</p>';
@@ -557,20 +557,20 @@  discard block
 block discarded – undo
557 557
     $prefs_table = boincwork_make_prefs_table($prefs['generic']);
558 558
 
559 559
     foreach ($prefs_table as $category => $section) {
560
-      $output .= '<tr class="section-heading">';
561
-      $output .= "<td>{$section['name']}</td>";
562
-      foreach ($pref_sets as $pref_set) {
560
+        $output .= '<tr class="section-heading">';
561
+        $output .= "<td>{$section['name']}</td>";
562
+        foreach ($pref_sets as $pref_set) {
563 563
         $output .= '<td>' . $pref_set . '</td>';
564
-      }
565
-      $output .= '</tr>';
566
-      foreach ($section['elements'] as $name => $setting) {
564
+        }
565
+        $output .= '</tr>';
566
+        foreach ($section['elements'] as $name => $setting) {
567 567
         $output .= '<tr>';
568 568
         $output .= '<td>';
569 569
         $output .= "<div class=\"title\">{$setting['name']}</div>";
570 570
         $output .= "<div class=\"description\">{$setting['description']}</div>";
571 571
         $output .= '</td>';
572 572
         foreach ($pref_sets as $pref_set) {
573
-          if (($prefs[$pref_set]) AND
573
+            if (($prefs[$pref_set]) AND
574 574
               $prefs[$pref_set]['#established'] AND
575 575
               isset($prefs[$pref_set][$category])) {
576 576
             $pref_setting = $prefs[$pref_set][$category][$name];
@@ -578,10 +578,10 @@  discard block
 block discarded – undo
578 578
             if ($value == '') $value = '---';
579 579
             if (!isset($pref_setting['#field_suffix'])) $pref_setting['#field_suffix'] = '';
580 580
             $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
581
-          } else $output .= '<td>---</td>';
581
+            } else $output .= '<td>---</td>';
582 582
         }
583 583
         $output .= '</tr>';
584
-      }
584
+        }
585 585
     }
586 586
 
587 587
     // Empty line above action links... :/
@@ -597,29 +597,29 @@  discard block
 block discarded – undo
597 597
     $output .= '<tr>';
598 598
     $output .= '<td></td>';
599 599
     foreach ($pref_sets as $pref_set) {
600
-      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
601
-      $output .= '<td><ul class="tab-list"><li class="first tab">';
602
-      $output .= l($action_text, "account/prefs/project/edit/{$pref_set}");
603
-      // Show Clear links for established preference sets
604
-      if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
600
+        $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
601
+        $output .= '<td><ul class="tab-list"><li class="first tab">';
602
+        $output .= l($action_text, "account/prefs/project/edit/{$pref_set}");
603
+        // Show Clear links for established preference sets
604
+        if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
605 605
         $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$pref_set}",
606
-          array(
606
+            array(
607 607
             'query' => drupal_get_destination(),
608 608
             'attributes' => array(
609
-              'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
609
+                'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
610 610
                 array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-preferences-project') . '\')'
611 611
             )
612
-          )
612
+            )
613 613
         );
614
-      }
615
-      $output .= '</li></ul></td>';
614
+        }
615
+        $output .= '</li></ul></td>';
616 616
     }
617 617
 
618 618
     $output .= '</table>';
619 619
 
620 620
     break;
621 621
 
622
-  case 'set-default':
622
+    case 'set-default':
623 623
     // Set this preference set as the one to use for any new hosts attached
624 624
     // to the user account
625 625
     boincwork_set_default_venue($venue);
@@ -627,30 +627,30 @@  discard block
 block discarded – undo
627 627
     drupal_goto('account/prefs/project/combined');
628 628
     break;
629 629
 
630
-  case 'edit':
630
+    case 'edit':
631 631
   default:
632 632
 
633 633
     // Return the HTML generated from the $form data structure.
634 634
     require_boinc('util');
635 635
 
636 636
     if (function_exists('jump_quickly')) {
637
-      $path = 'account/prefs/project/edit';
638
-      $venues = array(
637
+        $path = 'account/prefs/project/edit';
638
+        $venues = array(
639 639
         "{$path}/generic" => bts('Generic', array(), NULL, 'boinc:account-preferences-location'),
640 640
         "{$path}/home" => bts('Home', array(), NULL, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
641 641
         "{$path}/school" => bts('School', array(), NULL, 'boinc:account-preferences-location'),
642 642
         "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
643
-      );
644
-      variable_set('jump_use_js_venues-Array', 1);
645
-      drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
646
-      drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
647
-
648
-      $output .= '<div id="venue-selector" class="simple-form-controls">';
649
-      $output .= '  <div class="form-item venue">';
650
-      $output .= '    <label>Preference set:</label>';
651
-      $output .= jump_quickly($venues, 'venues', 1, "{$path}/{$venue}");
652
-      $output .= '  </div>';
653
-      $output .= '</div>';
643
+        );
644
+        variable_set('jump_use_js_venues-Array', 1);
645
+        drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
646
+        drupal_add_js(drupal_get_path('theme', 'boinc') . '/js/prefs.js', 'theme');
647
+
648
+        $output .= '<div id="venue-selector" class="simple-form-controls">';
649
+        $output .= '  <div class="form-item venue">';
650
+        $output .= '    <label>Preference set:</label>';
651
+        $output .= jump_quickly($venues, 'venues', 1, "{$path}/{$venue}");
652
+        $output .= '  </div>';
653
+        $output .= '</div>';
654 654
     }
655 655
     $output .= drupal_get_form('boincwork_projectprefs_form', $venue);
656 656
 
@@ -661,63 +661,63 @@  discard block
 block discarded – undo
661 661
     drupal_prepare_form('boincwork_projectprefs_form', $current_set, $form_state);
662 662
 
663 663
     if (!$current_set['#established']) {
664
-      drupal_set_message(bts(
665
-          "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
666
-          array( '@venue' => $venue, ),
667
-          NULL, 'boinc:account-preferences'), 'status');
664
+        drupal_set_message(bts(
665
+            "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
666
+            array( '@venue' => $venue, ),
667
+            NULL, 'boinc:account-preferences'), 'status');
668 668
     }
669 669
 
670 670
     break;
671 671
 
672
-  }
673
-  return $output;
672
+    }
673
+    return $output;
674 674
 }
675 675
 
676 676
 /**
677
-  * Community preferences menu callback
678
-  * Called when user goes to edit community preferences page.
679
-  */
677
+ * Community preferences menu callback
678
+ * Called when user goes to edit community preferences page.
679
+ */
680 680
 function communityprefs_page($action = null) {
681 681
 
682
-  require_boinc(array('util', 'prefs'));
683
-  $output = null;
682
+    require_boinc(array('util', 'prefs'));
683
+    $output = null;
684 684
 
685
-  $title = 'Community';
686
-  drupal_set_title($title);
685
+    $title = 'Community';
686
+    drupal_set_title($title);
687 687
 
688
-  //$output .= '<h2>Community preferences</h2>';
688
+    //$output .= '<h2>Community preferences</h2>';
689 689
 
690
-  $output .= drupal_get_form('communityprefs_form');
690
+    $output .= drupal_get_form('communityprefs_form');
691 691
 
692
-  return $output;
692
+    return $output;
693 693
 }
694 694
 
695 695
 /**
696
-  * Privacy preferences menu callback
697
-  * Called when user goes to edit privacy preferences page.
698
-  */
696
+ * Privacy preferences menu callback
697
+ * Called when user goes to edit privacy preferences page.
698
+ */
699 699
 function privacyprefs_page($action = null) {
700 700
 
701
-  require_boinc(array('util', 'prefs'));
702
-  $output = null;
703
-  $title = 'Privacy';
704
-  drupal_set_title($title);
701
+    require_boinc(array('util', 'prefs'));
702
+    $output = null;
703
+    $title = 'Privacy';
704
+    drupal_set_title($title);
705 705
 
706
-  switch ($action) {
707
-  case 'view':
706
+    switch ($action) {
707
+    case 'view':
708 708
     $form_state = array();
709 709
     $prefs = drupal_retrieve_form('boincwork_privacyprefs_form', $form_state);
710 710
     drupal_prepare_form('boincwork_privacyprefs_form', $prefs, $form_state);
711 711
     $output .= '<table>';
712 712
 
713 713
     $sections = array(
714
-      'privacy' => $prefs['privacy']
714
+        'privacy' => $prefs['privacy']
715 715
     );
716 716
 
717 717
     foreach ($sections as $section) {
718
-      $output .= '<tr class="section-heading">';
719
-      $output .= "<td>{$section['#title']}</td></tr>";
720
-      foreach ($section as $name => $setting) {
718
+        $output .= '<tr class="section-heading">';
719
+        $output .= "<td>{$section['#title']}</td></tr>";
720
+        foreach ($section as $name => $setting) {
721 721
         if ($name{0} == '#') continue;
722 722
         $value = isset($setting['#default_value']) ? $setting['#default_value'] : '';
723 723
         if ($value AND isset($setting['#options'])) $value = $setting['#options'][$value];
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
         $output .= "<td>{$setting['#title']}<br/>{$setting['#description']}</td>";
730 730
         $output .= "<td>{$value} {$setting['#field_suffix']}</td>";
731 731
         $output .= '</tr>';
732
-      }
732
+        }
733 733
     }
734 734
 
735 735
     // Edit preferences link
@@ -742,33 +742,33 @@  discard block
 block discarded – undo
742 742
 
743 743
     break;
744 744
 
745
-  case 'edit':
745
+    case 'edit':
746 746
   default:
747 747
     require_boinc('util');
748 748
     // Return the HTML generated from the $form data structure.
749 749
     $output .= drupal_get_form('boincwork_privacyprefs_form');
750 750
     break;
751 751
 
752
-  }
752
+    }
753 753
 
754
-  return $output;
754
+    return $output;
755 755
 }
756 756
 
757 757
 /**
758
-  * Certificates menu callback
759
-  * Called when user goes to account certificate pages
760
-  */
758
+ * Certificates menu callback
759
+ * Called when user goes to account certificate pages
760
+ */
761 761
 function boincwork_certificates($type = null, $border = null) {
762
-  global $user;
763
-  $drupuser = user_load($user->uid);
764
-  // Load BOINC account and pre-authenticate with BOINC code
765
-  require_boinc(array('util', 'cert'));
766
-  $boincuser = BoincUser::lookup_id($drupuser->boincuser_id);
767
-  //global $g_logged_in_user;
768
-  //$g_logged_in_user = $boincuser;
769
-  //print_r($boincuser); exit;
770
-  switch ($type) {
771
-  case 'all':
762
+    global $user;
763
+    $drupuser = user_load($user->uid);
764
+    // Load BOINC account and pre-authenticate with BOINC code
765
+    require_boinc(array('util', 'cert'));
766
+    $boincuser = BoincUser::lookup_id($drupuser->boincuser_id);
767
+    //global $g_logged_in_user;
768
+    //$g_logged_in_user = $boincuser;
769
+    //print_r($boincuser); exit;
770
+    switch ($type) {
771
+    case 'all':
772 772
     //include_boinc('user/cert_all.php');
773 773
     require_boinc(array('util','cert','user'));
774 774
 
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
     ";
839 839
     break;
840 840
 
841
-  case 'account':
841
+    case 'account':
842 842
   default:
843 843
     //include_boinc('user/cert1.php');
844 844
     require_boinc(array('util','cert'));
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
     echo "
915 915
     </td><tr></table>
916 916
     ";
917
-  }
917
+    }
918 918
 }
919 919
 
920 920
 /**
@@ -922,42 +922,42 @@  discard block
 block discarded – undo
922 922
  * Called when user selects to delete a host
923 923
  */
924 924
 function boincwork_host_delete($host_id) {
925
-  // Verify that host has no tasks
926
-  if (boincwork_host_user_is_owner($host_id)) {
925
+    // Verify that host has no tasks
926
+    if (boincwork_host_user_is_owner($host_id)) {
927 927
     if (!boincwork_host_get_task_count($host_id)) {
928
-      // Delete the host record
929
-      db_set_active('boinc_rw');
930
-      $host_deleted = db_query(
928
+        // Delete the host record
929
+        db_set_active('boinc_rw');
930
+        $host_deleted = db_query(
931 931
         "DELETE FROM {host} WHERE id = '%d'",
932 932
         $host_id
933
-      );
934
-      db_set_active('default');
935
-      if ($host_deleted) {
933
+        );
934
+        db_set_active('default');
935
+        if ($host_deleted) {
936 936
         drupal_set_message(t('Host @id has been removed from your account.',
937
-          array('@id' => $host_id)));
937
+            array('@id' => $host_id)));
938 938
         drupal_goto('account/computers');
939
-      }
940
-      else {
939
+        }
940
+        else {
941 941
         drupal_set_message(t('Host @id could not be deleted. Not sure why...',
942
-          array('@id' => $host_id)), 'error'
942
+            array('@id' => $host_id)), 'error'
943 943
         );
944
-      }
944
+        }
945 945
     }
946 946
     else {
947
-      drupal_set_message(t('Host @id cannot be deleted because it still has
947
+        drupal_set_message(t('Host @id cannot be deleted because it still has
948 948
         tasks associated with it. These tasks should be processed within the
949 949
         next few days, after which the host can be deleted.',
950 950
         array('@id' => $host_id)), 'warning'
951
-      );
951
+        );
952
+    }
952 953
     }
953
-  }
954
-  else {
954
+    else {
955 955
     drupal_set_message(t('You are not the owner of host @id, so you cannot
956 956
       delete it.',
957
-      array('@id' => $host_id)), 'error'
957
+        array('@id' => $host_id)), 'error'
958 958
     );
959
-  }
960
-  drupal_goto("host/{$host_id}");
959
+    }
960
+    drupal_goto("host/{$host_id}");
961 961
 }
962 962
 
963 963
 /**
@@ -965,55 +965,55 @@  discard block
 block discarded – undo
965 965
  * Called when user accesses the log for a host
966 966
  */
967 967
 function boincwork_host_log($host_id = null) {
968
-  $root_log_dir = variable_get('boinc_host_sched_logs_dir', '');
969
-  $log = '';
970
-  if ($root_log_dir AND $host_id) {
968
+    $root_log_dir = variable_get('boinc_host_sched_logs_dir', '');
969
+    $log = '';
970
+    if ($root_log_dir AND $host_id) {
971 971
     $subdir = substr($host_id, 0, -3) OR $subdir = 0;
972 972
     $log = implode('/', array($root_log_dir, $subdir, $host_id));
973
-  }
974
-  if ($log AND file_exists($log)) {
973
+    }
974
+    if ($log AND file_exists($log)) {
975 975
     header('Content-type: text/plain');
976 976
     include($log);
977
-  }
977
+    }
978 978
 }
979 979
 
980 980
 function boincwork_host_set_venue($host_id = NULL, $venue = NULL) {
981
-  global $user;
982
-  $account = user_load($user->uid);
983
-  db_set_active('boinc_ro');
984
-  // Verify that this is my host
985
-  $host_owner = db_result(db_query(
981
+    global $user;
982
+    $account = user_load($user->uid);
983
+    db_set_active('boinc_ro');
984
+    // Verify that this is my host
985
+    $host_owner = db_result(db_query(
986 986
     "SELECT userid FROM {host} WHERE id = '%d'",
987 987
     $host_id
988
-  ));
989
-  db_set_active('default');
990
-  if ($host_owner AND $host_owner == $account->boincuser_id) {
988
+    ));
989
+    db_set_active('default');
990
+    if ($host_owner AND $host_owner == $account->boincuser_id) {
991 991
     db_set_active('boinc_rw');
992 992
     $updated = db_query(
993
-      "UPDATE {host} SET venue = '%s' WHERE id = '%d'",
994
-      $venue, $host_id
993
+        "UPDATE {host} SET venue = '%s' WHERE id = '%d'",
994
+        $venue, $host_id
995 995
     );
996 996
     db_set_active('default');
997 997
     if ($updated) {
998
-      drupal_set_message(
998
+        drupal_set_message(
999 999
         bts('The location for this host has been updated.', array(), NULL, 'boinc:account-host-details')
1000 1000
         . bts('This will take effect next time the host contacts the project.', array(), NULL, 'boinc:account-host-details')
1001
-      );
1001
+        );
1002 1002
     }
1003 1003
     else {
1004
-      drupal_set_message(
1004
+        drupal_set_message(
1005 1005
         bts('Unable to save changes to this host for some reason!', array(), NULL, 'boinc:account-host-details'),
1006 1006
         'error'
1007
-      );
1007
+        );
1008 1008
     }
1009
-  }
1010
-  else {
1009
+    }
1010
+    else {
1011 1011
     drupal_set_message(
1012
-      bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1013
-      'warning'
1012
+        bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1013
+        'warning'
1014 1014
     );
1015
-  }
1016
-  drupal_goto("host/{$host_id}");
1015
+    }
1016
+    drupal_goto("host/{$host_id}");
1017 1017
 }
1018 1018
 
1019 1019
 /**
@@ -1021,8 +1021,8 @@  discard block
 block discarded – undo
1021 1021
  * Called when user accesses cell phone stats
1022 1022
  */
1023 1023
 function boincwork_mobile_stats($userid = null) {
1024
-  $_GET['id'] = $userid;
1025
-  include_boinc('user/userw.php');
1024
+    $_GET['id'] = $userid;
1025
+    include_boinc('user/userw.php');
1026 1026
 }
1027 1027
 
1028 1028
 /**
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
  * Called to build the server status page
1031 1031
  */
1032 1032
 function boincwork_server_status() {
1033
-  include_boinc('user/server_status.php');
1033
+    include_boinc('user/server_status.php');
1034 1034
 }
1035 1035
 
1036 1036
 /**
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
  * RPC for managing job input files
1039 1039
  */
1040 1040
 function boincwork_job_file() {
1041
-  include_boinc('user/job_file.php');
1041
+    include_boinc('user/job_file.php');
1042 1042
 }
1043 1043
 
1044 1044
 /**
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
  * Get output file from remote job submission
1047 1047
  */
1048 1048
 function boincwork_get_output() {
1049
-  include_boinc('user/get_output.php');
1049
+    include_boinc('user/get_output.php');
1050 1050
 }
1051 1051
 
1052 1052
 /**
@@ -1054,28 +1054,28 @@  discard block
 block discarded – undo
1054 1054
  * Get the project configuration XML; used by client software
1055 1055
  */
1056 1056
 function boincwork_get_project_config() {
1057
-  ob_start();
1058
-  include_boinc('user/get_project_config.php');
1059
-  $xml = ob_get_clean();
1060
-  $xml = load_configuration($xml);
1061
-
1062
-  // obtain Drupal variables
1063
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
1064
-  $overrideboinctou = variable_get('boinc_weboptions_overrideboinctou', FALSE);
1065
-
1066
-  // If terms of use string exists and override is true, set terms-of-use
1067
-  // to Drupal varaible.
1068
-  if ( (!empty($termsofuse) && ($overrideboinctou)) ) {
1057
+    ob_start();
1058
+    include_boinc('user/get_project_config.php');
1059
+    $xml = ob_get_clean();
1060
+    $xml = load_configuration($xml);
1061
+
1062
+    // obtain Drupal variables
1063
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
1064
+    $overrideboinctou = variable_get('boinc_weboptions_overrideboinctou', FALSE);
1065
+
1066
+    // If terms of use string exists and override is true, set terms-of-use
1067
+    // to Drupal varaible.
1068
+    if ( (!empty($termsofuse) && ($overrideboinctou)) ) {
1069 1069
     if (!empty($xml['project_config']['terms_of_use'])) {
1070
-      // Remove any existing terms of use
1071
-      unset($xml['project_config']['terms_of_use']);
1070
+        // Remove any existing terms of use
1071
+        unset($xml['project_config']['terms_of_use']);
1072 1072
     }
1073 1073
 
1074 1074
     // Add terms of use from Drupal
1075 1075
     $xml['project_config']['terms_of_use']['@value'] = $termsofuse;
1076
-  }
1076
+    }
1077 1077
 
1078
-  print save_configuration($xml);
1078
+    print save_configuration($xml);
1079 1079
 }
1080 1080
 
1081 1081
 
@@ -1083,16 +1083,16 @@  discard block
 block discarded – undo
1083 1083
  * Page callback for the remote job submission RPC (submit_rpc_handler.php).
1084 1084
  */
1085 1085
 function boincwork_submit_rpc_handler() {
1086
-  include_boinc('user/submit_rpc_handler.php');
1086
+    include_boinc('user/submit_rpc_handler.php');
1087 1087
 }
1088 1088
 
1089 1089
 /**
1090 1090
  * Page callback for user WAP (userw.php).
1091 1091
  */
1092 1092
 function boincwork_user_wap() {
1093
-  // Remove q from the GET request or BOINC will panic
1094
-  unset($_GET['q']);
1095
-  include_boinc('user/userw.php');
1093
+    // Remove q from the GET request or BOINC will panic
1094
+    unset($_GET['q']);
1095
+    include_boinc('user/userw.php');
1096 1096
 }
1097 1097
 
1098 1098
 
@@ -1100,44 +1100,44 @@  discard block
 block discarded – undo
1100 1100
  * Page callback for user account task table
1101 1101
  */
1102 1102
 function boincwork_account_task_table($tselect = NULL, $app_id = NULL) {
1103
-  $title = bts('Tasks for your account', array(), NULL, 'boinc:account-task-table');
1104
-  drupal_set_title($title);
1103
+    $title = bts('Tasks for your account', array(), NULL, 'boinc:account-task-table');
1104
+    drupal_set_title($title);
1105 1105
 
1106
-  global $user;
1107
-  $account = user_load($user->uid);
1108
-  return boincwork_tasktable(0, $account->boincuser_id, $tselect, $app_id);
1106
+    global $user;
1107
+    $account = user_load($user->uid);
1108
+    return boincwork_tasktable(0, $account->boincuser_id, $tselect, $app_id);
1109 1109
 }
1110 1110
 
1111 1111
 /**
1112 1112
  * Page callback for host task table
1113 1113
  */
1114 1114
 function boincwork_host_task_table($host_id = NULL, $tselect = NULL, $app_id = NULL) {
1115
-  require_boinc( array('util', 'result') );
1115
+    require_boinc( array('util', 'result') );
1116 1116
 
1117
-  $title = bts('Tasks for computer @host_id', array('@host_id' => $host_id), NULL, 'boinc:host-task-table');
1118
-  drupal_set_title($title);
1117
+    $title = bts('Tasks for computer @host_id', array('@host_id' => $host_id), NULL, 'boinc:host-task-table');
1118
+    drupal_set_title($title);
1119 1119
 
1120
-  if (is_null($host_id)) {
1120
+    if (is_null($host_id)) {
1121 1121
     drupal_set_message(bts('ERROR: Invalid host ID', array(), NULL, 'boinc:host-task-table'), 'error');
1122 1122
     return '';
1123
-  }
1123
+    }
1124 1124
 
1125
-  return boincwork_tasktable(2, $host_id, $tselect, $app_id);
1125
+    return boincwork_tasktable(2, $host_id, $tselect, $app_id);
1126 1126
 }
1127 1127
 
1128 1128
 /**
1129 1129
  * Page callback for workunit task table
1130 1130
  */
1131 1131
 function boincwork_workunit_task_table($workunit_id = NULL, $tselect = NULL, $app_id = NULL) {
1132
-  $title = bts('Tasks for workunit @workunit_id', array('@workunit_id' => $workunit_id), NULL, 'boinc:workunit-task-table');
1133
-  drupal_set_title($title);
1132
+    $title = bts('Tasks for workunit @workunit_id', array('@workunit_id' => $workunit_id), NULL, 'boinc:workunit-task-table');
1133
+    drupal_set_title($title);
1134 1134
 
1135
-  if (is_null($workunit_id)) {
1135
+    if (is_null($workunit_id)) {
1136 1136
     drupal_set_message(bts('ERROR: Invalid workunit ID', array(), NULL, 'boinc:workunit-task-table'), 'error');
1137 1137
     return '';
1138
-  }
1138
+    }
1139 1139
 
1140
-  return boincwork_tasktable(1, $workunit_id, $tselect, $app_id);
1140
+    return boincwork_tasktable(1, $workunit_id, $tselect, $app_id);
1141 1141
 }
1142 1142
 
1143 1143
 /**
@@ -1145,8 +1145,8 @@  discard block
 block discarded – undo
1145 1145
  * Take a node ID and render that node as a page
1146 1146
  */
1147 1147
 function boincwork_view_page($nid) {
1148
-  $node = node_load($nid);
1149
-  return node_page_view($node);
1148
+    $node = node_load($nid);
1149
+    return node_page_view($node);
1150 1150
 }
1151 1151
 
1152 1152
 
@@ -1158,16 +1158,16 @@  discard block
 block discarded – undo
1158 1158
  * Determine which venue should be selected
1159 1159
  */
1160 1160
 function boincwork_select_venue(&$venue) {
1161
-  if (!$venue) {
1161
+    if (!$venue) {
1162 1162
     $active_venue = isset($_SESSION['prefs venue']) ? $_SESSION['prefs venue'] : NULL;
1163 1163
     if ($active_venue) {
1164
-      $venue = $active_venue;
1165
-      //unset($_SESSION['prefs venue']);
1164
+        $venue = $active_venue;
1165
+        //unset($_SESSION['prefs venue']);
1166
+    }
1166 1167
     }
1167
-  }
1168
-  else {
1168
+    else {
1169 1169
     // Set the active venue to keep it selected between computing and project
1170 1170
     // preference pages
1171 1171
     $_SESSION['prefs venue'] = $venue;
1172
-  }
1172
+    }
1173 1173
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -280,8 +280,7 @@  discard block
 block discarded – undo
280 280
         'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
281 281
         'query' => 'destination=messages/view/' . $thread_id,
282 282
       );
283
-    }
284
-    else {
283
+    } else {
285 284
       $vars['message_actions']['ignore_user'] = array(
286 285
         'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
287 286
         'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
@@ -400,8 +399,7 @@  discard block
 block discarded – undo
400 399
             }
401 400
             if (!$special) {
402 401
               $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
403
-            }
404
-            else {
402
+            } else {
405 403
               // The "very special" case where we merge two prefs
406 404
               $second_pref = $special_map[$name];
407 405
               $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
@@ -409,8 +407,7 @@  discard block
 block discarded – undo
409 407
               $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
410 408
                 " {$second_value} {$second_pref_setting['#field_suffix']} </td>";
411 409
             }
412
-          }
413
-          else  {
410
+          } else {
414 411
             $output .= '<td>---</td>';
415 412
           }
416 413
         }
@@ -936,22 +933,19 @@  discard block
 block discarded – undo
936 933
         drupal_set_message(t('Host @id has been removed from your account.',
937 934
           array('@id' => $host_id)));
938 935
         drupal_goto('account/computers');
939
-      }
940
-      else {
936
+      } else {
941 937
         drupal_set_message(t('Host @id could not be deleted. Not sure why...',
942 938
           array('@id' => $host_id)), 'error'
943 939
         );
944 940
       }
945
-    }
946
-    else {
941
+    } else {
947 942
       drupal_set_message(t('Host @id cannot be deleted because it still has
948 943
         tasks associated with it. These tasks should be processed within the
949 944
         next few days, after which the host can be deleted.',
950 945
         array('@id' => $host_id)), 'warning'
951 946
       );
952 947
     }
953
-  }
954
-  else {
948
+  } else {
955 949
     drupal_set_message(t('You are not the owner of host @id, so you cannot
956 950
       delete it.',
957 951
       array('@id' => $host_id)), 'error'
@@ -999,15 +993,13 @@  discard block
 block discarded – undo
999 993
         bts('The location for this host has been updated.', array(), NULL, 'boinc:account-host-details')
1000 994
         . bts('This will take effect next time the host contacts the project.', array(), NULL, 'boinc:account-host-details')
1001 995
       );
1002
-    }
1003
-    else {
996
+    } else {
1004 997
       drupal_set_message(
1005 998
         bts('Unable to save changes to this host for some reason!', array(), NULL, 'boinc:account-host-details'),
1006 999
         'error'
1007 1000
       );
1008 1001
     }
1009
-  }
1010
-  else {
1002
+  } else {
1011 1003
     drupal_set_message(
1012 1004
       bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1013 1005
       'warning'
@@ -1164,8 +1156,7 @@  discard block
 block discarded – undo
1164 1156
       $venue = $active_venue;
1165 1157
       //unset($_SESSION['prefs venue']);
1166 1158
     }
1167
-  }
1168
-  else {
1159
+  } else {
1169 1160
     // Set the active venue to keep it selected between computing and project
1170 1161
     // preference pages
1171 1162
     $_SESSION['prefs venue'] = $venue;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
 /**
234 234
  * Implementation of hook_locale().
235 235
  */
236
-function boincwork_locale($op = 'groups', $group = NULL) {
236
+function boincwork_locale($op = 'groups', $group = null) {
237 237
   switch ($op) {
238 238
     case 'groups':
239 239
       return array('project' => bts('Project'));
240 240
     case 'info':
241 241
       $info['project']['refresh callback'] = 'boincwork_locale_refresh';
242
-      $info['project']['format'] = FALSE;
242
+      $info['project']['format'] = false;
243 243
       return $info;
244 244
   }
245 245
 }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     'project_specific' => array(),
256 256
   );
257 257
   boincwork_add_project_specific_prefs($form, $prefs);
258
-  return TRUE; // Meaning it completed with no issues
258
+  return true; // Meaning it completed with no issues
259 259
 }
260 260
 
261 261
 
@@ -276,14 +276,14 @@  discard block
 block discarded – undo
276 276
   if ($user->uid != $author->uid) {
277 277
     if ($vars['message']['is_blocked']) {
278 278
       $vars['message_actions']['unignore_user'] = array(
279
-        'title' => bts('Stop Ignoring User', array(), NULL, 'boinc:ignore-user-remove'),
279
+        'title' => bts('Stop Ignoring User', array(), null, 'boinc:ignore-user-remove'),
280 280
         'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
281 281
         'query' => 'destination=messages/view/' . $thread_id,
282 282
       );
283 283
     }
284 284
     else {
285 285
       $vars['message_actions']['ignore_user'] = array(
286
-        'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
286
+        'title' => bts('Ignore User', array(), null, 'boinc:ignore-user-add'),
287 287
         'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
288 288
         'query' => 'destination=messages/view/' . $thread_id,
289 289
       );
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
   require_boinc('boinc_db');
300 300
   $num_deleted = BoincHostDeleted::delete_expired();
301 301
   if ($num_deleted>0) {
302
-    watchdog('boincwork', "Deleted ${num_deleted} hosts from host_deleted table", WATCHDOG_NOTICE);
302
+    watchdog('boincwork', "deleted ${num_deleted} hosts from host_deleted table", WATCHDOG_NOTICE);
303 303
   }
304 304
 }
305 305
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
   * General preferences menu callback.
312 312
   * Called when user goes to edit preferences page
313 313
   */
314
-function generalprefs_page($action = null, $venue = null, $advanced = FALSE) {
314
+function generalprefs_page($action = null, $venue = null, $advanced = false) {
315 315
 
316 316
   // Keep the venue selected across preference pages
317 317
   boincwork_select_venue($venue);
@@ -326,8 +326,8 @@  discard block
 block discarded – undo
326 326
 
327 327
   case 'clear':
328 328
     // Remove settings from this preference set
329
-    if ($venue AND $venue != 'generic') {
330
-      boincwork_save_prefs(NULL, 'general', $venue);
329
+    if ($venue and $venue != 'generic') {
330
+      boincwork_save_prefs(null, 'general', $venue);
331 331
       drupal_set_message(t('Settings for the "@name" preference set have been
332 332
         cleared', array('@name' => ucfirst($venue))));
333 333
       // Set the generic preference set as active
@@ -345,10 +345,10 @@  discard block
 block discarded – undo
345 345
       drupal_prepare_form('boincwork_generalprefs_form', $prefs[$pref_set], $form_state);
346 346
     }
347 347
 
348
-    $output .= '<p>' . bts('These apply to all BOINC projects in which you participate.', array(), NULL, 'boinc:account-preferences-computing') . '<br/>';
349
-    $output .= bts('On computers attached to multiple projects, the most recently modified preferences will be used.', array(), NULL, 'boinc:account-preferences-computing') . '</p>';
350
-    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['prefs']['modified']['#value'])), NULL, 'boinc:account-preferences') . '</p>';
351
-    $output .= '<h2>' . bts('Combined preferences', array(), NULL, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing') . '</h2>';
348
+    $output .= '<p>' . bts('These apply to all BOINC projects in which you participate.', array(), null, 'boinc:account-preferences-computing') . '<br/>';
349
+    $output .= bts('On computers attached to multiple projects, the most recently modified preferences will be used.', array(), null, 'boinc:account-preferences-computing') . '</p>';
350
+    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['prefs']['modified']['#value'])), null, 'boinc:account-preferences') . '</p>';
351
+    $output .= '<h2>' . bts('Combined preferences', array(), null, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/computing') . '</h2>';
352 352
 
353 353
     $output .= '<table class="preferences combined">';
354 354
 
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
           'daily_xfer_limit_mb' => 'daily_xfer_period_days',
371 371
         );
372 372
         $special_delimiter = array(
373
-          'start_hour' => bts('and', array(), NULL, 'boinc:account-preference'),
374
-          'net_start_hour'=> bts('and', array(), NULL, 'boinc:account-preference'),
375
-          'daily_xfer_limit_mb' => bts('every', array(), NULL, 'boinc:account-preference'),
373
+          'start_hour' => bts('and', array(), null, 'boinc:account-preference'),
374
+          'net_start_hour'=> bts('and', array(), null, 'boinc:account-preference'),
375
+          'daily_xfer_limit_mb' => bts('every', array(), null, 'boinc:account-preference'),
376 376
         );
377 377
         $special = isset($special_map[$name]);
378 378
         $very_special = in_array($name, $special_map);
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
         // Output values for each preference set, again with ugly hacks for
388 388
         // time range preferences
389 389
         foreach ($pref_sets as $pref_set) {
390
-          if (($prefs[$pref_set]) AND
391
-              $prefs[$pref_set]['#established'] AND
390
+          if (($prefs[$pref_set]) and
391
+              $prefs[$pref_set]['#established'] and
392 392
               isset($prefs[$pref_set]['prefs']['advanced'][$category])) {
393 393
             $pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$name];
394 394
             $value = isset($pref_setting['#options']) ? $pref_setting['#options'][$pref_setting['#default_value']] : $pref_setting['#default_value'];
@@ -431,19 +431,19 @@  discard block
 block discarded – undo
431 431
     $output .= '<tr>';
432 432
     $output .= '<td></td>';
433 433
     foreach ($pref_sets as $pref_set) {
434
-      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
434
+      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), null, 'boinc:form-edit') : bts('Add', array(), null, 'boinc:form-add');
435 435
       $output .= '<td><ul class="tab-list"><li class="first tab">';
436 436
       $output .= l($action_text, "account/prefs/computing/edit/{$pref_set}/1",
437 437
         array('fragment' => "")
438 438
       );
439 439
       // Show Clear links for established preference sets
440
-      if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
441
-        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$pref_set}",
440
+      if ($pref_set != 'generic' and $prefs[$pref_set]['#established']) {
441
+        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/computing/clear/{$pref_set}",
442 442
           array(
443 443
             'query' => drupal_get_destination(),
444 444
             'attributes' => array(
445 445
               'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
446
-                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-computing-preferences') . '\')'
446
+                array('@name' => ucfirst($pref_set)), null, 'boinc:account-computing-preferences') . '\')'
447 447
             )
448 448
           )
449 449
         );
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
     if (function_exists('jump_quickly')) {
464 464
       $path = 'account/prefs/computing/edit';
465 465
       $venues = array(
466
-        "{$path}/generic" => bts('Generic', array(), NULL, 'boinc:account-preferences-location'),
467
-        "{$path}/home" => bts('Home', array(), NULL, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
468
-        "{$path}/school" => bts('School', array(), NULL, 'boinc:account-preferences-location'),
469
-        "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
466
+        "{$path}/generic" => bts('Generic', array(), null, 'boinc:account-preferences-location'),
467
+        "{$path}/home" => bts('Home', array(), null, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
468
+        "{$path}/school" => bts('School', array(), null, 'boinc:account-preferences-location'),
469
+        "{$path}/work" => bts('Work', array(), null, 'boinc:account-preferences-location')
470 470
       );
471 471
       variable_set('jump_use_js_venues-Array', 1);
472 472
       drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
       $output .= '  </div>';
480 480
       $output .= '</div>';
481 481
     }
482
-    $output .= drupal_get_form('boincwork_generalprefs_form', $venue, NULL, $advanced);
482
+    $output .= drupal_get_form('boincwork_generalprefs_form', $venue, null, $advanced);
483 483
 
484 484
     // If viewing the edit page for a preference set that doesn't
485 485
     // exist, inform the user that preferences are not set.
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
       drupal_set_message(bts(
492 492
           "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
493 493
           array( '@venue' => $venue, ),
494
-          NULL, 'boinc:account-preferences'), 'status');
494
+          null, 'boinc:account-preferences'), 'status');
495 495
     }
496 496
 
497 497
     break;
@@ -521,8 +521,8 @@  discard block
 block discarded – undo
521 521
 
522 522
   case 'clear':
523 523
     // Remove settings from this preference set
524
-    if ($venue AND $venue != 'generic') {
525
-      boincwork_save_prefs(NULL, 'project', $venue);
524
+    if ($venue and $venue != 'generic') {
525
+      boincwork_save_prefs(null, 'project', $venue);
526 526
       drupal_set_message(t('Settings for the "@name" preference set have been
527 527
         cleared', array('@name' => ucfirst($venue))));
528 528
 
@@ -549,8 +549,8 @@  discard block
 block discarded – undo
549 549
       drupal_prepare_form('boincwork_projectprefs_form', $prefs[$pref_set], $form_state);
550 550
     }
551 551
 
552
-    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['modified']['#value'])), NULL, 'boinc:account-preferences') . '</p>';
553
-    $output .= '<h2>' . bts('Combined preferences', array(), NULL, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project') . '</h2>';
552
+    $output .= '<p>' . bts('Preferences last modified: @mod_time', array('@mod_time' => pretty_time_str($prefs['generic']['modified']['#value'])), null, 'boinc:account-preferences') . '</p>';
553
+    $output .= '<h2>' . bts('Combined preferences', array(), null, 'boinc:account-preferences') . ' ' . l('(' . bts('Switch View', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/project') . '</h2>';
554 554
 
555 555
     $output .= '<table class="preferences combined">';
556 556
 
@@ -570,8 +570,8 @@  discard block
 block discarded – undo
570 570
         $output .= "<div class=\"description\">{$setting['description']}</div>";
571 571
         $output .= '</td>';
572 572
         foreach ($pref_sets as $pref_set) {
573
-          if (($prefs[$pref_set]) AND
574
-              $prefs[$pref_set]['#established'] AND
573
+          if (($prefs[$pref_set]) and
574
+              $prefs[$pref_set]['#established'] and
575 575
               isset($prefs[$pref_set][$category])) {
576 576
             $pref_setting = $prefs[$pref_set][$category][$name];
577 577
             $value = isset($pref_setting['#options']) ? $pref_setting['#options'][$pref_setting['#default_value']] : $pref_setting['#default_value'];
@@ -597,17 +597,17 @@  discard block
 block discarded – undo
597 597
     $output .= '<tr>';
598 598
     $output .= '<td></td>';
599 599
     foreach ($pref_sets as $pref_set) {
600
-      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), NULL, 'boinc:form-edit') : bts('Add', array(), NULL, 'boinc:form-add');
600
+      $action_text = ($prefs[$pref_set]['#established']) ? bts('Edit', array(), null, 'boinc:form-edit') : bts('Add', array(), null, 'boinc:form-add');
601 601
       $output .= '<td><ul class="tab-list"><li class="first tab">';
602 602
       $output .= l($action_text, "account/prefs/project/edit/{$pref_set}");
603 603
       // Show Clear links for established preference sets
604
-      if ($pref_set != 'generic' AND $prefs[$pref_set]['#established']) {
605
-        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$pref_set}",
604
+      if ($pref_set != 'generic' and $prefs[$pref_set]['#established']) {
605
+        $output .= ' </li><li class="tab"> ' . l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/project/clear/{$pref_set}",
606 606
           array(
607 607
             'query' => drupal_get_destination(),
608 608
             'attributes' => array(
609 609
               'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the "@name" preference set. Are you sure?',
610
-                array('@name' => ucfirst($pref_set)), NULL, 'boinc:account-preferences-project') . '\')'
610
+                array('@name' => ucfirst($pref_set)), null, 'boinc:account-preferences-project') . '\')'
611 611
             )
612 612
           )
613 613
         );
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
     // Set this preference set as the one to use for any new hosts attached
624 624
     // to the user account
625 625
     boincwork_set_default_venue($venue);
626
-    drupal_set_message( bts('The primary preference set has been changed to "@set"', array('@set' => $venue), NULL, 'boinc:account-preferences-project') );
626
+    drupal_set_message( bts('The primary preference set has been changed to "@set"', array('@set' => $venue), null, 'boinc:account-preferences-project') );
627 627
     drupal_goto('account/prefs/project/combined');
628 628
     break;
629 629
 
@@ -636,10 +636,10 @@  discard block
 block discarded – undo
636 636
     if (function_exists('jump_quickly')) {
637 637
       $path = 'account/prefs/project/edit';
638 638
       $venues = array(
639
-        "{$path}/generic" => bts('Generic', array(), NULL, 'boinc:account-preferences-location'),
640
-        "{$path}/home" => bts('Home', array(), NULL, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
641
-        "{$path}/school" => bts('School', array(), NULL, 'boinc:account-preferences-location'),
642
-        "{$path}/work" => bts('Work', array(), NULL, 'boinc:account-preferences-location')
639
+        "{$path}/generic" => bts('Generic', array(), null, 'boinc:account-preferences-location'),
640
+        "{$path}/home" => bts('Home', array(), null, 'boinc:account-preferences-location:-1:ignoreoverwrite'),
641
+        "{$path}/school" => bts('School', array(), null, 'boinc:account-preferences-location'),
642
+        "{$path}/work" => bts('Work', array(), null, 'boinc:account-preferences-location')
643 643
       );
644 644
       variable_set('jump_use_js_venues-Array', 1);
645 645
       drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js');
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
       drupal_set_message(bts(
665 665
           "No preferences found for set '@venue'. Click SAVE CHANGES below to save the following preferences to your account.",
666 666
           array( '@venue' => $venue, ),
667
-          NULL, 'boinc:account-preferences'), 'status');
667
+          null, 'boinc:account-preferences'), 'status');
668 668
     }
669 669
 
670 670
     break;
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
       foreach ($section as $name => $setting) {
721 721
         if ($name{0} == '#') continue;
722 722
         $value = isset($setting['#default_value']) ? $setting['#default_value'] : '';
723
-        if ($value AND isset($setting['#options'])) $value = $setting['#options'][$value];
723
+        if ($value and isset($setting['#options'])) $value = $setting['#options'][$value];
724 724
         elseif ($value == '') $value = '---';
725 725
         if (!isset($setting['#title'])) $setting['#title'] = '';
726 726
         if (!isset($setting['#description'])) $setting['#description'] = '';
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
     // Edit preferences link
736 736
     $output .= '<tr>';
737 737
     $output .= '<td></td>';
738
-    $output .= '<td>' . l(bts('Edit privacy preferences', array('@project' => PROJECT), NULL, 'boinc:account-preferences-privacy'), "account/prefs/privacy/edit") . '</td>';
738
+    $output .= '<td>' . l(bts('Edit privacy preferences', array('@project' => PROJECT), null, 'boinc:account-preferences-privacy'), "account/prefs/privacy/edit") . '</td>';
739 739
     $output .= '</tr>';
740 740
 
741 741
     $output .= '</table>';
@@ -967,17 +967,17 @@  discard block
 block discarded – undo
967 967
 function boincwork_host_log($host_id = null) {
968 968
   $root_log_dir = variable_get('boinc_host_sched_logs_dir', '');
969 969
   $log = '';
970
-  if ($root_log_dir AND $host_id) {
971
-    $subdir = substr($host_id, 0, -3) OR $subdir = 0;
970
+  if ($root_log_dir and $host_id) {
971
+    $subdir = substr($host_id, 0, -3) or $subdir = 0;
972 972
     $log = implode('/', array($root_log_dir, $subdir, $host_id));
973 973
   }
974
-  if ($log AND file_exists($log)) {
974
+  if ($log and file_exists($log)) {
975 975
     header('Content-type: text/plain');
976 976
     include($log);
977 977
   }
978 978
 }
979 979
 
980
-function boincwork_host_set_venue($host_id = NULL, $venue = NULL) {
980
+function boincwork_host_set_venue($host_id = null, $venue = null) {
981 981
   global $user;
982 982
   $account = user_load($user->uid);
983 983
   db_set_active('boinc_ro');
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
     $host_id
988 988
   ));
989 989
   db_set_active('default');
990
-  if ($host_owner AND $host_owner == $account->boincuser_id) {
990
+  if ($host_owner and $host_owner == $account->boincuser_id) {
991 991
     db_set_active('boinc_rw');
992 992
     $updated = db_query(
993 993
       "UPDATE {host} SET venue = '%s' WHERE id = '%d'",
@@ -996,20 +996,20 @@  discard block
 block discarded – undo
996 996
     db_set_active('default');
997 997
     if ($updated) {
998 998
       drupal_set_message(
999
-        bts('The location for this host has been updated.', array(), NULL, 'boinc:account-host-details')
1000
-        . bts('This will take effect next time the host contacts the project.', array(), NULL, 'boinc:account-host-details')
999
+        bts('The location for this host has been updated.', array(), null, 'boinc:account-host-details')
1000
+        . bts('This will take effect next time the host contacts the project.', array(), null, 'boinc:account-host-details')
1001 1001
       );
1002 1002
     }
1003 1003
     else {
1004 1004
       drupal_set_message(
1005
-        bts('Unable to save changes to this host for some reason!', array(), NULL, 'boinc:account-host-details'),
1005
+        bts('Unable to save changes to this host for some reason!', array(), null, 'boinc:account-host-details'),
1006 1006
         'error'
1007 1007
       );
1008 1008
     }
1009 1009
   }
1010 1010
   else {
1011 1011
     drupal_set_message(
1012
-      bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1012
+      bts('You are not allowed to make changes to this host.', array(), null, 'boinc:account-host-details'),
1013 1013
       'warning'
1014 1014
     );
1015 1015
   }
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
 
1062 1062
   // obtain Drupal variables
1063 1063
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
1064
-  $overrideboinctou = variable_get('boinc_weboptions_overrideboinctou', FALSE);
1064
+  $overrideboinctou = variable_get('boinc_weboptions_overrideboinctou', false);
1065 1065
 
1066 1066
   // If terms of use string exists and override is true, set terms-of-use
1067 1067
   // to Drupal varaible.
@@ -1099,8 +1099,8 @@  discard block
 block discarded – undo
1099 1099
 /**
1100 1100
  * Page callback for user account task table
1101 1101
  */
1102
-function boincwork_account_task_table($tselect = NULL, $app_id = NULL) {
1103
-  $title = bts('Tasks for your account', array(), NULL, 'boinc:account-task-table');
1102
+function boincwork_account_task_table($tselect = null, $app_id = null) {
1103
+  $title = bts('Tasks for your account', array(), null, 'boinc:account-task-table');
1104 1104
   drupal_set_title($title);
1105 1105
 
1106 1106
   global $user;
@@ -1111,14 +1111,14 @@  discard block
 block discarded – undo
1111 1111
 /**
1112 1112
  * Page callback for host task table
1113 1113
  */
1114
-function boincwork_host_task_table($host_id = NULL, $tselect = NULL, $app_id = NULL) {
1114
+function boincwork_host_task_table($host_id = null, $tselect = null, $app_id = null) {
1115 1115
   require_boinc( array('util', 'result') );
1116 1116
 
1117
-  $title = bts('Tasks for computer @host_id', array('@host_id' => $host_id), NULL, 'boinc:host-task-table');
1117
+  $title = bts('Tasks for computer @host_id', array('@host_id' => $host_id), null, 'boinc:host-task-table');
1118 1118
   drupal_set_title($title);
1119 1119
 
1120 1120
   if (is_null($host_id)) {
1121
-    drupal_set_message(bts('ERROR: Invalid host ID', array(), NULL, 'boinc:host-task-table'), 'error');
1121
+    drupal_set_message(bts('ERROR: Invalid host ID', array(), null, 'boinc:host-task-table'), 'error');
1122 1122
     return '';
1123 1123
   }
1124 1124
 
@@ -1128,12 +1128,12 @@  discard block
 block discarded – undo
1128 1128
 /**
1129 1129
  * Page callback for workunit task table
1130 1130
  */
1131
-function boincwork_workunit_task_table($workunit_id = NULL, $tselect = NULL, $app_id = NULL) {
1132
-  $title = bts('Tasks for workunit @workunit_id', array('@workunit_id' => $workunit_id), NULL, 'boinc:workunit-task-table');
1131
+function boincwork_workunit_task_table($workunit_id = null, $tselect = null, $app_id = null) {
1132
+  $title = bts('Tasks for workunit @workunit_id', array('@workunit_id' => $workunit_id), null, 'boinc:workunit-task-table');
1133 1133
   drupal_set_title($title);
1134 1134
 
1135 1135
   if (is_null($workunit_id)) {
1136
-    drupal_set_message(bts('ERROR: Invalid workunit ID', array(), NULL, 'boinc:workunit-task-table'), 'error');
1136
+    drupal_set_message(bts('ERROR: Invalid workunit ID', array(), null, 'boinc:workunit-task-table'), 'error');
1137 1137
     return '';
1138 1138
   }
1139 1139
 
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
  */
1160 1160
 function boincwork_select_venue(&$venue) {
1161 1161
   if (!$venue) {
1162
-    $active_venue = isset($_SESSION['prefs venue']) ? $_SESSION['prefs venue'] : NULL;
1162
+    $active_venue = isset($_SESSION['prefs venue']) ? $_SESSION['prefs venue'] : null;
1163 1163
     if ($active_venue) {
1164 1164
       $venue = $active_venue;
1165 1165
       //unset($_SESSION['prefs venue']);
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinctranslate/boinctranslate.admin.inc 4 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@
 block discarded – undo
301 301
           
302 302
           if ($response == '404 NOT FOUND') {
303 303
             form_set_error(
304
-              'boinc_translate_transifex_' . ($project == $boinc_name ? 'standard' : 'project') . '_resources',
304
+              'boinc_translate_transifex_'.($project == $boinc_name ? 'standard' : 'project').'_resources',
305 305
               t('Resource %name not found in %project.',
306 306
                 array(
307 307
                   '%name' => $resource,
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -220,8 +220,7 @@  discard block
 block discarded – undo
220 220
   if (!$values['boinc_translate_transifex_pass']) {
221 221
     if (!variable_get('boinc_translate_transifex_pass', '')) {
222 222
       form_set_error('boinc_translate_transifex_pass', t('Password is required.'));
223
-    }
224
-    else {
223
+    } else {
225 224
       unset($form_state['values']['boinc_translate_transifex_pass']);
226 225
     }
227 226
   }
@@ -260,8 +259,7 @@  discard block
 block discarded – undo
260 259
           'boinc_translate_transifex_pass',
261 260
           t('Transifex authentication failed.')
262 261
         );
263
-      }
264
-      else {
262
+      } else {
265 263
         $authenticated = TRUE;
266 264
       }
267 265
     }
@@ -278,14 +276,12 @@  discard block
 block discarded – undo
278 276
       );
279 277
       if ($project_name AND $project_resources) {
280 278
         $transifex_resources[$project_name] = $project_resources;
281
-      }
282
-      elseif ($project_name AND !$project_resources) {
279
+      } elseif ($project_name AND !$project_resources) {
283 280
         drupal_set_message(
284 281
           t('No project-specific resources were provided'),
285 282
           'warning'
286 283
         );
287
-      }
288
-      elseif ($project_resources AND !$project_name) {
284
+      } elseif ($project_resources AND !$project_name) {
289 285
         drupal_set_message(
290 286
           t('No project-specific Transifex project name was provided'),
291 287
           'warning'
Please login to merge, or discard this patch.
Indentation   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -7,85 +7,85 @@  discard block
 block discarded – undo
7 7
 */
8 8
 
9 9
 /**
10
-  * The BOINC translation settings form allows configuration of BTS integration
11
-  * (and other translation related settings)
12
-  */
10
+ * The BOINC translation settings form allows configuration of BTS integration
11
+ * (and other translation related settings)
12
+ */
13 13
 function boinctranslate_admin_settings(&$form_state) {
14
-  $form = array();
15
-  $initialized = FALSE;
16
-  $import_enabled = FALSE;
17
-  $default = array(
14
+    $form = array();
15
+    $initialized = FALSE;
16
+    $import_enabled = FALSE;
17
+    $default = array(
18 18
     'transifex_user' => variable_get('boinc_translate_transifex_user', ''),
19 19
     'transifex_pass' => variable_get('boinc_translate_transifex_pass', ''),
20 20
     'transifex_boinc_name' => variable_get(
21
-      'boinc_translate_transifex_standard_name', 'boinc'
21
+        'boinc_translate_transifex_standard_name', 'boinc'
22 22
     ),
23 23
     'transifex_boinc_resources' => variable_get(
24
-      'boinc_translate_transifex_standard_resources',
25
-      "project-generic\nweb"
24
+        'boinc_translate_transifex_standard_resources',
25
+        "project-generic\nweb"
26 26
     ),
27 27
     'transifex_boinc_drupal_resource' => variable_get(
28
-      'boinc_translate_transifex_boinc_drupal_resource',
29
-      'drupal'
28
+        'boinc_translate_transifex_boinc_drupal_resource',
29
+        'drupal'
30 30
     ),
31 31
     'transifex_project_name' => variable_get(
32
-      'boinc_translate_transifex_project_name', ''
32
+        'boinc_translate_transifex_project_name', ''
33 33
     ),
34 34
     'transifex_project_resources' => variable_get(
35
-      'boinc_translate_transifex_project_resources', ''
35
+        'boinc_translate_transifex_project_resources', ''
36 36
     ),
37
-  );
37
+    );
38 38
 
39
-  if ($default['transifex_user'] AND $default['transifex_pass']) {
39
+    if ($default['transifex_user'] AND $default['transifex_pass']) {
40 40
     if (trim($default['transifex_boinc_resources'])
41 41
     OR trim($default['transifex_project_resources'])) {
42
-      $import_enabled = TRUE;
42
+        $import_enabled = TRUE;
43 43
     }
44 44
     if ($default['transifex_boinc_name']
45 45
     AND $default['transifex_project_name']
46 46
     AND trim($default['transifex_boinc_resources'])
47 47
     AND trim($default['transifex_project_resources'])) {
48
-      $initialized = TRUE;
48
+        $initialized = TRUE;
49
+    }
49 50
     }
50
-  }
51 51
 
52
-  // Define the form
52
+    // Define the form
53 53
 
54
-  $form['transifex'] = array(
54
+    $form['transifex'] = array(
55 55
     '#title' => t('Transifex settings'),
56 56
     '#type' => 'fieldset',
57 57
     '#description' => '',
58 58
     '#collapsible' => TRUE,
59 59
     '#collapsed' => $initialized,
60 60
     '#attributes' => array('class' => '')
61
-  );
62
-  $form['transifex']['boinc_translate_transifex_user'] = array(
61
+    );
62
+    $form['transifex']['boinc_translate_transifex_user'] = array(
63 63
     '#type' => 'textfield',
64 64
     '#title' => t('User name'),
65 65
     '#default_value' => $default['transifex_user'],
66
-  );
67
-  $form['transifex']['boinc_translate_transifex_pass'] = array(
66
+    );
67
+    $form['transifex']['boinc_translate_transifex_pass'] = array(
68 68
     '#type' => 'password',
69 69
     '#title' => t('Password'),
70 70
     '#attributes' => array(
71
-      'placeholder' => $default['transifex_pass'] ? '********' : '',
71
+        'placeholder' => $default['transifex_pass'] ? '********' : '',
72 72
     ),
73
-  );
74
-  $form['transifex']['boinc_translate_transifex_standard_name'] = array(
73
+    );
74
+    $form['transifex']['boinc_translate_transifex_standard_name'] = array(
75 75
     '#type' => 'textfield',
76 76
     '#title' => t('BOINC Transifex project'),
77 77
     '#default_value' => $default['transifex_boinc_name'],
78 78
     '#description' => t('The portion of the Transifex URL that identifies BOINC.'),
79
-  );
80
-  $form['transifex']['boinc_translate_transifex_boinc_drupal_resource'] = array(
79
+    );
80
+    $form['transifex']['boinc_translate_transifex_boinc_drupal_resource'] = array(
81 81
     '#type' => 'textfield',
82 82
     '#title' => t('Official BOINC Drupal Resource'),
83 83
     '#default_value' => $default['transifex_boinc_drupal_resource'],
84 84
     '#description' => t('The portion of the Transifex URL that identifies
85 85
       the standard BOINC Resource to use for translation of the public
86 86
       content defined in the Drupal system.'),
87
-  );
88
-  $form['transifex']['boinc_translate_transifex_standard_resources'] = array(
87
+    );
88
+    $form['transifex']['boinc_translate_transifex_standard_resources'] = array(
89 89
     '#type' => 'textarea',
90 90
     '#title' => t('Additional BOINC Resources'),
91 91
     '#default_value' => $default['transifex_boinc_resources'],
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
       by any matching translations found in Resources further down the list.
97 97
       Note that strings from the Official BOINC Drupal Resource will override
98 98
       any strings from these additional Resources.'),
99
-  );
100
-  $form['transifex']['boinc_translate_transifex_project_name'] = array(
99
+    );
100
+    $form['transifex']['boinc_translate_transifex_project_name'] = array(
101 101
     '#type' => 'textfield',
102 102
     '#title' => t('Project-specific Transifex project'),
103 103
     '#default_value' => $default['transifex_project_name'],
104 104
     '#description' => t('The portion of the Transifex URL that identifies this project.'),
105
-  );
106
-  $form['transifex']['boinc_translate_transifex_project_resources'] = array(
105
+    );
106
+    $form['transifex']['boinc_translate_transifex_project_resources'] = array(
107 107
     '#type' => 'textarea',
108 108
     '#title' => t('Project-specific Resources'),
109 109
     '#default_value' => $default['transifex_project_resources'],
@@ -116,241 +116,241 @@  discard block
 block discarded – undo
116 116
       NOTE: The first Resource listed here is considered the primary Resource
117 117
       for project-specific translations and will be updated by the "Update
118 118
       project-specific Resources" button below!'),
119
-  );
120
-  $form['transifex']['buttons']['submit'] = array(
119
+    );
120
+    $form['transifex']['buttons']['submit'] = array(
121 121
     '#type' => 'submit',
122 122
     '#value' => t('Save configuration'),
123
-  );
123
+    );
124 124
 
125
-  $form['tools'] = array(
125
+    $form['tools'] = array(
126 126
     '#title' => t('Tools'),
127 127
     '#type' => 'fieldset',
128 128
     '#description' => '',
129 129
     '#collapsible' => TRUE,
130 130
     '#collapsed' => FALSE,
131 131
     '#attributes' => array('class' => '')
132
-  );
133
-  $form['tools']['initialize_languages_text'] = array(
132
+    );
133
+    $form['tools']['initialize_languages_text'] = array(
134 134
     '#type' => 'item',
135 135
     '#title' => t('Install official BOINC languages'),
136 136
     '#value' => t('Installs all languages from the BOINC Transifex project. Also installs missing languages in Drupal. <br>Languages must be enabled manually in Administer > Site configuration > Languages.'),
137
-  );
138
-  $form['tools']['initialize_languages'] = array(
137
+    );
138
+    $form['tools']['initialize_languages'] = array(
139 139
     '#type' => 'button',
140 140
     '#value' => t('Install official BOINC languages'),
141 141
     '#executes_submit_callback' => TRUE,
142 142
     '#submit' => array('boinctranslate_admin_settings_initialize_languages'),
143 143
     '#disabled' => !$initialized,
144
-  );
145
-  $form['tools']['import_now_text'] = array(
144
+    );
145
+    $form['tools']['import_now_text'] = array(
146 146
     '#type' => 'item',
147 147
     '#title' => t('Import all translations'),
148 148
     '#value' => t('Imports from Tranifex all configured Resources into their respective text groups.'),
149
-  );
150
-  $form['tools']['import_now'] = array(
149
+    );
150
+    $form['tools']['import_now'] = array(
151 151
     '#type' => 'button',
152 152
     '#value' => t('Import all translations'),
153 153
     '#executes_submit_callback' => TRUE,
154 154
     '#submit' => array('boinctranslate_admin_settings_import_now'),
155 155
     '#disabled' => !$import_enabled,
156
-  );
157
-  $form['tools']['download_boinc_pot_text'] = array(
156
+    );
157
+    $form['tools']['download_boinc_pot_text'] = array(
158 158
     '#type' => 'item',
159 159
     '#title' => t('Download official BOINC-Drupal .pot'),
160 160
     '#value' => t('Downloads the generic BOINC-Drupal .pot file. This is the template file for the boinc text group.'),
161
-  );
162
-  $form['tools']['download_boinc_pot'] = array(
161
+    );
162
+    $form['tools']['download_boinc_pot'] = array(
163 163
     '#type' => 'button',
164 164
     '#value' => t('Download official BOINC-Drupal .pot'),
165 165
     '#executes_submit_callback' => TRUE,
166 166
     '#submit' => array('boinctranslate_admin_settings_download_boinc_pot'),
167 167
     '#disabled' => !$import_enabled,
168
-  );
169
-  $form['tools']['download_project_pot_text'] = array(
168
+    );
169
+    $form['tools']['download_project_pot_text'] = array(
170 170
     '#type' => 'item',
171 171
     '#title' => t('Download project-specific .pot'),
172 172
     '#value' => t('Downloads the project-specific .pot file. This is the template file for the project text group.'),
173
-  );
174
-  $form['tools']['download_project_pot'] = array(
173
+    );
174
+    $form['tools']['download_project_pot'] = array(
175 175
     '#type' => 'button',
176 176
     '#value' => t('Download project-specific .pot'),
177 177
     '#executes_submit_callback' => TRUE,
178 178
     '#submit' => array('boinctranslate_admin_settings_download_project_pot'),
179 179
     '#disabled' => !$import_enabled,
180
-  );
181
-  if (user_access('update official BOINC translations')) {
180
+    );
181
+    if (user_access('update official BOINC translations')) {
182 182
     $form['tools']['update_official_boinc_text'] = array(
183
-      '#type' => 'item',
184
-      '#title' => t('Update official BOINC translations'),
185
-      '#value' => t('Updates the official BOINC-Drupal Resource (translatable strings templates) to the BOINC Transifex project, based on the consolidated imported translations.<br><b>WARNING: Do not use unless you have write-access to the BOINC Transifex project.</b>'),
183
+        '#type' => 'item',
184
+        '#title' => t('Update official BOINC translations'),
185
+        '#value' => t('Updates the official BOINC-Drupal Resource (translatable strings templates) to the BOINC Transifex project, based on the consolidated imported translations.<br><b>WARNING: Do not use unless you have write-access to the BOINC Transifex project.</b>'),
186 186
     );
187 187
     $form['tools']['update_official_boinc'] = array(
188
-      '#type' => 'button',
189
-      '#value' => t('Update official BOINC translations'),
190
-      '#executes_submit_callback' => TRUE,
191
-      '#submit' => array('boinctranslate_admin_settings_update_official_boinc'),
192
-      '#disabled' => !$import_enabled,
188
+        '#type' => 'button',
189
+        '#value' => t('Update official BOINC translations'),
190
+        '#executes_submit_callback' => TRUE,
191
+        '#submit' => array('boinctranslate_admin_settings_update_official_boinc'),
192
+        '#disabled' => !$import_enabled,
193 193
     );
194
-  }
195
-  $form['tools']['export_now_text'] = array(
194
+    }
195
+    $form['tools']['export_now_text'] = array(
196 196
     '#type' => 'item',
197 197
     '#title' => t('Update project-specific Resources'),
198 198
     '#value' => t('Updates the configured Resources (translatable strings templates) to the project\'s Transifex project.<br><b>WARNING: Do not use unless you have write-access to your project\'s Transifex project.</b>'),
199
-  );
200
-  $form['tools']['export_now'] = array(
199
+    );
200
+    $form['tools']['export_now'] = array(
201 201
     '#type' => 'button',
202 202
     '#value' => t('Update project-specific Resources'),
203 203
     '#executes_submit_callback' => TRUE,
204 204
     '#submit' => array('boinctranslate_admin_settings_export_now'),
205 205
     '#disabled' => !$import_enabled,
206
-  );
206
+    );
207 207
 
208
-  $form['#submit'][] = 'system_settings_form_submit';
209
-  $form['#theme'] = 'system_settings_form';
208
+    $form['#submit'][] = 'system_settings_form_submit';
209
+    $form['#theme'] = 'system_settings_form';
210 210
 
211
-  return $form;
211
+    return $form;
212 212
 }
213 213
 
214 214
 function boinctranslate_admin_settings_export_now() {
215
-  drupal_goto('admin/boinc/translation/export');
215
+    drupal_goto('admin/boinc/translation/export');
216 216
 }
217 217
 
218 218
 function boinctranslate_admin_settings_import_now() {
219
-  drupal_goto('admin/boinc/translation/import');
219
+    drupal_goto('admin/boinc/translation/import');
220 220
 }
221 221
 
222 222
 function boinctranslate_admin_settings_initialize_languages() {
223
-  drupal_goto('admin/boinc/translation/initialize-languages');
223
+    drupal_goto('admin/boinc/translation/initialize-languages');
224 224
 }
225 225
 
226 226
 function boinctranslate_admin_settings_update_official_boinc() {
227
-  drupal_goto('admin/boinc/translation/update-official-boinc');
227
+    drupal_goto('admin/boinc/translation/update-official-boinc');
228 228
 }
229 229
 
230 230
 function boinctranslate_admin_settings_download_boinc_pot() {
231
-  drupal_goto('admin/boinc/translation/download-pot/boinc');
231
+    drupal_goto('admin/boinc/translation/download-pot/boinc');
232 232
 }
233 233
 
234 234
 function boinctranslate_admin_settings_download_project_pot() {
235
-  drupal_goto('admin/boinc/translation/download-pot/project');
235
+    drupal_goto('admin/boinc/translation/download-pot/project');
236 236
 }
237 237
 
238 238
 
239 239
 /**
240
-  * Validate the BOINC translation settings form.
241
-  */
240
+ * Validate the BOINC translation settings form.
241
+ */
242 242
 function boinctranslate_admin_settings_validate($form, &$form_state) {
243
-  $values = $form_state['values'];
244
-  $errors = array();
245
-  $api_base_url = 'https://www.transifex.com/api/2';
243
+    $values = $form_state['values'];
244
+    $errors = array();
245
+    $api_base_url = 'https://www.transifex.com/api/2';
246 246
 
247
-  if (!$values['boinc_translate_transifex_user']) {
247
+    if (!$values['boinc_translate_transifex_user']) {
248 248
     form_set_error('boinc_translate_transifex_user', t('User name is required.'));
249
-  }
250
-  if (!$values['boinc_translate_transifex_pass']) {
249
+    }
250
+    if (!$values['boinc_translate_transifex_pass']) {
251 251
     if (!variable_get('boinc_translate_transifex_pass', '')) {
252
-      form_set_error('boinc_translate_transifex_pass', t('Password is required.'));
252
+        form_set_error('boinc_translate_transifex_pass', t('Password is required.'));
253 253
     }
254 254
     else {
255
-      unset($form_state['values']['boinc_translate_transifex_pass']);
255
+        unset($form_state['values']['boinc_translate_transifex_pass']);
256
+    }
256 257
     }
257
-  }
258
-  if (!$values['boinc_translate_transifex_standard_name']) {
258
+    if (!$values['boinc_translate_transifex_standard_name']) {
259 259
     form_set_error('boinc_translate_transifex_standard_name',
260
-      t('BOINC Transifex project name is required.')
260
+        t('BOINC Transifex project name is required.')
261 261
     );
262
-  }
263
-  if (!$values['boinc_translate_transifex_standard_resources']) {
262
+    }
263
+    if (!$values['boinc_translate_transifex_standard_resources']) {
264 264
     form_set_error('boinc_translate_transifex_standard_resources',
265
-      t('At least one BOINC Transifex project Resource is required.')
265
+        t('At least one BOINC Transifex project Resource is required.')
266 266
     );
267
-  }
268
-  if (!$values['boinc_translate_transifex_project_resources']) {
267
+    }
268
+    if (!$values['boinc_translate_transifex_project_resources']) {
269 269
     form_set_error('boinc_translate_transifex_project_resources',
270
-      t('At least one project-specific Transifex Resource is required.')
270
+        t('At least one project-specific Transifex Resource is required.')
271 271
     );
272
-  }
272
+    }
273 273
 
274
-  $username = $values['boinc_translate_transifex_user'];
275
-  $password = ($values['boinc_translate_transifex_pass']) ? $values['boinc_translate_transifex_pass'] : variable_get('boinc_translate_transifex_pass', '');
276
-  $boinc_name = $values['boinc_translate_transifex_standard_name'];
277
-  $boinc_resources = boinctranslate_parse_resources(
274
+    $username = $values['boinc_translate_transifex_user'];
275
+    $password = ($values['boinc_translate_transifex_pass']) ? $values['boinc_translate_transifex_pass'] : variable_get('boinc_translate_transifex_pass', '');
276
+    $boinc_name = $values['boinc_translate_transifex_standard_name'];
277
+    $boinc_resources = boinctranslate_parse_resources(
278 278
     $values['boinc_translate_transifex_standard_resources']
279
-  );
279
+    );
280 280
 
281
-  if ($username AND $password AND $boinc_name AND $boinc_resources) {
281
+    if ($username AND $password AND $boinc_name AND $boinc_resources) {
282 282
     // Test authentication
283 283
     $authenticated = FALSE;
284 284
     $path = "project/{$boinc_name}/resource/{$boinc_resources[0]}/translation/en";
285 285
     $response = boinctranslate_transifex_request($path, NULL, TRUE, FALSE, $username, $password);
286 286
 
287 287
     if ($response) {
288
-      if ($response == '401 UNAUTHORIZED') {
288
+        if ($response == '401 UNAUTHORIZED') {
289 289
         form_set_error(
290
-          'boinc_translate_transifex_pass',
291
-          t('Transifex authentication failed.')
290
+            'boinc_translate_transifex_pass',
291
+            t('Transifex authentication failed.')
292 292
         );
293
-      }
294
-      else {
293
+        }
294
+        else {
295 295
         $authenticated = TRUE;
296
-      }
296
+        }
297 297
     }
298 298
 
299 299
     if ($authenticated) {
300
-      // Prepare list of resources to validate
301
-      $transifex_resources = array(
300
+        // Prepare list of resources to validate
301
+        $transifex_resources = array(
302 302
         'boinc' => $boinc_resources,
303
-      );
304
-      // Parse project-specific resources
305
-      $project_name = trim($values['boinc_translate_transifex_project_name']);
306
-      $project_resources = boinctranslate_parse_resources(
303
+        );
304
+        // Parse project-specific resources
305
+        $project_name = trim($values['boinc_translate_transifex_project_name']);
306
+        $project_resources = boinctranslate_parse_resources(
307 307
         $values['boinc_translate_transifex_project_resources']
308
-      );
309
-      if ($project_name AND $project_resources) {
308
+        );
309
+        if ($project_name AND $project_resources) {
310 310
         $transifex_resources[$project_name] = $project_resources;
311
-      }
312
-      elseif ($project_name AND !$project_resources) {
311
+        }
312
+        elseif ($project_name AND !$project_resources) {
313 313
         drupal_set_message(
314
-          t('No project-specific resources were provided'),
315
-          'warning'
314
+            t('No project-specific resources were provided'),
315
+            'warning'
316 316
         );
317
-      }
318
-      elseif ($project_resources AND !$project_name) {
317
+        }
318
+        elseif ($project_resources AND !$project_name) {
319 319
         drupal_set_message(
320
-          t('No project-specific Transifex project name was provided'),
321
-          'warning'
320
+            t('No project-specific Transifex project name was provided'),
321
+            'warning'
322 322
         );
323
-      }
323
+        }
324 324
 
325
-      // Try to access the given resources
326
-      foreach ($transifex_resources as $project => $resources) {
325
+        // Try to access the given resources
326
+        foreach ($transifex_resources as $project => $resources) {
327 327
         foreach ($resources as $resource) {
328 328
 
329
-          $path = "project/{$project}/resource/{$resource}/translation/en";
330
-          $response = boinctranslate_transifex_request($path);
329
+            $path = "project/{$project}/resource/{$resource}/translation/en";
330
+            $response = boinctranslate_transifex_request($path);
331 331
 
332
-          if ($response == '404 NOT FOUND') {
332
+            if ($response == '404 NOT FOUND') {
333 333
             form_set_error(
334
-              'boinc_translate_transifex_' . ($project == $boinc_name ? 'standard' : 'project') . '_resources',
335
-              t('Resource %name not found in %project.',
334
+                'boinc_translate_transifex_' . ($project == $boinc_name ? 'standard' : 'project') . '_resources',
335
+                t('Resource %name not found in %project.',
336 336
                 array(
337
-                  '%name' => $resource,
338
-                  '%project' => $project,
337
+                    '%name' => $resource,
338
+                    '%project' => $project,
339
+                )
339 340
                 )
340
-              )
341 341
             );
342
-          }
342
+            }
343 343
         }
344
-      }
344
+        }
345
+    }
345 346
     }
346
-  }
347 347
 }
348 348
 
349 349
 /**
350
-  * Handle post-validation submission of BOINC translation settings form.
351
-  */
350
+ * Handle post-validation submission of BOINC translation settings form.
351
+ */
352 352
 function boinctranslate_admin_settings_submit($form, &$form_state) {
353
-  drupal_set_message(t('BOINC translation settings have been updated.'));
353
+    drupal_set_message(t('BOINC translation settings have been updated.'));
354 354
 }
355 355
 
356 356
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
   */
13 13
 function boinctranslate_admin_settings(&$form_state) {
14 14
   $form = array();
15
-  $initialized = FALSE;
16
-  $import_enabled = FALSE;
15
+  $initialized = false;
16
+  $import_enabled = false;
17 17
   $default = array(
18 18
     'transifex_user' => variable_get('boinc_translate_transifex_user', ''),
19 19
     'transifex_pass' => variable_get('boinc_translate_transifex_pass', ''),
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
     ),
37 37
   );
38 38
 
39
-  if ($default['transifex_user'] AND $default['transifex_pass']) {
39
+  if ($default['transifex_user'] and $default['transifex_pass']) {
40 40
     if (trim($default['transifex_boinc_resources'])
41
-    OR trim($default['transifex_project_resources'])) {
42
-      $import_enabled = TRUE;
41
+    or trim($default['transifex_project_resources'])) {
42
+      $import_enabled = true;
43 43
     }
44 44
     if ($default['transifex_boinc_name']
45
-    AND $default['transifex_project_name']
46
-    AND trim($default['transifex_boinc_resources'])
47
-    AND trim($default['transifex_project_resources'])) {
48
-      $initialized = TRUE;
45
+    and $default['transifex_project_name']
46
+    and trim($default['transifex_boinc_resources'])
47
+    and trim($default['transifex_project_resources'])) {
48
+      $initialized = true;
49 49
     }
50 50
   }
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     '#title' => t('Transifex settings'),
56 56
     '#type' => 'fieldset',
57 57
     '#description' => '',
58
-    '#collapsible' => TRUE,
58
+    '#collapsible' => true,
59 59
     '#collapsed' => $initialized,
60 60
     '#attributes' => array('class' => '')
61 61
   );
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
     '#title' => t('Tools'),
127 127
     '#type' => 'fieldset',
128 128
     '#description' => '',
129
-    '#collapsible' => TRUE,
130
-    '#collapsed' => FALSE,
129
+    '#collapsible' => true,
130
+    '#collapsed' => false,
131 131
     '#attributes' => array('class' => '')
132 132
   );
133 133
   $form['tools']['initialize_languages_text'] = array(
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
   $form['tools']['initialize_languages'] = array(
139 139
     '#type' => 'button',
140 140
     '#value' => t('Install official BOINC languages'),
141
-    '#executes_submit_callback' => TRUE,
141
+    '#executes_submit_callback' => true,
142 142
     '#submit' => array('boinctranslate_admin_settings_initialize_languages'),
143 143
     '#disabled' => !$initialized,
144 144
   );
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
   $form['tools']['import_now'] = array(
151 151
     '#type' => 'button',
152 152
     '#value' => t('Import all translations'),
153
-    '#executes_submit_callback' => TRUE,
153
+    '#executes_submit_callback' => true,
154 154
     '#submit' => array('boinctranslate_admin_settings_import_now'),
155 155
     '#disabled' => !$import_enabled,
156 156
   );
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
   $form['tools']['download_boinc_pot'] = array(
163 163
     '#type' => 'button',
164 164
     '#value' => t('Download official BOINC-Drupal .pot'),
165
-    '#executes_submit_callback' => TRUE,
165
+    '#executes_submit_callback' => true,
166 166
     '#submit' => array('boinctranslate_admin_settings_download_boinc_pot'),
167 167
     '#disabled' => !$import_enabled,
168 168
   );
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
   $form['tools']['download_project_pot'] = array(
175 175
     '#type' => 'button',
176 176
     '#value' => t('Download project-specific .pot'),
177
-    '#executes_submit_callback' => TRUE,
177
+    '#executes_submit_callback' => true,
178 178
     '#submit' => array('boinctranslate_admin_settings_download_project_pot'),
179 179
     '#disabled' => !$import_enabled,
180 180
   );
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     $form['tools']['update_official_boinc'] = array(
188 188
       '#type' => 'button',
189 189
       '#value' => t('Update official BOINC translations'),
190
-      '#executes_submit_callback' => TRUE,
190
+      '#executes_submit_callback' => true,
191 191
       '#submit' => array('boinctranslate_admin_settings_update_official_boinc'),
192 192
       '#disabled' => !$import_enabled,
193 193
     );
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
   $form['tools']['export_now'] = array(
201 201
     '#type' => 'button',
202 202
     '#value' => t('Update project-specific Resources'),
203
-    '#executes_submit_callback' => TRUE,
203
+    '#executes_submit_callback' => true,
204 204
     '#submit' => array('boinctranslate_admin_settings_export_now'),
205 205
     '#disabled' => !$import_enabled,
206 206
   );
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
     $values['boinc_translate_transifex_standard_resources']
279 279
   );
280 280
 
281
-  if ($username AND $password AND $boinc_name AND $boinc_resources) {
281
+  if ($username and $password and $boinc_name and $boinc_resources) {
282 282
     // Test authentication
283
-    $authenticated = FALSE;
283
+    $authenticated = false;
284 284
     $path = "project/{$boinc_name}/resource/{$boinc_resources[0]}/translation/en";
285
-    $response = boinctranslate_transifex_request($path, NULL, TRUE, FALSE, $username, $password);
285
+    $response = boinctranslate_transifex_request($path, null, true, false, $username, $password);
286 286
 
287 287
     if ($response) {
288 288
       if ($response == '401 UNAUTHORIZED') {
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         );
293 293
       }
294 294
       else {
295
-        $authenticated = TRUE;
295
+        $authenticated = true;
296 296
       }
297 297
     }
298 298
 
@@ -306,16 +306,16 @@  discard block
 block discarded – undo
306 306
       $project_resources = boinctranslate_parse_resources(
307 307
         $values['boinc_translate_transifex_project_resources']
308 308
       );
309
-      if ($project_name AND $project_resources) {
309
+      if ($project_name and $project_resources) {
310 310
         $transifex_resources[$project_name] = $project_resources;
311 311
       }
312
-      elseif ($project_name AND !$project_resources) {
312
+      elseif ($project_name and !$project_resources) {
313 313
         drupal_set_message(
314 314
           t('No project-specific resources were provided'),
315 315
           'warning'
316 316
         );
317 317
       }
318
-      elseif ($project_resources AND !$project_name) {
318
+      elseif ($project_resources and !$project_name) {
319 319
         drupal_set_message(
320 320
           t('No project-specific Transifex project name was provided'),
321 321
           'warning'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.views.inc 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 function boincuser_views_handlers() {
275 275
   return array(
276 276
     'info' => array(
277
-      'path' => drupal_get_path('module', 'boincuser') . '/views',
277
+      'path' => drupal_get_path('module', 'boincuser').'/views',
278 278
     ),
279 279
     'handlers' => array(
280 280
       'views_handler_argument_boincuser_id' => array(
Please login to merge, or discard this patch.
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -13,255 +13,255 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function boincuser_views_data() {
15 15
 
16
-  // -----------------------------------------------------------------------------------------------
17
-  // Definition for user table
18
-  // -----------------------------------------------------------------------------------------------
16
+    // -----------------------------------------------------------------------------------------------
17
+    // Definition for user table
18
+    // -----------------------------------------------------------------------------------------------
19 19
 
20
-  $data['user']['table']['group'] = t('BOINC');
20
+    $data['user']['table']['group'] = t('BOINC');
21 21
 
22
-  $data['user']['table']['base'] = array(
23
-      'field' => 'id',
24
-      'title' => t('BOINC user'),
25
-      'help' => t('BOINC account data for a user'),
26
-      'database' => 'boinc_ro'
27
-  );
22
+    $data['user']['table']['base'] = array(
23
+        'field' => 'id',
24
+        'title' => t('BOINC user'),
25
+        'help' => t('BOINC account data for a user'),
26
+        'database' => 'boinc_ro'
27
+    );
28 28
 
29
-  // Describe each of the individual fields in this table to Views. For
30
-  // each field, you may define what field, sort, argument, and/or filter
31
-  // handlers it supports. This will determine where in the Views interface you
32
-  // may use the field.
29
+    // Describe each of the individual fields in this table to Views. For
30
+    // each field, you may define what field, sort, argument, and/or filter
31
+    // handlers it supports. This will determine where in the Views interface you
32
+    // may use the field.
33 33
 
34
-  // Primary keys allowed as arguments
34
+    // Primary keys allowed as arguments
35 35
 
36
-  $data['user']['id'] = array(
36
+    $data['user']['id'] = array(
37 37
     'title' => bts('Id', array(), NULL, 'boinc:user-id'),
38 38
     'help' => t('The BOINC ID of the user account.'),
39 39
     'field' => array(
40
-      'handler' => 'views_handler_field_numeric',
41
-      'click sortable' => TRUE
40
+        'handler' => 'views_handler_field_numeric',
41
+        'click sortable' => TRUE
42 42
     ),
43 43
     'argument' => array(
44
-      'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
-      'name field' => 'title', // the field to display in the summary.
46
-      'numeric' => TRUE,
47
-      'validate type' => 'id'
44
+        'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
+        'name field' => 'title', // the field to display in the summary.
46
+        'numeric' => TRUE,
47
+        'validate type' => 'id'
48 48
     ),
49 49
     'filter' => array(
50
-      'handler' => 'views_handler_filter_numeric'
50
+        'handler' => 'views_handler_filter_numeric'
51 51
     ),
52 52
     'sort' => array(
53
-      'handler' => 'views_handler_sort_numeric'
53
+        'handler' => 'views_handler_sort_numeric'
54 54
     )
55
-  );
56
-  $data['user']['teamid'] = array(
55
+    );
56
+    $data['user']['teamid'] = array(
57 57
     'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
58 58
     'help' => t('The ID of the user\'s team.'),
59 59
     'field' => array(
60
-      'handler' => 'views_handler_field_numeric',
61
-      'click sortable' => TRUE,
60
+        'handler' => 'views_handler_field_numeric',
61
+        'click sortable' => TRUE,
62 62
     ),
63 63
     'argument' => array(
64
-      'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
-      'name field' => 'title', // the field to display in the summary.
66
-      'numeric' => TRUE,
67
-      'validate type' => 'id'
64
+        'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
+        'name field' => 'title', // the field to display in the summary.
66
+        'numeric' => TRUE,
67
+        'validate type' => 'id'
68 68
     ),
69 69
     'filter' => array(
70
-      'handler' => 'views_handler_filter_numeric'
70
+        'handler' => 'views_handler_filter_numeric'
71 71
     ),
72 72
     'sort' => array(
73
-      'handler' => 'views_handler_sort_numeric'
73
+        'handler' => 'views_handler_sort_numeric'
74 74
     )
75
-  );
75
+    );
76 76
 
77
-  // Descriptions of general host fields (alphabetized)
77
+    // Descriptions of general host fields (alphabetized)
78 78
 
79
-  $data['user']['authenticator'] = array(
79
+    $data['user']['authenticator'] = array(
80 80
     'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
81 81
     'help' => t('The BOINC account key of the user.'),
82 82
     'field' => array(
83
-      'handler' => 'views_handler_field',
84
-      'click sortable' => TRUE
83
+        'handler' => 'views_handler_field',
84
+        'click sortable' => TRUE
85 85
     ),
86 86
     'filter' => array(
87
-      'handler' => 'views_handler_filter_string'
87
+        'handler' => 'views_handler_filter_string'
88 88
     ),
89 89
     'sort' => array(
90
-      'handler' => 'views_handler_sort_string'
90
+        'handler' => 'views_handler_sort_string'
91 91
     )
92
-  );
93
-  $data['user']['country'] = array(
92
+    );
93
+    $data['user']['country'] = array(
94 94
     'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
95 95
     'help' => t('The country of the user.'),
96 96
     'field' => array(
97
-      'handler' => 'views_handler_field',
98
-      'click sortable' => TRUE
97
+        'handler' => 'views_handler_field',
98
+        'click sortable' => TRUE
99 99
     ),
100 100
     'filter' => array(
101
-      'handler' => 'views_handler_filter_string'
101
+        'handler' => 'views_handler_filter_string'
102 102
     ),
103 103
     'sort' => array(
104
-      'handler' => 'views_handler_sort_string'
104
+        'handler' => 'views_handler_sort_string'
105 105
     )
106
-  );
107
-  $data['user']['create_time'] = array(
106
+    );
107
+    $data['user']['create_time'] = array(
108 108
     'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
109 109
     'help' => t('When the BOINC account was created.'),
110 110
     'field' => array(
111
-      'handler' => 'views_handler_field_date',
112
-      'click sortable' => TRUE
111
+        'handler' => 'views_handler_field_date',
112
+        'click sortable' => TRUE
113 113
     ),
114 114
     'filter' => array(
115
-      'handler' => 'views_handler_filter_date'
115
+        'handler' => 'views_handler_filter_date'
116 116
     ),
117 117
     'sort' => array(
118
-      'handler' => 'views_handler_sort_date'
118
+        'handler' => 'views_handler_sort_date'
119 119
     )
120
-  );
121
-  $data['user']['cross_project_id'] = array(
120
+    );
121
+    $data['user']['cross_project_id'] = array(
122 122
     'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
123 123
     'help' => t('The cross project user identifier.'),
124 124
     'field' => array(
125
-      'handler' => 'views_handler_field',
126
-      'click sortable' => TRUE
125
+        'handler' => 'views_handler_field',
126
+        'click sortable' => TRUE
127 127
     ),
128 128
     'filter' => array(
129
-      'handler' => 'views_handler_filter_string'
129
+        'handler' => 'views_handler_filter_string'
130 130
     ),
131 131
     'sort' => array(
132
-      'handler' => 'views_handler_sort_string'
132
+        'handler' => 'views_handler_sort_string'
133 133
     )
134
-  );
135
-  $data['user']['email_addr'] = array(
136
-      'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
134
+    );
135
+    $data['user']['email_addr'] = array(
136
+        'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
137 137
     'help' => t('The BOINC account email address.'),
138 138
     'field' => array(
139
-      'handler' => 'views_handler_field',
140
-      'click sortable' => TRUE
139
+        'handler' => 'views_handler_field',
140
+        'click sortable' => TRUE
141 141
     ),
142 142
     'filter' => array(
143
-      'handler' => 'views_handler_filter_string'
143
+        'handler' => 'views_handler_filter_string'
144 144
     ),
145 145
     'sort' => array(
146
-      'handler' => 'views_handler_sort_string'
146
+        'handler' => 'views_handler_sort_string'
147 147
     )
148
-  );
149
-  $data['user']['expavg_credit'] = array(
148
+    );
149
+    $data['user']['expavg_credit'] = array(
150 150
     'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
151 151
     'help' => t('A decaying average of credit per day for the user.'),
152 152
     'field' => array(
153
-      'handler' => 'views_handler_field_numeric',
154
-      'click sortable' => TRUE,
155
-      'float' => TRUE
153
+        'handler' => 'views_handler_field_numeric',
154
+        'click sortable' => TRUE,
155
+        'float' => TRUE
156 156
     ),
157 157
     'filter' => array(
158
-      'handler' => 'views_handler_filter_numeric'
158
+        'handler' => 'views_handler_filter_numeric'
159 159
     ),
160 160
     'sort' => array(
161
-      'handler' => 'views_handler_sort_numeric'
161
+        'handler' => 'views_handler_sort_numeric'
162 162
     )
163
-  );
164
-  $data['user']['name'] = array(
163
+    );
164
+    $data['user']['name'] = array(
165 165
     'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
166 166
     'help' => t('The BOINC account user name.'),
167 167
     'field' => array(
168
-      'handler' => 'views_handler_field',
169
-      'click sortable' => TRUE
168
+        'handler' => 'views_handler_field',
169
+        'click sortable' => TRUE
170 170
     ),
171 171
     'filter' => array(
172
-      'handler' => 'views_handler_filter_string'
172
+        'handler' => 'views_handler_filter_string'
173 173
     ),
174 174
     'sort' => array(
175
-      'handler' => 'views_handler_sort_string'
175
+        'handler' => 'views_handler_sort_string'
176 176
     )
177
-  );
178
-  $data['user']['passwd_hash'] = array(
177
+    );
178
+    $data['user']['passwd_hash'] = array(
179 179
     'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
180 180
     'help' => t('The user password hash'),
181 181
     'field' => array(
182
-      'handler' => 'views_handler_field',
183
-      'click sortable' => TRUE
182
+        'handler' => 'views_handler_field',
183
+        'click sortable' => TRUE
184 184
     ),
185 185
     'filter' => array(
186
-      'handler' => 'views_handler_filter_string'
186
+        'handler' => 'views_handler_filter_string'
187 187
     ),
188 188
     'sort' => array(
189
-      'handler' => 'views_handler_sort_string'
189
+        'handler' => 'views_handler_sort_string'
190 190
     )
191
-  );
192
-  $data['user']['postal_code'] = array(
191
+    );
192
+    $data['user']['postal_code'] = array(
193 193
     'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
194 194
     'help' => t('The postal code of the user.'),
195 195
     'field' => array(
196
-      'handler' => 'views_handler_field',
197
-      'click sortable' => TRUE
196
+        'handler' => 'views_handler_field',
197
+        'click sortable' => TRUE
198 198
     ),
199 199
     'filter' => array(
200
-      'handler' => 'views_handler_filter_string'
200
+        'handler' => 'views_handler_filter_string'
201 201
     ),
202 202
     'sort' => array(
203
-      'handler' => 'views_handler_sort_string'
203
+        'handler' => 'views_handler_sort_string'
204 204
     )
205
-  );
206
-  $data['user']['send_email'] = array(
205
+    );
206
+    $data['user']['send_email'] = array(
207 207
     'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
208 208
     'help' => t('User preference to allow email communications.'),
209 209
     'field' => array(
210
-      'handler' => 'views_handler_field_numeric',
211
-      'click sortable' => TRUE
210
+        'handler' => 'views_handler_field_numeric',
211
+        'click sortable' => TRUE
212 212
     ),
213 213
     'filter' => array(
214
-      'handler' => 'views_handler_filter_numeric'
214
+        'handler' => 'views_handler_filter_numeric'
215 215
     ),
216 216
     'sort' => array(
217
-      'handler' => 'views_handler_sort_numeric'
217
+        'handler' => 'views_handler_sort_numeric'
218 218
     )
219
-  );
220
-  $data['user']['show_hosts'] = array(
219
+    );
220
+    $data['user']['show_hosts'] = array(
221 221
     'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
222 222
     'help' => t('User preference to display owned computers.'),
223 223
     'field' => array(
224
-      'handler' => 'views_handler_field_numeric',
225
-      'click sortable' => TRUE
224
+        'handler' => 'views_handler_field_numeric',
225
+        'click sortable' => TRUE
226 226
     ),
227 227
     'filter' => array(
228
-      'handler' => 'views_handler_filter_numeric'
228
+        'handler' => 'views_handler_filter_numeric'
229 229
     ),
230 230
     'sort' => array(
231
-      'handler' => 'views_handler_sort_numeric'
231
+        'handler' => 'views_handler_sort_numeric'
232 232
     )
233
-  );
234
-  $data['user']['total_credit'] = array(
233
+    );
234
+    $data['user']['total_credit'] = array(
235 235
     'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
236 236
     'help' => t('The total accumulated BOINC credit for the user.'),
237 237
     'field' => array(
238
-      'handler' => 'views_handler_field_numeric',
239
-      'click sortable' => TRUE,
240
-      'float' => TRUE
238
+        'handler' => 'views_handler_field_numeric',
239
+        'click sortable' => TRUE,
240
+        'float' => TRUE
241 241
     ),
242 242
     'filter' => array(
243
-      'handler' => 'views_handler_filter_numeric'
243
+        'handler' => 'views_handler_filter_numeric'
244 244
     ),
245 245
     'sort' => array(
246
-      'handler' => 'views_handler_sort_numeric'
246
+        'handler' => 'views_handler_sort_numeric'
247 247
     )
248
-  );
249
-  $data['user']['url'] = array(
248
+    );
249
+    $data['user']['url'] = array(
250 250
     'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
251 251
     'help' => t('The URL provided by the user'),
252 252
     'field' => array(
253
-      'handler' => 'views_handler_field',
254
-      'click sortable' => TRUE
253
+        'handler' => 'views_handler_field',
254
+        'click sortable' => TRUE
255 255
     ),
256 256
     'filter' => array(
257
-      'handler' => 'views_handler_filter_string'
257
+        'handler' => 'views_handler_filter_string'
258 258
     ),
259 259
     'sort' => array(
260
-      'handler' => 'views_handler_sort_string'
260
+        'handler' => 'views_handler_sort_string'
261 261
     )
262
-  );
262
+    );
263 263
 
264
-  return $data;
264
+    return $data;
265 265
 }
266 266
 
267 267
 /*
@@ -272,17 +272,17 @@  discard block
 block discarded – undo
272 272
  */
273 273
 
274 274
 function boincuser_views_handlers() {
275
-  return array(
275
+    return array(
276 276
     'info' => array(
277
-      'path' => drupal_get_path('module', 'boincuser') . '/views',
277
+        'path' => drupal_get_path('module', 'boincuser') . '/views',
278 278
     ),
279 279
     'handlers' => array(
280
-      'views_handler_argument_boincuser_id' => array(
280
+        'views_handler_argument_boincuser_id' => array(
281 281
         'parent' => 'views_handler_argument_numeric'
282
-      ),
283
-      'views_handler_argument_boincteam_id' => array(
282
+        ),
283
+        'views_handler_argument_boincteam_id' => array(
284 284
         'parent' => 'views_handler_argument_numeric'
285
-      ),
285
+        ),
286 286
     )
287
-  );
287
+    );
288 288
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
   // Primary keys allowed as arguments
35 35
 
36 36
   $data['user']['id'] = array(
37
-    'title' => bts('Id', array(), NULL, 'boinc:user-id'),
37
+    'title' => bts('Id', array(), null, 'boinc:user-id'),
38 38
     'help' => t('The BOINC ID of the user account.'),
39 39
     'field' => array(
40 40
       'handler' => 'views_handler_field_numeric',
41
-      'click sortable' => TRUE
41
+      'click sortable' => true
42 42
     ),
43 43
     'argument' => array(
44 44
       'handler' => 'views_handler_argument_boincuser_id', // custom handler
45 45
       'name field' => 'title', // the field to display in the summary.
46
-      'numeric' => TRUE,
46
+      'numeric' => true,
47 47
       'validate type' => 'id'
48 48
     ),
49 49
     'filter' => array(
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
     )
55 55
   );
56 56
   $data['user']['teamid'] = array(
57
-    'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
57
+    'title' => bts('Team ID', array(), null, 'boinc:team-id'),
58 58
     'help' => t('The ID of the user\'s team.'),
59 59
     'field' => array(
60 60
       'handler' => 'views_handler_field_numeric',
61
-      'click sortable' => TRUE,
61
+      'click sortable' => true,
62 62
     ),
63 63
     'argument' => array(
64 64
       'handler' => 'views_handler_argument_boincteam_id', // custom handler
65 65
       'name field' => 'title', // the field to display in the summary.
66
-      'numeric' => TRUE,
66
+      'numeric' => true,
67 67
       'validate type' => 'id'
68 68
     ),
69 69
     'filter' => array(
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
   // Descriptions of general host fields (alphabetized)
78 78
 
79 79
   $data['user']['authenticator'] = array(
80
-    'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
80
+    'title' => bts('Account Key', array(), null, 'boinc:user-info'),
81 81
     'help' => t('The BOINC account key of the user.'),
82 82
     'field' => array(
83 83
       'handler' => 'views_handler_field',
84
-      'click sortable' => TRUE
84
+      'click sortable' => true
85 85
     ),
86 86
     'filter' => array(
87 87
       'handler' => 'views_handler_filter_string'
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
     )
92 92
   );
93 93
   $data['user']['country'] = array(
94
-    'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
94
+    'title' => bts('Country', array(), null, 'boinc:country-of-origin'),
95 95
     'help' => t('The country of the user.'),
96 96
     'field' => array(
97 97
       'handler' => 'views_handler_field',
98
-      'click sortable' => TRUE
98
+      'click sortable' => true
99 99
     ),
100 100
     'filter' => array(
101 101
       'handler' => 'views_handler_filter_string'
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
     )
106 106
   );
107 107
   $data['user']['create_time'] = array(
108
-    'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
108
+    'title' => bts('Member since', array(), null, 'boinc:user-info'),
109 109
     'help' => t('When the BOINC account was created.'),
110 110
     'field' => array(
111 111
       'handler' => 'views_handler_field_date',
112
-      'click sortable' => TRUE
112
+      'click sortable' => true
113 113
     ),
114 114
     'filter' => array(
115 115
       'handler' => 'views_handler_filter_date'
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
     )
120 120
   );
121 121
   $data['user']['cross_project_id'] = array(
122
-    'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
122
+    'title' => bts('CPID', array(), null, 'boinc:user-info'),
123 123
     'help' => t('The cross project user identifier.'),
124 124
     'field' => array(
125 125
       'handler' => 'views_handler_field',
126
-      'click sortable' => TRUE
126
+      'click sortable' => true
127 127
     ),
128 128
     'filter' => array(
129 129
       'handler' => 'views_handler_filter_string'
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
     )
134 134
   );
135 135
   $data['user']['email_addr'] = array(
136
-      'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
136
+      'title' => bts('Email Address', array(), null, 'boinc:user-info'),
137 137
     'help' => t('The BOINC account email address.'),
138 138
     'field' => array(
139 139
       'handler' => 'views_handler_field',
140
-      'click sortable' => TRUE
140
+      'click sortable' => true
141 141
     ),
142 142
     'filter' => array(
143 143
       'handler' => 'views_handler_filter_string'
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
     )
148 148
   );
149 149
   $data['user']['expavg_credit'] = array(
150
-    'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
150
+    'title' => bts('Recent average credit', array(), null, 'boinc:user-or-team-RAC'),
151 151
     'help' => t('A decaying average of credit per day for the user.'),
152 152
     'field' => array(
153 153
       'handler' => 'views_handler_field_numeric',
154
-      'click sortable' => TRUE,
155
-      'float' => TRUE
154
+      'click sortable' => true,
155
+      'float' => true
156 156
     ),
157 157
     'filter' => array(
158 158
       'handler' => 'views_handler_filter_numeric'
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
     )
163 163
   );
164 164
   $data['user']['name'] = array(
165
-    'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
165
+    'title' => bts('Name', array(), null, 'boinc:user-or-team-name'),
166 166
     'help' => t('The BOINC account user name.'),
167 167
     'field' => array(
168 168
       'handler' => 'views_handler_field',
169
-      'click sortable' => TRUE
169
+      'click sortable' => true
170 170
     ),
171 171
     'filter' => array(
172 172
       'handler' => 'views_handler_filter_string'
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
     )
177 177
   );
178 178
   $data['user']['passwd_hash'] = array(
179
-    'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
179
+    'title' => bts('Password Hash', array(), null, 'boinc:user-info'),
180 180
     'help' => t('The user password hash'),
181 181
     'field' => array(
182 182
       'handler' => 'views_handler_field',
183
-      'click sortable' => TRUE
183
+      'click sortable' => true
184 184
     ),
185 185
     'filter' => array(
186 186
       'handler' => 'views_handler_filter_string'
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
     )
191 191
   );
192 192
   $data['user']['postal_code'] = array(
193
-    'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
193
+    'title' => bts('Postal Code', array(), null, 'boinc:user-info'),
194 194
     'help' => t('The postal code of the user.'),
195 195
     'field' => array(
196 196
       'handler' => 'views_handler_field',
197
-      'click sortable' => TRUE
197
+      'click sortable' => true
198 198
     ),
199 199
     'filter' => array(
200 200
       'handler' => 'views_handler_filter_string'
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
     )
205 205
   );
206 206
   $data['user']['send_email'] = array(
207
-    'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
207
+    'title' => bts('Send Email', array(), null, 'boinc:user-info'),
208 208
     'help' => t('User preference to allow email communications.'),
209 209
     'field' => array(
210 210
       'handler' => 'views_handler_field_numeric',
211
-      'click sortable' => TRUE
211
+      'click sortable' => true
212 212
     ),
213 213
     'filter' => array(
214 214
       'handler' => 'views_handler_filter_numeric'
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
     )
219 219
   );
220 220
   $data['user']['show_hosts'] = array(
221
-    'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
221
+    'title' => bts('Show Hosts', array(), null, 'boinc:user-info'),
222 222
     'help' => t('User preference to display owned computers.'),
223 223
     'field' => array(
224 224
       'handler' => 'views_handler_field_numeric',
225
-      'click sortable' => TRUE
225
+      'click sortable' => true
226 226
     ),
227 227
     'filter' => array(
228 228
       'handler' => 'views_handler_filter_numeric'
@@ -232,12 +232,12 @@  discard block
 block discarded – undo
232 232
     )
233 233
   );
234 234
   $data['user']['total_credit'] = array(
235
-    'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
235
+    'title' => bts('Total credit', array(), null, 'boinc:user-or-team-total-credits'),
236 236
     'help' => t('The total accumulated BOINC credit for the user.'),
237 237
     'field' => array(
238 238
       'handler' => 'views_handler_field_numeric',
239
-      'click sortable' => TRUE,
240
-      'float' => TRUE
239
+      'click sortable' => true,
240
+      'float' => true
241 241
     ),
242 242
     'filter' => array(
243 243
       'handler' => 'views_handler_filter_numeric'
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
     )
248 248
   );
249 249
   $data['user']['url'] = array(
250
-    'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
250
+    'title' => bts('URL', array(), null, 'boinc:website-of-user-or-team'),
251 251
     'help' => t('The URL provided by the user'),
252 252
     'field' => array(
253 253
       'handler' => 'views_handler_field',
254
-      'click sortable' => TRUE
254
+      'click sortable' => true
255 255
     ),
256 256
     'filter' => array(
257 257
       'handler' => 'views_handler_filter_string'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.admin.inc 4 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,13 +157,11 @@  discard block
 block discarded – undo
157 157
   if (!$values['boinc_root_dir']) {
158 158
     form_set_error('boinc_root_dir', t('BOINC project root directory must be
159 159
       defined!'));
160
-  }
161
-  elseif (!is_dir($values['boinc_root_dir'])) {
160
+  } elseif (!is_dir($values['boinc_root_dir'])) {
162 161
     form_set_error('boinc_root_dir', t('BOINC project root not found at %directory',
163 162
       array('%directory' => $values['boinc_root_dir'])
164 163
     ));
165
-  }
166
-  else {
164
+  } else {
167 165
     // By default, try to automatically set specific directories from the root
168 166
     if (!$values['boinc_config_xml_dir']) {
169 167
       $values['boinc_config_xml_dir'] = $values['boinc_root_dir'];
@@ -285,8 +283,7 @@  discard block
 block discarded – undo
285 283
   if (!$values['boinc_scheduler_urls']) {
286 284
     form_set_error('boinc_scheduler_urls', t('At least one scheduling server
287 285
       URL must be specified.'));
288
-  }
289
-  else {
286
+  } else {
290 287
     $urls = explode("\r\n", $values['boinc_scheduler_urls']);
291 288
     foreach ($urls as $key => $url) {
292 289
       if (!$url) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     '#default_value' => $default['boinc_server_status_url'],
121 121
     '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).',
122 122
       array(
123
-        '%full_url' => $base_url . '/server_status.php',
123
+        '%full_url' => $base_url.'/server_status.php',
124 124
         '%relative_url' => 'server_status.php',
125 125
       )
126 126
     ),
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     '#default_value' => $default['boinc_app_list_url'],
132 132
     '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).',
133 133
       array(
134
-        '%full_url' => $base_url . '/apps.php',
134
+        '%full_url' => $base_url.'/apps.php',
135 135
         '%relative_url' => 'apps.php',
136 136
       )
137 137
     ),
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     '#type' => 'checkbox',
355 355
     '#title' => t('Enable create_account.php RPC'),
356 356
     '#default_value' => $default['boinc_weboptions_enableaccountcreateRPC'],
357
-    '#description' => t('If checked, users will be able to create an account remotely using the create_account.php RPC. This option is independent of the user regsitration option found in ') . l(t('User management -> User settings'), '/admin/user/settings') . '. If enabled, user <b>may not be able to see and agree to the terms-of-use</b> to your site\'s privacy and data retention policies!',
357
+    '#description' => t('If checked, users will be able to create an account remotely using the create_account.php RPC. This option is independent of the user regsitration option found in ').l(t('User management -> User settings'), '/admin/user/settings').'. If enabled, user <b>may not be able to see and agree to the terms-of-use</b> to your site\'s privacy and data retention policies!',
358 358
   );
359 359
 
360 360
   $form['boinc_weboptions_registrationtitle'] = array(
@@ -409,32 +409,32 @@  discard block
 block discarded – undo
409 409
     '#rows' => 8,
410 410
     '#description' => t('A list of Drupal URLs/paths to ignore for Terms of Use (ToU). If the option above \'Are existing users forced to agree to the Terms of Use?\' is activated, then some paths need to be ignored when checking if a user has agreed to the ToU. A good example is the logout path, "logout", or else users will not be able to logout!
411 411
 <p>There is a default list of paths that must be ignored or else the site will not function. They are not included in this box. Here you may provide additional paths to be ignored, for example the privacy policy page may be accessible so that users may read it before agreeing to the site\'s ToU.
412
-<p>Paths should be entered one per line. All paths should be <em>lower-case</em> and  should not include a leading \'/\'. Example: account/info/edit will allow the user to visit ' . $base_url . '/account/info/edit without first agreeing to the ToU. Regexp are allowed. Example: account/* will allow the user to visit any path starting with ' . $base_url . '/account/.'),
412
+<p>Paths should be entered one per line. All paths should be <em>lower-case</em> and  should not include a leading \'/\'. Example: account/info/edit will allow the user to visit ' . $base_url.'/account/info/edit without first agreeing to the ToU. Regexp are allowed. Example: account/* will allow the user to visit any path starting with '.$base_url.'/account/.'),
413 413
   );
414 414
 
415 415
   $form['pathtitle'] = array(
416 416
     '#value' => '<h3>Path Options</h3>',
417 417
   );
418 418
 
419
-  $form['boinc_weboptions_accountfinish'] = array (
419
+  $form['boinc_weboptions_accountfinish'] = array(
420 420
     '#type' => 'textfield',
421 421
     '#title' => t('Path to a custom account_finish.php page, should be a path to a node'),
422 422
     '#description' => t('Provide a path to a node which will serve as your site\'s landing page for users create an account using the BOINC client manager. They will be directed to this page after the account is created. If blank, a default account_finish page will be used.<br>Examples: account_finish, content/welcome, node/123'),
423 423
     '#default_value' => $default['boinc_weboptions_accountfinish'],
424 424
   );
425
-  $form['boinc_weboptions_moderationpage'] = array (
425
+  $form['boinc_weboptions_moderationpage'] = array(
426 426
     '#type' => 'textfield',
427 427
     '#title' => t('Path to the site\'s content moderation info page, should be a path to a node'),
428 428
     '#description' => t('Provide a path to a node which will serve as your site\'s page for account/content moderation information. This will be used on the default account_finish page. If blank, no link to a moderation page will be provided. If a path is provided to the custom account_finish.php page (above), this field will be ignored.<br>Examples: moderation, content/moderation, node/456'),
429 429
     '#default_value' => $default['boinc_weboptions_moderationpage'],
430 430
   );
431
-  $form['boinc_weboptions_rulespolicies'] = array (
431
+  $form['boinc_weboptions_rulespolicies'] = array(
432 432
     '#type' => 'textfield',
433 433
     '#title' => t('Path to the site\'s rule and policies page, should be a path to a node'),
434 434
     '#description' => t('Provide a path to a node which will serve as your site\'s rules and policies page. This will be used on the Join page shown to new users. If blank, no link to a rules and policies page will be provided.<br>Examples: rules-and-policies, node/789'),
435 435
     '#default_value' => $default['boinc_weboptions_rulespolicies'],
436 436
   );
437
-  $form['boinc_other_frontpage'] = array (
437
+  $form['boinc_other_frontpage'] = array(
438 438
     '#type' => 'textarea',
439 439
     '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'),
440 440
     '#default_value' => $default['boinc_other_frontpage'],
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     '#value' => '<h3>Other Options</h3>',
448 448
   );
449 449
 
450
-  $form['boinc_weboptions_blacklisted_usernames'] = array (
450
+  $form['boinc_weboptions_blacklisted_usernames'] = array(
451 451
     '#type' => 'textarea',
452 452
     '#title' => t('BOINC username blacklist'),
453 453
     '#default_value' => $default['boinc_weboptions_blacklisted_usernames'],
@@ -466,17 +466,17 @@  discard block
 block discarded – undo
466 466
   $values = $form_state['values'];
467 467
 
468 468
   $accountfinish = $values['boinc_weboptions_accountfinish'];
469
-  if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) {
469
+  if (($accountfinish) AND (!drupal_lookup_path('source', $accountfinish))) {
470 470
     form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.'));
471 471
   }
472 472
 
473 473
   $moderationpage = $values['boinc_weboptions_moderationpage'];
474
-  if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) {
474
+  if (($moderationpage) AND (!drupal_lookup_path('source', $moderationpage))) {
475 475
     form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.'));
476 476
   }
477 477
 
478 478
   $rulespolicies = $values['boinc_weboptions_rulespolicies'];
479
-  if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) {
479
+  if (($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies))) {
480 480
     form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.'));
481 481
   }
482 482
 }
@@ -485,5 +485,5 @@  discard block
 block discarded – undo
485 485
   * Submit BOINC other form
486 486
   */
487 487
 function boincuser_admin_weboptions_submit($form, &$form_state) {
488
-  drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') );
488
+  drupal_set_message(bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options'));
489 489
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
   //drupal_set_message(print_r($default, true));
50 50
   //drupal_set_message(print_r($form_state, true));
51 51
   // Show overrides if the root dir is set and others have not been detected
52
-  $show_overrides = FALSE;
52
+  $show_overrides = false;
53 53
   if ($default['boinc_root_dir']) {
54 54
     foreach ($default as $key => $dir) {
55 55
       switch ($key) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         // If any of these values are not set, show the overrides section
61 61
         if (!$dir) {
62 62
           $default[$key] = $form_state['values'][$key];
63
-          $show_overrides = TRUE;
63
+          $show_overrides = true;
64 64
           break;
65 65
         }
66 66
         break;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     '#title' => t('Overrides'),
85 85
     '#type' => 'fieldset',
86 86
     '#description' => '',
87
-    '#collapsible' => TRUE,
87
+    '#collapsible' => true,
88 88
     '#collapsed' => !$show_overrides,
89 89
     '#attributes' => array('class' => 'advanced-settings')
90 90
   );
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
       ));
223 223
     }
224 224
     if ($values['boinc_host_sched_logs_dir']
225
-        AND !is_dir($values['boinc_host_sched_logs_dir'])
225
+        and !is_dir($values['boinc_host_sched_logs_dir'])
226 226
       ) {
227 227
       form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log
228 228
         directory not found at %directory',
@@ -330,13 +330,13 @@  discard block
 block discarded – undo
330 330
 
331 331
   //form defaults
332 332
   $default = array(
333
-    'boinc_weboptions_enableaccountcreateRPC' => variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE),
333
+    'boinc_weboptions_enableaccountcreateRPC' => variable_get('boinc_weboptions_enableaccountcreateRPC', true),
334 334
     'boinc_weboptions_registrationtitle' => variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'),
335 335
     'boinc_weboptions_termsofuse' => variable_get('boinc_weboptions_termsofuse', ''),
336
-    'boinc_weboptions_overrideboinctou' => variable_get('boinc_weboptions_overrideboinctou', FALSE),
336
+    'boinc_weboptions_overrideboinctou' => variable_get('boinc_weboptions_overrideboinctou', false),
337 337
     'boinc_weboptions_agreequestion' => variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'),
338 338
     'boinc_weboptions_registrationtitle2' => variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'),
339
-    'boinc_weboptions_existinguser_tou' => variable_get('boinc_weboptions_existinguser_tou', FALSE),
339
+    'boinc_weboptions_existinguser_tou' => variable_get('boinc_weboptions_existinguser_tou', false),
340 340
     'boinc_weboptions_pathstoignore' => variable_get('boinc_weboptions_pathstoignore', "moderation\ncontent/moderation\nprivacy"),
341 341
     'boinc_weboptions_accountfinish' => variable_get('boinc_weboptions_accountfinish', ''),
342 342
     'boinc_weboptions_moderationpage' => variable_get('boinc_weboptions_moderationpage', ''),
@@ -436,11 +436,11 @@  discard block
 block discarded – undo
436 436
   );
437 437
   $form['boinc_other_frontpage'] = array (
438 438
     '#type' => 'textarea',
439
-    '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'),
439
+    '#title' => bts('Message for site\'s Home Page', array(), null, 'boinc:admin-boinc-other-options'),
440 440
     '#default_value' => $default['boinc_other_frontpage'],
441 441
     '#cols' => 60,
442 442
     '#rows' => 8,
443
-    '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), NULL, 'boinc:admin-boinc-other-options'),
443
+    '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), null, 'boinc:admin-boinc-other-options'),
444 444
   );
445 445
 
446 446
   $form['Othertitle'] = array(
@@ -466,17 +466,17 @@  discard block
 block discarded – undo
466 466
   $values = $form_state['values'];
467 467
 
468 468
   $accountfinish = $values['boinc_weboptions_accountfinish'];
469
-  if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) {
469
+  if ( ($accountfinish) and (!drupal_lookup_path('source', $accountfinish)) ) {
470 470
     form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.'));
471 471
   }
472 472
 
473 473
   $moderationpage = $values['boinc_weboptions_moderationpage'];
474
-  if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) {
474
+  if ( ($moderationpage) and (!drupal_lookup_path('source', $moderationpage)) ) {
475 475
     form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.'));
476 476
   }
477 477
 
478 478
   $rulespolicies = $values['boinc_weboptions_rulespolicies'];
479
-  if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) {
479
+  if ( ($rulespolicies) and (!drupal_lookup_path('source', $rulespolicies)) ) {
480 480
     form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.'));
481 481
   }
482 482
 }
@@ -485,5 +485,5 @@  discard block
 block discarded – undo
485 485
   * Submit BOINC other form
486 486
   */
487 487
 function boincuser_admin_weboptions_submit($form, &$form_state) {
488
-  drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') );
488
+  drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), null, 'boinc:admin-boinc-website-options') );
489 489
 }
Please login to merge, or discard this patch.
Indentation   +183 added lines, -183 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 }*/
29 29
 
30 30
 /**
31
-  * The BOINC environment form allows paths to be set to connect Drupal to an
32
-  * existing BOINC web interface.
33
-  */
31
+ * The BOINC environment form allows paths to be set to connect Drupal to an
32
+ * existing BOINC web interface.
33
+ */
34 34
 function boincuser_admin_environment(&$form_state) {
35
-  global $base_url;
36
-  $form = array();
37
-  $default = array(
35
+    global $base_url;
36
+    $form = array();
37
+    $default = array(
38 38
     'boinc_root_dir' => variable_get('boinc_root_dir', ''),
39 39
     'boinc_config_xml_dir' => variable_get('boinc_config_xml_dir', ''),
40 40
     'boinc_html_inc_dir' => variable_get('boinc_html_inc_dir', ''),
@@ -47,303 +47,303 @@  discard block
 block discarded – undo
47 47
     'boinc_admin_mailing_list_subject_tag' => variable_get('boinc_admin_mailing_list_subject_tag', ''),
48 48
     'boinc_debug_mode' => variable_get('boinc_debug_mode', 0),
49 49
     'boinc_project_config_keywords' => variable_get('boinc_project_config_keywords', ''),
50
-  );
51
-  //drupal_set_message(print_r($default, true));
52
-  //drupal_set_message(print_r($form_state, true));
53
-  // Show overrides if the root dir is set and others have not been detected
54
-  $show_overrides = FALSE;
55
-  if ($default['boinc_root_dir']) {
50
+    );
51
+    //drupal_set_message(print_r($default, true));
52
+    //drupal_set_message(print_r($form_state, true));
53
+    // Show overrides if the root dir is set and others have not been detected
54
+    $show_overrides = FALSE;
55
+    if ($default['boinc_root_dir']) {
56 56
     foreach ($default as $key => $dir) {
57
-      switch ($key) {
58
-      case 'boinc_config_xml_dir':
57
+        switch ($key) {
58
+        case 'boinc_config_xml_dir':
59 59
       case 'boinc_html_inc_dir':
60 60
       case 'boinc_project_config_dir':
61 61
       case 'boinc_user_image_dir':
62 62
         // If any of these values are not set, show the overrides section
63 63
         if (!$dir) {
64
-          $default[$key] = $form_state['values'][$key];
65
-          $show_overrides = TRUE;
66
-          break;
64
+            $default[$key] = $form_state['values'][$key];
65
+            $show_overrides = TRUE;
66
+            break;
67 67
         }
68 68
         break;
69
-      default:
69
+        default:
70 70
       }
71
-      if ($show_overrides) {
71
+        if ($show_overrides) {
72 72
         break;
73
-      }
73
+        }
74
+    }
74 75
     }
75
-  }
76
-  // Define the form
77
-  $form['boinc_root_dir'] = array(
76
+    // Define the form
77
+    $form['boinc_root_dir'] = array(
78 78
     '#type' => 'textfield',
79 79
     '#title' => t('BOINC project root directory'),
80 80
     '#default_value' => $default['boinc_root_dir'],
81 81
     '#description' => t('The filesystem path to the BOINC project root. This
82 82
       directory should contain config.xml as well as the html subdirectory,
83 83
       which itself contains inc/, project/, and user_profile/.'),
84
-  );
85
-  $form['overrides'] = array(
84
+    );
85
+    $form['overrides'] = array(
86 86
     '#title' => t('Overrides'),
87 87
     '#type' => 'fieldset',
88 88
     '#description' => '',
89 89
     '#collapsible' => TRUE,
90 90
     '#collapsed' => !$show_overrides,
91 91
     '#attributes' => array('class' => 'advanced-settings')
92
-  );
93
-  $form['overrides']['boinc_config_xml_dir'] = array(
92
+    );
93
+    $form['overrides']['boinc_config_xml_dir'] = array(
94 94
     '#type' => 'textfield',
95 95
     '#title' => t('BOINC config.xml directory'),
96 96
     '#default_value' => $default['boinc_config_xml_dir'],
97 97
     '#description' => t('The filesystem path that contains config.xml'),
98
-  );
99
-  $form['overrides']['boinc_html_inc_dir'] = array(
98
+    );
99
+    $form['overrides']['boinc_html_inc_dir'] = array(
100 100
     '#type' => 'textfield',
101 101
     '#title' => t('BOINC web includes directory'),
102 102
     '#default_value' => $default['boinc_html_inc_dir'],
103 103
     '#description' => t('The filesystem path to the html/inc/ directory that
104 104
       contains util.inc'),
105
-  );
106
-  $form['overrides']['boinc_project_config_dir'] = array(
105
+    );
106
+    $form['overrides']['boinc_project_config_dir'] = array(
107 107
     '#type' => 'textfield',
108 108
     '#title' => t('BOINC project config directory'),
109 109
     '#default_value' => $default['boinc_project_config_dir'],
110 110
     '#description' => t('The filesystem path to the project/ directory that
111 111
       contains project.inc'),
112
-  );
113
-  $form['overrides']['boinc_user_image_dir'] = array(
112
+    );
113
+    $form['overrides']['boinc_user_image_dir'] = array(
114 114
     '#type' => 'textfield',
115 115
     '#title' => t('BOINC user profile image directory'),
116 116
     '#default_value' => $default['boinc_user_image_dir'],
117 117
     '#description' => t('The filesystem directory that contains user images'),
118
-  );
119
-  $form['boinc_server_status_url'] = array(
118
+    );
119
+    $form['boinc_server_status_url'] = array(
120 120
     '#type' => 'textfield',
121 121
     '#title' => t('BOINC server status page URL (optional)'),
122 122
     '#default_value' => $default['boinc_server_status_url'],
123 123
     '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).',
124
-      array(
124
+        array(
125 125
         '%full_url' => $base_url . '/server_status.php',
126 126
         '%relative_url' => 'server_status.php',
127
-      )
127
+        )
128 128
     ),
129
-  );
130
-  $form['boinc_app_list_url'] = array(
129
+    );
130
+    $form['boinc_app_list_url'] = array(
131 131
     '#type' => 'textfield',
132 132
     '#title' => t('BOINC applications page URL (optional)'),
133 133
     '#default_value' => $default['boinc_app_list_url'],
134 134
     '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).',
135
-      array(
135
+        array(
136 136
         '%full_url' => $base_url . '/apps.php',
137 137
         '%relative_url' => 'apps.php',
138
-      )
138
+        )
139 139
     ),
140
-  );
141
-  $form['boinc_host_sched_logs_dir'] = array(
140
+    );
141
+    $form['boinc_host_sched_logs_dir'] = array(
142 142
     '#type' => 'textfield',
143 143
     '#title' => t('BOINC host scheduler log directory (optional)'),
144 144
     '#default_value' => $default['boinc_host_sched_logs_dir'],
145 145
     '#description' => t('The filesystem directory that contains host scheduler logs'),
146
-  );
147
-  $form['boinc_admin_mailing_list'] = array(
146
+    );
147
+    $form['boinc_admin_mailing_list'] = array(
148 148
     '#type' => 'textfield',
149 149
     '#title' => t('Admin mailing list'),
150 150
     '#default_value' => $default['boinc_admin_mailing_list'],
151 151
     '#description' => t('Enter an email-address which will be used to contact admisistrators. If empty, the site email configured in Settings -> Site Information will be used.'),
152
-  );
153
-  $form['boinc_admin_mailing_list_subject_tag'] = array(
152
+    );
153
+    $form['boinc_admin_mailing_list_subject_tag'] = array(
154 154
     '#type' => 'textfield',
155 155
     '#title' => t('Admin mailing list - subject tag'),
156 156
     '#default_value' => $default['boinc_admin_mailing_list_subject_tag'],
157 157
     '#description' => t('Text which will appear at the beginning of the subject for any admin notification emails. If empty, no tag will be included. Examples: [drupal-error].'),
158
-  );
159
-  $form['boinc_debug_mode'] = array(
158
+    );
159
+    $form['boinc_debug_mode'] = array(
160 160
     '#type' => 'checkbox',
161 161
     '#title' => t('Show debug messages in system log'),
162 162
     '#default_value' => $default['boinc_debug_mode']
163
-  );
164
-  $form['boinc_project_config_keywords'] = array(
163
+    );
164
+    $form['boinc_project_config_keywords'] = array(
165 165
     '#type' => 'textarea',
166 166
     '#title' => t('Project/Job Keywords for get_project_config RPC'),
167 167
     '#default_value' => $default['boinc_project_config_keywords'],
168 168
     '#description' => t('XML from this text box will be appended to the XML output from the get_project_config RPC. There is no check for XML validity! See !link for more details. It is okay to leave this blank.',
169 169
     array(
170
-      '!link' => l('BOINC wiki page', 'https://boinc.berkeley.edu/trac/wiki/JobKeywords')
170
+        '!link' => l('BOINC wiki page', 'https://boinc.berkeley.edu/trac/wiki/JobKeywords')
171 171
     )),
172
-  );
173
-  return system_settings_form($form);
172
+    );
173
+    return system_settings_form($form);
174 174
 }
175 175
 
176 176
 /**
177
-  * Validate the BOINC environment form.
178
-  */
177
+ * Validate the BOINC environment form.
178
+ */
179 179
 function boincuser_admin_environment_validate($form, &$form_state) {
180
-  $values = $form_state['values'];
181
-  if (!$values['boinc_root_dir']) {
180
+    $values = $form_state['values'];
181
+    if (!$values['boinc_root_dir']) {
182 182
     form_set_error('boinc_root_dir', t('BOINC project root directory must be
183 183
       defined!'));
184
-  }
185
-  elseif (!is_dir($values['boinc_root_dir'])) {
184
+    }
185
+    elseif (!is_dir($values['boinc_root_dir'])) {
186 186
     form_set_error('boinc_root_dir', t('BOINC project root not found at %directory',
187
-      array('%directory' => $values['boinc_root_dir'])
187
+        array('%directory' => $values['boinc_root_dir'])
188 188
     ));
189
-  }
190
-  else {
189
+    }
190
+    else {
191 191
     // By default, try to automatically set specific directories from the root
192 192
     if (!$values['boinc_config_xml_dir']) {
193
-      $values['boinc_config_xml_dir'] = $values['boinc_root_dir'];
194
-      form_set_value($form['overrides']['boinc_config_xml_dir'], $values['boinc_config_xml_dir'], $form_state);
193
+        $values['boinc_config_xml_dir'] = $values['boinc_root_dir'];
194
+        form_set_value($form['overrides']['boinc_config_xml_dir'], $values['boinc_config_xml_dir'], $form_state);
195 195
     }
196 196
     if (!$values['boinc_html_inc_dir']) {
197
-      $values['boinc_html_inc_dir'] = "{$values['boinc_root_dir']}/html/inc";
198
-      form_set_value($form['overrides']['boinc_html_inc_dir'], $values['boinc_html_inc_dir'], $form_state);
197
+        $values['boinc_html_inc_dir'] = "{$values['boinc_root_dir']}/html/inc";
198
+        form_set_value($form['overrides']['boinc_html_inc_dir'], $values['boinc_html_inc_dir'], $form_state);
199 199
     }
200 200
     if (!$values['boinc_project_config_dir']) {
201
-      $values['boinc_project_config_dir'] = "{$values['boinc_root_dir']}/html/project";
202
-      form_set_value($form['overrides']['boinc_project_config_dir'], $values['boinc_project_config_dir'], $form_state);
201
+        $values['boinc_project_config_dir'] = "{$values['boinc_root_dir']}/html/project";
202
+        form_set_value($form['overrides']['boinc_project_config_dir'], $values['boinc_project_config_dir'], $form_state);
203 203
     }
204 204
     if (!$values['boinc_user_image_dir']) {
205
-      $values['boinc_user_image_dir'] = "{$values['boinc_root_dir']}/html/user_profile/images";
206
-      form_set_value($form['overrides']['boinc_user_image_dir'], $values['boinc_user_image_dir'], $form_state);
205
+        $values['boinc_user_image_dir'] = "{$values['boinc_root_dir']}/html/user_profile/images";
206
+        form_set_value($form['overrides']['boinc_user_image_dir'], $values['boinc_user_image_dir'], $form_state);
207 207
     }
208 208
     // Validate that required BOINC content is found
209 209
     if (!is_readable("{$values['boinc_config_xml_dir']}/config.xml")) {
210
-      form_set_error('boinc_config_xml_dir', t('@file not found in %directory',
210
+        form_set_error('boinc_config_xml_dir', t('@file not found in %directory',
211 211
         array(
212
-          '@file' => 'config.xml',
213
-          '%directory' => "{$values['boinc_config_xml_dir']}/"
212
+            '@file' => 'config.xml',
213
+            '%directory' => "{$values['boinc_config_xml_dir']}/"
214 214
         )
215
-      ));
215
+        ));
216 216
     }
217 217
     if (!is_readable("{$values['boinc_html_inc_dir']}/util.inc")) {
218
-      form_set_error('boinc_html_inc_dir', t('@file not found in %directory',
218
+        form_set_error('boinc_html_inc_dir', t('@file not found in %directory',
219 219
         array(
220
-          '@file' => 'util.inc',
221
-          '%directory' => "{$values['boinc_html_inc_dir']}/"
220
+            '@file' => 'util.inc',
221
+            '%directory' => "{$values['boinc_html_inc_dir']}/"
222 222
         )
223
-      ));
223
+        ));
224 224
     }
225 225
     if (!is_readable("{$values['boinc_project_config_dir']}/project.inc")) {
226
-      form_set_error('boinc_project_config_dir', t('@file not found in %directory',
226
+        form_set_error('boinc_project_config_dir', t('@file not found in %directory',
227 227
         array(
228
-          '@file' => 'project.inc',
229
-          '%directory' => "{$values['boinc_project_config_dir']}/"
228
+            '@file' => 'project.inc',
229
+            '%directory' => "{$values['boinc_project_config_dir']}/"
230 230
         )
231
-      ));
231
+        ));
232 232
     }
233 233
     if (!is_dir($values['boinc_user_image_dir'])) {
234
-      form_set_error('boinc_user_image_dir', t('Profile image directory not found
234
+        form_set_error('boinc_user_image_dir', t('Profile image directory not found
235 235
         at %directory', array('%directory' => $values['boinc_user_image_dir'])
236
-      ));
236
+        ));
237 237
     }
238 238
     if ($values['boinc_host_sched_logs_dir']
239 239
         AND !is_dir($values['boinc_host_sched_logs_dir'])
240
-      ) {
241
-      form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log
240
+        ) {
241
+        form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log
242 242
         directory not found at %directory',
243 243
         array('%directory' => $values['boinc_host_sched_logs_dir'])
244
-      ));
244
+        ));
245
+    }
245 246
     }
246
-  }
247 247
 }
248 248
 
249 249
 /**
250
-  * Handle post-validation submission of BOINC environment form.
251
-  */
250
+ * Handle post-validation submission of BOINC environment form.
251
+ */
252 252
 function boincuser_admin_environment_submit($form, &$form_state) {
253
-  unset($_SESSION['boinc_env']);
254
-  drupal_set_message(t('BOINC environment settings have been updated.'));
253
+    unset($_SESSION['boinc_env']);
254
+    drupal_set_message(t('BOINC environment settings have been updated.'));
255 255
 }
256 256
 
257 257
 /**
258
-  * The BOINC scheduler form provides options for how scheduler tags are
259
-  * inserted into the front page
260
-  */
258
+ * The BOINC scheduler form provides options for how scheduler tags are
259
+ * inserted into the front page
260
+ */
261 261
 function boincuser_admin_scheduler(&$form_state) {
262
-  $form = array();
263
-  $config_cgi_url = '';
264
-  if ($config_xml_dir = variable_get('boinc_config_xml_dir', '')) {
262
+    $form = array();
263
+    $config_cgi_url = '';
264
+    if ($config_xml_dir = variable_get('boinc_config_xml_dir', '')) {
265 265
     // Get the cgi_url option from the config file as the default scheduler URL
266 266
     $xml = new DOMDocument();
267 267
     if ($xml->load("{$config_xml_dir}/config.xml")) {
268
-      $config = xml_to_array($xml);
269
-      if (isset($config['boinc']['config']['cgi_url']['@value'])) {
268
+        $config = xml_to_array($xml);
269
+        if (isset($config['boinc']['config']['cgi_url']['@value'])) {
270 270
         $config_cgi_url = rtrim(trim($config['boinc']['config']['cgi_url']['@value']), '/');
271 271
         $config_cgi_url .= '/cgi';
272
-      }
272
+        }
273 273
     }
274
-  }
275
-  $default = array(
274
+    }
275
+    $default = array(
276 276
     'boinc_scheduler_urls' => variable_get('boinc_scheduler_urls', $config_cgi_url),
277 277
     'boinc_scheduler_tag_format_old' => variable_get('boinc_scheduler_tag_format_old', 1),
278 278
     'boinc_scheduler_tag_format_new' => variable_get('boinc_scheduler_tag_format_new', 1)
279
-  );
279
+    );
280 280
 
281
-  // Define the form
282
-  $form['boinc_scheduler_urls'] = array(
281
+    // Define the form
282
+    $form['boinc_scheduler_urls'] = array(
283 283
     '#type' => 'textarea',
284 284
     '#title' => t('Scheduling server URLs'),
285 285
     '#default_value' => $default['boinc_scheduler_urls'],
286 286
     '#cols' => 60,
287 287
     '#rows' => 5,
288 288
     '#description' => t('If there are multiple URLs, please enter one per line.'),
289
-  );
290
-  $form['boinc_scheduler_tag_format_old'] = array(
289
+    );
290
+    $form['boinc_scheduler_tag_format_old'] = array(
291 291
     '#type' => 'checkbox',
292 292
     '#title' => t('Old format (@scheduler tag)', array('@scheduler' => '<scheduler>')),
293 293
     '#default_value' => $default['boinc_scheduler_tag_format_old']
294
-  );
295
-  $form['boinc_scheduler_tag_format_new'] = array(
294
+    );
295
+    $form['boinc_scheduler_tag_format_new'] = array(
296 296
     '#type' => 'checkbox',
297 297
     '#title' => t('New format (@link tag)', array('@link' => '<link>')),
298 298
     '#default_value' => $default['boinc_scheduler_tag_format_new']
299
-  );
299
+    );
300 300
 
301
-  return system_settings_form($form);
301
+    return system_settings_form($form);
302 302
 }
303 303
 
304 304
 /**
305
-  * Validate the BOINC scheduler form.
306
-  */
305
+ * Validate the BOINC scheduler form.
306
+ */
307 307
 function boincuser_admin_scheduler_validate($form, &$form_state) {
308
-  $values = $form_state['values'];
309
-  if (!$values['boinc_scheduler_urls']) {
308
+    $values = $form_state['values'];
309
+    if (!$values['boinc_scheduler_urls']) {
310 310
     form_set_error('boinc_scheduler_urls', t('At least one scheduling server
311 311
       URL must be specified.'));
312
-  }
313
-  else {
312
+    }
313
+    else {
314 314
     $urls = explode("\r\n", $values['boinc_scheduler_urls']);
315 315
     foreach ($urls as $key => $url) {
316
-      if (!$url) {
316
+        if (!$url) {
317 317
         unset($urls[$key]);
318 318
         continue;
319
-      }
320
-      if (!filter_var($url, FILTER_VALIDATE_URL)) {
319
+        }
320
+        if (!filter_var($url, FILTER_VALIDATE_URL)) {
321 321
         form_set_error('boinc_scheduler_urls', t('@url is not a valid URL
322 322
           format.', array('@url' => $url)));
323 323
         break;
324
-      }
324
+        }
325 325
     }
326 326
     $form_state['values']['boinc_scheduler_urls'] = implode("\r\n", $urls);
327
-  }
327
+    }
328 328
 }
329 329
 
330 330
 /**
331
-  * Handle post-validation submission of BOINC scheduler form.
332
-  */
331
+ * Handle post-validation submission of BOINC scheduler form.
332
+ */
333 333
 function boincuser_admin_scheduler_submit($form, &$form_state) {
334
-  drupal_set_message(t('BOINC scheduling server settings have been updated.'));
334
+    drupal_set_message(t('BOINC scheduling server settings have been updated.'));
335 335
 }
336 336
 
337 337
 
338 338
 /**
339
-  * Drupal-BOINC Web site related options.
340
-  */
339
+ * Drupal-BOINC Web site related options.
340
+ */
341 341
 function boincuser_admin_weboptions(&$form_state) {
342
-  global $base_url;
343
-  $form = array();
342
+    global $base_url;
343
+    $form = array();
344 344
 
345
-  //form defaults
346
-  $default = array(
345
+    //form defaults
346
+    $default = array(
347 347
     'boinc_weboptions_enableaccountcreateRPC' => variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE),
348 348
     'boinc_weboptions_registrationtitle' => variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'),
349 349
     'boinc_weboptions_termsofuse' => variable_get('boinc_weboptions_termsofuse', ''),
@@ -357,65 +357,65 @@  discard block
 block discarded – undo
357 357
     'boinc_weboptions_rulespolicies' => variable_get('boinc_weboptions_rulespolicies', ''),
358 358
     'boinc_other_frontpage' => variable_get('boinc_other_frontpage', ''),
359 359
     'boinc_weboptions_blacklisted_usernames' => variable_get('boinc_weboptions_blacklisted_usernames', "admin\nadministrator\nmoderator"),
360
-  );
360
+    );
361 361
 
362
-  // Define the form
363
-  $form['registrationtitle'] = array(
362
+    // Define the form
363
+    $form['registrationtitle'] = array(
364 364
     '#value' => '<h3>BOINC Registration</h3>',
365
-  );
365
+    );
366 366
 
367
-  $form['boinc_weboptions_enableaccountcreateRPC'] = array(
367
+    $form['boinc_weboptions_enableaccountcreateRPC'] = array(
368 368
     '#type' => 'checkbox',
369 369
     '#title' => t('Enable create_account.php RPC'),
370 370
     '#default_value' => $default['boinc_weboptions_enableaccountcreateRPC'],
371 371
     '#description' => t('If checked, users will be able to create an account remotely using the create_account.php RPC. This option is independent of the user regsitration option found in ') . l(t('User management -> User settings'), '/admin/user/settings') . '. If enabled, user <b>may not be able to see and agree to the terms-of-use</b> to your site\'s privacy and data retention policies!',
372
-  );
372
+    );
373 373
 
374
-  $form['boinc_weboptions_registrationtitle'] = array(
374
+    $form['boinc_weboptions_registrationtitle'] = array(
375 375
     '#type' => 'textfield',
376 376
     '#title' => t('Title of regsistration page'),
377 377
     '#description' => t('Title text presented above the terms of use text.'),
378 378
     '#default_value' => $default['boinc_weboptions_registrationtitle'],
379
-  );
379
+    );
380 380
 
381
-  $form['boinc_weboptions_termsofuse'] = array(
381
+    $form['boinc_weboptions_termsofuse'] = array(
382 382
     '#type' => 'textarea',
383 383
     '#title' => t('Terms of Use Message for User Registration Page'),
384 384
     '#default_value' => $default['boinc_weboptions_termsofuse'],
385 385
     '#cols' => 60,
386 386
     '#rows' => 8,
387 387
     '#description' => t('Text to be displayed on site\'s user registration page. Privacy policy and other data retention information goes here. If empty, there will be no terms of use message, and the title above and checkbox below will not be shown.'),
388
-  );
388
+    );
389 389
 
390
-  $form['boinc_weboptions_overrideboinctou'] = array(
390
+    $form['boinc_weboptions_overrideboinctou'] = array(
391 391
     '#type' => 'checkbox',
392 392
     '#title' => t('Override BOINC terms of use.'),
393 393
     '#default_value' => $default['boinc_weboptions_overrideboinctou'],
394 394
     '#description' => t('Override the BOINC terms_of_use.txt file for get_profject_config.php RPC. If TRUE, the get_project_config.php RPC will use the above terms of use text entered above. Otherwise, the original terms_of_use.txt text file in the project directory is used. And you will need to be responsible for keeping both the text file and the above terms of use text up-to-date and in sync with each other.'),
395
-  );
395
+    );
396 396
 
397
-  $form['boinc_weboptions_agreequestion'] = array(
397
+    $form['boinc_weboptions_agreequestion'] = array(
398 398
     '#type' => 'textfield',
399 399
     '#title' => t('Terms of use agreement question'),
400 400
     '#description' => t('This text is presented to the user as the question next to the \'I agree\' checkbox.'),
401 401
     '#default_value' => $default['boinc_weboptions_agreequestion'],
402
-  );
402
+    );
403 403
 
404
-  $form['boinc_weboptions_registrationtitle2'] = array(
404
+    $form['boinc_weboptions_registrationtitle2'] = array(
405 405
     '#type' => 'textfield',
406 406
     '#title' => t('Instructions for username/email/password questions'),
407 407
     '#description' => t('Title text presented below terms of use and above username/email/password textfields.'),
408 408
     '#default_value' => $default['boinc_weboptions_registrationtitle2'],
409
-  );
409
+    );
410 410
 
411
-  $form['boinc_weboptions_existinguser_tou'] = array(
411
+    $form['boinc_weboptions_existinguser_tou'] = array(
412 412
     '#type' => 'checkbox',
413 413
     '#title' => t('Are existing users forced to agree to the Terms of Use?'),
414 414
     '#default_value' => $default['boinc_weboptions_existinguser_tou'],
415 415
     '#description' => t('If TRUE, existing users are forced to agree to a terms of use (if present) when the login and the system has detected they have not agreed. Otherwise they may login as normal. This option has no affect on whether or not new users must agree to the terms of use.'),
416
-  );
416
+    );
417 417
 
418
-  $form['boinc_weboptions_pathstoignore'] = array(
418
+    $form['boinc_weboptions_pathstoignore'] = array(
419 419
     '#type' => 'textarea',
420 420
     '#title' => t('Paths to ignore the Terms of Use page'),
421 421
     '#default_value' => $default['boinc_weboptions_pathstoignore'],
@@ -424,80 +424,80 @@  discard block
 block discarded – undo
424 424
     '#description' => t('A list of Drupal URLs/paths to ignore for Terms of Use (ToU). If the option above \'Are existing users forced to agree to the Terms of Use?\' is activated, then some paths need to be ignored when checking if a user has agreed to the ToU. A good example is the logout path, "logout", or else users will not be able to logout!
425 425
 <p>There is a default list of paths that must be ignored or else the site will not function. They are not included in this box. Here you may provide additional paths to be ignored, for example the privacy policy page may be accessible so that users may read it before agreeing to the site\'s ToU.
426 426
 <p>Paths should be entered one per line. All paths should be <em>lower-case</em> and  should not include a leading \'/\'. Example: account/info/edit will allow the user to visit ' . $base_url . '/account/info/edit without first agreeing to the ToU. Regexp are allowed. Example: account/* will allow the user to visit any path starting with ' . $base_url . '/account/.'),
427
-  );
427
+    );
428 428
 
429
-  $form['pathtitle'] = array(
429
+    $form['pathtitle'] = array(
430 430
     '#value' => '<h3>Path Options</h3>',
431
-  );
431
+    );
432 432
 
433
-  $form['boinc_weboptions_accountfinish'] = array (
433
+    $form['boinc_weboptions_accountfinish'] = array (
434 434
     '#type' => 'textfield',
435 435
     '#title' => t('Path to a custom account_finish.php page, should be a path to a node'),
436 436
     '#description' => t('Provide a path to a node which will serve as your site\'s landing page for users create an account using the BOINC client manager. They will be directed to this page after the account is created. If blank, a default account_finish page will be used.<br>Examples: account_finish, content/welcome, node/123'),
437 437
     '#default_value' => $default['boinc_weboptions_accountfinish'],
438
-  );
439
-  $form['boinc_weboptions_moderationpage'] = array (
438
+    );
439
+    $form['boinc_weboptions_moderationpage'] = array (
440 440
     '#type' => 'textfield',
441 441
     '#title' => t('Path to the site\'s content moderation info page, should be a path to a node'),
442 442
     '#description' => t('Provide a path to a node which will serve as your site\'s page for account/content moderation information. This will be used on the default account_finish page. If blank, no link to a moderation page will be provided. If a path is provided to the custom account_finish.php page (above), this field will be ignored.<br>Examples: moderation, content/moderation, node/456'),
443 443
     '#default_value' => $default['boinc_weboptions_moderationpage'],
444
-  );
445
-  $form['boinc_weboptions_rulespolicies'] = array (
444
+    );
445
+    $form['boinc_weboptions_rulespolicies'] = array (
446 446
     '#type' => 'textfield',
447 447
     '#title' => t('Path to the site\'s rule and policies page, should be a path to a node'),
448 448
     '#description' => t('Provide a path to a node which will serve as your site\'s rules and policies page. This will be used on the Join page shown to new users. If blank, no link to a rules and policies page will be provided.<br>Examples: rules-and-policies, node/789'),
449 449
     '#default_value' => $default['boinc_weboptions_rulespolicies'],
450
-  );
451
-  $form['boinc_other_frontpage'] = array (
450
+    );
451
+    $form['boinc_other_frontpage'] = array (
452 452
     '#type' => 'textarea',
453 453
     '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'),
454 454
     '#default_value' => $default['boinc_other_frontpage'],
455 455
     '#cols' => 60,
456 456
     '#rows' => 8,
457 457
     '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), NULL, 'boinc:admin-boinc-other-options'),
458
-  );
458
+    );
459 459
 
460
-  $form['Othertitle'] = array(
460
+    $form['Othertitle'] = array(
461 461
     '#value' => '<h3>Other Options</h3>',
462
-  );
462
+    );
463 463
 
464
-  $form['boinc_weboptions_blacklisted_usernames'] = array (
464
+    $form['boinc_weboptions_blacklisted_usernames'] = array (
465 465
     '#type' => 'textarea',
466 466
     '#title' => t('BOINC username blacklist'),
467 467
     '#default_value' => $default['boinc_weboptions_blacklisted_usernames'],
468 468
     '#cols' => 60,
469 469
     '#rows' => 7,
470 470
     '#description' => t('Username blacklist: List of names that users will not be able to choose as their BOINC username. This will only affect Web registration and when a user changes their name using the Web site. Names should be entered one per line.<p>All names should be <em>lower-case</em>. The comparison made is case-insensitive.<p>If you wish to <em>disable</em> this feature, remove all names from this textbox; the blacklist will be empty.'),
471
-  );
471
+    );
472 472
 
473
-  return system_settings_form($form);
473
+    return system_settings_form($form);
474 474
 }
475 475
 
476 476
 /**
477
-  * Validate BOINC other form
478
-  */
477
+ * Validate BOINC other form
478
+ */
479 479
 function boincuser_admin_weboptions_validate($form, &$form_state) {
480
-  $values = $form_state['values'];
480
+    $values = $form_state['values'];
481 481
 
482
-  $accountfinish = $values['boinc_weboptions_accountfinish'];
483
-  if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) {
482
+    $accountfinish = $values['boinc_weboptions_accountfinish'];
483
+    if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) {
484 484
     form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.'));
485
-  }
485
+    }
486 486
 
487
-  $moderationpage = $values['boinc_weboptions_moderationpage'];
488
-  if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) {
487
+    $moderationpage = $values['boinc_weboptions_moderationpage'];
488
+    if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) {
489 489
     form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.'));
490
-  }
490
+    }
491 491
 
492
-  $rulespolicies = $values['boinc_weboptions_rulespolicies'];
493
-  if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) {
492
+    $rulespolicies = $values['boinc_weboptions_rulespolicies'];
493
+    if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) {
494 494
     form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.'));
495
-  }
495
+    }
496 496
 }
497 497
 
498 498
 /**
499
-  * Submit BOINC other form
500
-  */
499
+ * Submit BOINC other form
500
+ */
501 501
 function boincuser_admin_weboptions_submit($form, &$form_state) {
502
-  drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') );
502
+    drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') );
503 503
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/theme-settings.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -15,42 +15,42 @@
 block discarded – undo
15 15
  */
16 16
 function boinc_settings($saved_settings) {
17 17
 
18
-  // Get the default values from the .info file.
19
-  $defaults = zen_theme_get_default_settings('boinc');
18
+    // Get the default values from the .info file.
19
+    $defaults = zen_theme_get_default_settings('boinc');
20 20
 
21
-  // Merge the saved variables and their default values.
22
-  $settings = array_merge($defaults, $saved_settings);
21
+    // Merge the saved variables and their default values.
22
+    $settings = array_merge($defaults, $saved_settings);
23 23
 
24
-  /*
24
+    /*
25 25
    * Create the form using Forms API: http://api.drupal.org/api/6
26 26
    */
27
-  $form = array();
28
-  $form['boinc_stats_charts'] = array(
27
+    $form = array();
28
+    $form['boinc_stats_charts'] = array(
29 29
     '#type' => 'fieldset',
30 30
     '#title' => t('Chart settings'),
31 31
     '#attributes' => array(
32
-      'class' => 'zen-settings',
32
+        'class' => 'zen-settings',
33 33
     ),
34
-  );
35
-  $form['boinc_stats_charts']['boinc_stats_chart_color'] = array(
34
+    );
35
+    $form['boinc_stats_charts']['boinc_stats_chart_color'] = array(
36 36
     '#type'          => 'textfield',
37 37
     '#title'         => t('Chart color'),
38 38
     '#default_value' => $settings['boinc_stats_chart_color'],
39 39
     '#description'   => t('The primary color of the stats chart in hex format (e.g. #FAA341).'),
40
-  );
41
-  $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array(
40
+    );
41
+    $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array(
42 42
     '#type'          => 'textfield',
43 43
     '#title'         => t('Chart background color'),
44 44
     '#default_value' => $settings['boinc_stats_chart_bcolor'],
45 45
     '#description'   => t('The background color of the stats chart in hex format (e.g. #FFFFFF).'),
46
-  );
46
+    );
47 47
 
48
-  // Add the base theme's settings.
49
-  $form += zen_settings($saved_settings, $defaults);
48
+    // Add the base theme's settings.
49
+    $form += zen_settings($saved_settings, $defaults);
50 50
 
51
-  // Remove some of the base theme's settings.
52
-  unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
51
+    // Remove some of the base theme's settings.
52
+    unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
53 53
 
54
-  // Return the form
55
-  return $form;
54
+    // Return the form
55
+    return $form;
56 56
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 // $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $
3 3
 
4 4
 // Include the definition of zen_settings() and zen_theme_get_default_settings().
5
-include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php';
5
+include_once './'.drupal_get_path('theme', 'zen').'/theme-settings.php';
6 6
 
7 7
 
8 8
 /**
Please login to merge, or discard this patch.
sites/all/features/internationalization/internationalization.strongarm.inc 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,34 +4,34 @@
 block discarded – undo
4 4
  * Implementation of hook_strongarm().
5 5
  */
6 6
 function internationalization_strongarm() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  $strongarm = new stdClass;
10
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
-  $strongarm->api_version = 1;
12
-  $strongarm->name = 'i18nstrings_allowed_formats';
13
-  $strongarm->value = array(
9
+    $strongarm = new stdClass;
10
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
+    $strongarm->api_version = 1;
12
+    $strongarm->name = 'i18nstrings_allowed_formats';
13
+    $strongarm->value = array(
14 14
     0 => 4,
15 15
     1 => 5,
16
-  );
17
-  $export['i18nstrings_allowed_formats'] = $strongarm;
16
+    );
17
+    $export['i18nstrings_allowed_formats'] = $strongarm;
18 18
 
19
-  $strongarm = new stdClass;
20
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
21
-  $strongarm->api_version = 1;
22
-  $strongarm->name = 'i18ntaxonomy_vocabulary';
23
-  $strongarm->value = array(
19
+    $strongarm = new stdClass;
20
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
21
+    $strongarm->api_version = 1;
22
+    $strongarm->name = 'i18ntaxonomy_vocabulary';
23
+    $strongarm->value = array(
24 24
     2 => '1',
25 25
     1 => '0',
26
-  );
27
-  $export['i18ntaxonomy_vocabulary'] = $strongarm;
26
+    );
27
+    $export['i18ntaxonomy_vocabulary'] = $strongarm;
28 28
 
29
-  $strongarm = new stdClass;
30
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
31
-  $strongarm->api_version = 1;
32
-  $strongarm->name = 'language_negotiation';
33
-  $strongarm->value = '2';
34
-  $export['language_negotiation'] = $strongarm;
29
+    $strongarm = new stdClass;
30
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
31
+    $strongarm->api_version = 1;
32
+    $strongarm->name = 'language_negotiation';
33
+    $strongarm->value = '2';
34
+    $export['language_negotiation'] = $strongarm;
35 35
 
36
-  return $export;
36
+    return $export;
37 37
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
   $export = array();
8 8
 
9 9
   $strongarm = new stdClass;
10
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
10
+  $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */
11 11
   $strongarm->api_version = 1;
12 12
   $strongarm->name = 'i18nstrings_allowed_formats';
13 13
   $strongarm->value = array(
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
   $export['i18nstrings_allowed_formats'] = $strongarm;
18 18
 
19 19
   $strongarm = new stdClass;
20
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
20
+  $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */
21 21
   $strongarm->api_version = 1;
22 22
   $strongarm->name = 'i18ntaxonomy_vocabulary';
23 23
   $strongarm->value = array(
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
   $export['i18ntaxonomy_vocabulary'] = $strongarm;
28 28
 
29 29
   $strongarm = new stdClass;
30
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
30
+  $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */
31 31
   $strongarm->api_version = 1;
32 32
   $strongarm->name = 'language_negotiation';
33 33
   $strongarm->value = '2';
Please login to merge, or discard this patch.
internationalization/internationalization.features.user_permission.inc 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,47 +4,47 @@
 block discarded – undo
4 4
  * Implementation of hook_user_default_permissions().
5 5
  */
6 6
 function internationalization_user_default_permissions() {
7
-  $permissions = array();
7
+    $permissions = array();
8 8
 
9
-  // Exported permission: administer all languages
10
-  $permissions['administer all languages'] = array(
9
+    // Exported permission: administer all languages
10
+    $permissions['administer all languages'] = array(
11 11
     'name' => 'administer all languages',
12 12
     'roles' => array(
13
-      '0' => 'administrator',
13
+        '0' => 'administrator',
14 14
     ),
15
-  );
15
+    );
16 16
 
17
-  // Exported permission: administer languages
18
-  $permissions['administer languages'] = array(
17
+    // Exported permission: administer languages
18
+    $permissions['administer languages'] = array(
19 19
     'name' => 'administer languages',
20 20
     'roles' => array(
21
-      '0' => 'administrator',
21
+        '0' => 'administrator',
22 22
     ),
23
-  );
23
+    );
24 24
 
25
-  // Exported permission: administer translations
26
-  $permissions['administer translations'] = array(
25
+    // Exported permission: administer translations
26
+    $permissions['administer translations'] = array(
27 27
     'name' => 'administer translations',
28 28
     'roles' => array(
29
-      '0' => 'administrator',
29
+        '0' => 'administrator',
30 30
     ),
31
-  );
31
+    );
32 32
 
33
-  // Exported permission: translate content
34
-  $permissions['translate content'] = array(
33
+    // Exported permission: translate content
34
+    $permissions['translate content'] = array(
35 35
     'name' => 'translate content',
36 36
     'roles' => array(
37
-      '0' => 'administrator',
37
+        '0' => 'administrator',
38 38
     ),
39
-  );
39
+    );
40 40
 
41
-  // Exported permission: translate interface
42
-  $permissions['translate interface'] = array(
41
+    // Exported permission: translate interface
42
+    $permissions['translate interface'] = array(
43 43
     'name' => 'translate interface',
44 44
     'roles' => array(
45
-      '0' => 'administrator',
45
+        '0' => 'administrator',
46 46
     ),
47
-  );
47
+    );
48 48
 
49
-  return $permissions;
49
+    return $permissions;
50 50
 }
Please login to merge, or discard this patch.
sites/all/features/internationalization/internationalization.features.inc 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
  * Implementation of hook_ctools_plugin_api().
5 5
  */
6 6
 function internationalization_ctools_plugin_api() {
7
-  list($module, $api) = func_get_args();
8
-  if ($module == "strongarm" && $api == "strongarm") {
7
+    list($module, $api) = func_get_args();
8
+    if ($module == "strongarm" && $api == "strongarm") {
9 9
     return array("version" => 1);
10
-  }
10
+    }
11 11
 }
Please login to merge, or discard this patch.