Passed
Push — client_release/8/8.2 ( 523f15...fbad58 )
by Vitalii
09:04
created
html/inc/bootstrap.inc 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
                                 ];
211 211
                             } else {
212 212
                                 $x[] = [
213
-                                    "Manage $app->name",
213
+                                    "manage $app->name",
214 214
                                     "manage_project.php"
215 215
                                 ];
216 216
                             }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc 1 patch
Upper-Lower-Casing   +269 added lines, -269 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
 /**
15 15
  * The structure of the general preferences form
16 16
  */
17
-function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = FALSE) {
17
+function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = false) {
18 18
   $form = array();
19 19
   $prefs = null;
20
-  $established = TRUE;
20
+  $established = true;
21 21
 
22 22
   // Enable AHAH form support for dynamically updating content based on preset
23 23
   ahah_helper_register($form, $form_state);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     // Take note if this is not an established preference set on the account
34 34
     if (isset($prefs['@attributes']['cleared'])) {
35
-      $established = FALSE;
35
+      $established = false;
36 36
     }
37 37
 
38 38
     // Determine if a preset is selected or if these are custom settings
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
           break;
71 71
       }// switch
72 72
   } else {
73
-      $form_state['storage']['wip'] = TRUE;
73
+      $form_state['storage']['wip'] = true;
74 74
       if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75 75
           if ($established) {
76 76
               $prefs_preset = 'custom';
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
   // Standard option sets
138 138
   $form['boolean_options'] = array(
139 139
     '#type' => 'value',
140
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
140
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
141 141
   );
142 142
   $form['hour_options'] = array(
143 143
     '#type' => 'value',
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     '#prefix' => '<div id="prefs-wrapper">', // This is our wrapper div.
159 159
     '#attributes' => array('class' => 'ahah-container'),
160 160
     '#suffix' => '</div>',
161
-    '#tree'   => TRUE
161
+    '#tree'   => true
162 162
   );
163 163
   //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
164 164
 
@@ -178,15 +178,15 @@  discard block
 block discarded – undo
178 178
 
179 179
   // Simplified selectors
180 180
   $form['prefs']['preset'] = array(
181
-      '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
181
+      '#title' => bts('Presets', array(), null, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
182 182
     '#type' => 'radios',
183 183
     '#description' => ' ',
184 184
     '#options' => array(
185
-      'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
-      'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
-      'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
-      'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
-      'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
185
+      'standard' => bts('Standard', array(), null, 'boinc:account-preferences-preset'),
186
+      'maximum' => bts('Maximum', array(), null, 'boinc:account-preferences-preset'),
187
+      'green' => bts('Green', array(), null, 'boinc:account-preferences-preset'),
188
+      'minimum' => bts('Minimum', array(), null, 'boinc:account-preferences-preset'),
189
+      'custom' => bts('Custom', array(), null, 'boinc:account-preferences-preset')
190 190
     ),
191 191
     '#prefix' => '<div class="simple-form-controls">',
192 192
     '#suffix' => '</div>',
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
   );
200 200
   $form['prefs']['select preset'] = array(
201 201
     '#type'  => 'submit',
202
-    '#value' => bts('Update preset', array(), NULL, 'boinc:account-preferences-preset'),
202
+    '#value' => bts('Update preset', array(), null, 'boinc:account-preferences-preset'),
203 203
     '#submit' => array('ahah_helper_generic_submit'),
204 204
     // The 'no-js' class only displays this button if javascript is disabled
205 205
     '#attributes' => array('class' => 'no-js'),
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 
208 208
   // Advanced preferences
209 209
   $form['prefs']['advanced'] = array(
210
-    '#title' => bts('Advanced settings', array(), NULL, 'boinc:account-preferences-option'),
210
+    '#title' => bts('Advanced settings', array(), null, 'boinc:account-preferences-option'),
211 211
     '#type' => 'fieldset',
212 212
     '#description' => '',
213
-    '#collapsible' => TRUE,
213
+    '#collapsible' => true,
214 214
     '#collapsed' => !$advanced,
215 215
     '#attributes' => array('class' => 'advanced-settings'),
216 216
   );
@@ -226,62 +226,62 @@  discard block
 block discarded – undo
226 226
   );
227 227
 
228 228
   $form['prefs']['advanced']['processor'] = array(
229
-    '#title' => bts('Processor usage', array(), NULL, 'boinc:account-preferences-computing'),
229
+    '#title' => bts('Processor usage', array(), null, 'boinc:account-preferences-computing'),
230 230
     '#type' => 'fieldset',
231 231
     '#description' => '',
232
-    '#collapsible' => FALSE,
233
-    '#collapsed' => FALSE
232
+    '#collapsible' => false,
233
+    '#collapsed' => false
234 234
   );
235 235
   $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
236
-    '#title' => bts('Suspend when computer is on battery?', array(), NULL, 'boinc:account-preferences-computing'),
236
+    '#title' => bts('Suspend when computer is on battery?', array(), null, 'boinc:account-preferences-computing'),
237 237
     '#type' => 'radios',
238
-    '#description' => bts('Suspends computing on portables when running on battery power.', array(), NULL, 'boinc:account-preferences-computing'),
238
+    '#description' => bts('Suspends computing on portables when running on battery power.', array(), null, 'boinc:account-preferences-computing'),
239 239
     '#options' => $form['boolean_options']['#value'],
240 240
     '#attributes' => array('class' => 'fancy'),
241 241
     '#default_value' => ($default['run_on_batteries']) ? 0 : 1 // intentional inversion of setting
242 242
   );
243 243
   $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
244
-    '#title' => bts('Suspend when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
244
+    '#title' => bts('Suspend when computer is in use?', array(), null, 'boinc:account-preferences-computing'),
245 245
     '#type' => 'radios',
246
-    '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
246
+    '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), null, 'boinc:account-preferences-computing'),
247 247
     '#options' => $form['boolean_options']['#value'],
248 248
     '#attributes' => array('class' => 'fancy'),
249 249
     '#default_value' => ($default['run_if_user_active']) ? 0 : 1 // intentional inversion of setting
250 250
   );
251 251
   $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
252
-    '#title' => bts('Suspend GPU computing when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
252
+    '#title' => bts('Suspend GPU computing when computer is in use?', array(), null, 'boinc:account-preferences-computing'),
253 253
     '#type' => 'radios',
254
-    '#description' => bts("Suspends GPU computing when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
254
+    '#description' => bts("Suspends GPU computing when you're using the computer.", array(), null, 'boinc:account-preferences-computing'),
255 255
     '#options' => $form['boolean_options']['#value'],
256 256
     '#attributes' => array('class' => 'fancy'),
257 257
     '#default_value' => ($default['run_gpu_if_user_active']) ? 0 : 1 // intentional inversion of setting
258 258
   );
259 259
   $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
-      '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
260
+      '#title' => bts('"In use" means mouse/keyboard input in last', array(), null, 'boinc:account-preferences-computing'),
261 261
     '#type' => 'textfield',
262
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
262
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
263 263
     '#default_value' => $default['idle_time_to_run'],
264 264
     '#size' => 1,
265
-    '#description' => bts('This determines when the computer is considered "in use".', array(), NULL, 'boinc:account-preferences-computing')
265
+    '#description' => bts('This determines when the computer is considered "in use".', array(), null, 'boinc:account-preferences-computing')
266 266
   );
267 267
   $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
268
-    '#title' => bts('Suspend when no mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
268
+    '#title' => bts('Suspend when no mouse/keyboard input in last', array(), null, 'boinc:account-preferences-computing'),
269 269
     '#type' => 'textfield',
270
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
270
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
271 271
     '#default_value' => $default['suspend_if_no_recent_input'],
272 272
     '#size' => 1,
273
-    '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), NULL, 'boinc:account-preferences-computing')
273
+    '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), null, 'boinc:account-preferences-computing')
274 274
   );
275 275
   $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
276
-    '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), NULL, 'boinc:account-preferences-computing'),
276
+    '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), null, 'boinc:account-preferences-computing'),
277 277
     '#type' => 'textfield',
278 278
     '#field_suffix' => '%',
279 279
     '#default_value' => $default['suspend_cpu_usage'],
280 280
     '#size' => 1,
281
-    '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), NULL, 'boinc:account-preferences-computing'),
281
+    '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), null, 'boinc:account-preferences-computing'),
282 282
   );
283 283
   $form['prefs']['advanced']['processor']['hour_label'] = array(
284
-    '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
284
+    '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), null, 'boinc:account-preferences-computing') . '</label></div>'
285 285
   );
286 286
   $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     '#default_value' => $default['start_hour']
290 290
   );
291 291
   $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
292
+    '#value' => '<span>' . bts('and', array(), null, 'boinc:account-preference') . '</span>'
293 293
   );
294 294
   $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
@@ -297,164 +297,164 @@  discard block
 block discarded – undo
297 297
     '#default_value' => $default['end_hour']
298 298
   );
299 299
   $form['prefs']['advanced']['processor']['hour_description'] = array(
300
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
300
+    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), null, 'boinc:account-preferences-computing') . '</div></div>'
301 301
   );
302 302
   $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303
-    '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), NULL, 'boinc:account-preferences-computing'),
303
+    '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), null, 'boinc:account-preferences-computing'),
304 304
     '#type' => 'radios',
305 305
     '#options' => $form['boolean_options']['#value'],
306 306
     '#attributes' => array('class' => 'fancy'),
307 307
     '#default_value' => $default['leave_apps_in_memory'],
308
-    '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), NULL, 'boinc:account-preferences-computing')
308
+    '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), null, 'boinc:account-preferences-computing')
309 309
   );
310 310
   $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
311
-    '#title' => bts('Switch between tasks every', array(), NULL, 'boinc:account-preferences-computing'),
311
+    '#title' => bts('Switch between tasks every', array(), null, 'boinc:account-preferences-computing'),
312 312
     '#type' => 'textfield',
313
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
313
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
314 314
     '#default_value' => $default['cpu_scheduling_period_minutes'],
315 315
     '#size' => 1,
316
-    '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), NULL, 'boinc:account-preferences-computing')
316
+    '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), null, 'boinc:account-preferences-computing')
317 317
   );
318 318
   $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
319
-    '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
319
+    '#title' => bts('Use at most', array(), null, 'boinc:account-preferences-computing'),
320 320
     '#type' => 'textfield',
321
-    '#field_suffix' => bts('% of the processors', array(), NULL, 'boinc:account-preferences-computing'),
321
+    '#field_suffix' => bts('% of the processors', array(), null, 'boinc:account-preferences-computing'),
322 322
     '#default_value' => $default['max_ncpus_pct'],
323 323
     '#size' => 1,
324
-    '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), NULL, 'boinc:account-preferences-computing'),
324
+    '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), null, 'boinc:account-preferences-computing'),
325 325
   );
326 326
   $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
327
-    '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
327
+    '#title' => bts('Use at most', array(), null, 'boinc:account-preferences-computing'),
328 328
     '#type' => 'textfield',
329
-    '#field_suffix' => bts('% of the CPU time', array(), NULL, 'boinc:account-preferences-computing'),
329
+    '#field_suffix' => bts('% of the CPU time', array(), null, 'boinc:account-preferences-computing'),
330 330
     '#default_value' => $default['cpu_usage_limit'],
331 331
     '#size' => 1,
332
-    '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), NULL, 'boinc:account-preferences-computing')
332
+    '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), null, 'boinc:account-preferences-computing')
333 333
   );
334 334
 
335 335
   // Disk and memory preferences
336 336
   $form['prefs']['advanced']['storage'] = array(
337
-    '#title' => bts('Disk and memory usage', array(), NULL, 'boinc:account-preferences-computing'),
337
+    '#title' => bts('Disk and memory usage', array(), null, 'boinc:account-preferences-computing'),
338 338
     '#type' => 'fieldset',
339 339
     '#description' => '',
340
-    '#collapsible' => FALSE,
341
-    '#collapsed' => FALSE
340
+    '#collapsible' => false,
341
+    '#collapsed' => false
342 342
   );
343 343
   $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
344
-    '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
344
+    '#title' => bts('Disk: use no more than', array(), null, 'boinc:account-preferences-computing'),
345 345
     '#type' => 'textfield',
346 346
     '#field_suffix' => 'GB',
347 347
     '#default_value' => $default['disk_max_used_gb'],
348 348
     '#size' => 1,
349
-    '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), NULL, 'boinc:account-preferences-computing'),
349
+    '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), null, 'boinc:account-preferences-computing'),
350 350
   );
351 351
   $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
352
-    '#title' => bts('Disk: leave at least', array(), NULL, 'boinc:account-preferences-computing'),
352
+    '#title' => bts('Disk: leave at least', array(), null, 'boinc:account-preferences-computing'),
353 353
     '#type' => 'textfield',
354 354
     '#field_suffix' => 'GB free',
355 355
     '#default_value' => $default['disk_min_free_gb'],
356 356
     '#size' => 1,
357
-    '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), NULL, 'boinc:account-preferences-computing'),
357
+    '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), null, 'boinc:account-preferences-computing'),
358 358
   );
359 359
   $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
360
-    '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
360
+    '#title' => bts('Disk: use no more than', array(), null, 'boinc:account-preferences-computing'),
361 361
     '#type' => 'textfield',
362
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
362
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
363 363
     '#default_value' => $default['disk_max_used_pct'],
364 364
     '#size' => 1,
365
-    '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), NULL, 'boinc:account-preferences-computing')
365
+    '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), null, 'boinc:account-preferences-computing')
366 366
   );
367 367
   $form['prefs']['advanced']['storage']['disk_interval'] = array(
368
-    '#title' => bts('Request tasks to checkpoint at most every', array(), NULL, 'boinc:account-preferences-computing'),
368
+    '#title' => bts('Request tasks to checkpoint at most every', array(), null, 'boinc:account-preferences-computing'),
369 369
     '#type' => 'textfield',
370
-    '#field_suffix' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
370
+    '#field_suffix' => bts('seconds', array(), null, 'boinc:unit-of-time'),
371 371
     '#default_value' => $default['disk_interval'],
372 372
     '#size' => 1,
373
-    '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), NULL, 'boinc:account-preferences-computing')
373
+    '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), null, 'boinc:account-preferences-computing')
374 374
   );
375 375
   $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
376
-    '#title' => bts('Page/swap file: use at most', array(), NULL, 'boinc:account-preferences-computing'),
376
+    '#title' => bts('Page/swap file: use at most', array(), null, 'boinc:account-preferences-computing'),
377 377
     '#type' => 'textfield',
378
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
378
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
379 379
     '#default_value' => $default['vm_max_used_pct'],
380 380
     '#size' => 1,
381
-    '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), NULL, 'boinc:account-preferences-computing')
381
+    '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), null, 'boinc:account-preferences-computing')
382 382
   );
383 383
   $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
384
-    '#title' => bts('Memory: when computer is in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
384
+    '#title' => bts('Memory: when computer is in use, use at most', array(), null, 'boinc:account-preferences-computing'),
385 385
     '#type' => 'textfield',
386
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
386
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
387 387
     '#default_value' => $default['ram_max_used_busy_pct'],
388 388
     '#size' => 1,
389
-    '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing')
389
+    '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), null, 'boinc:account-preferences-computing')
390 390
   );
391 391
   $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
392
-    '#title' => bts('Memory: when computer is not in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
392
+    '#title' => bts('Memory: when computer is not in use, use at most', array(), null, 'boinc:account-preferences-computing'),
393 393
     '#type' => 'textfield',
394
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
394
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
395 395
     '#default_value' => $default['ram_max_used_idle_pct'],
396 396
     '#size' => 1,
397
-    '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), NULL, 'boinc:account-preferences-computing')
397
+    '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), null, 'boinc:account-preferences-computing')
398 398
   );
399 399
 
400 400
   // Network preferences
401 401
   $form['prefs']['advanced']['network'] = array(
402
-    '#title' => bts('Network usage', array(), NULL, 'boinc:account-preferences-computing'),
402
+    '#title' => bts('Network usage', array(), null, 'boinc:account-preferences-computing'),
403 403
     '#type' => 'fieldset',
404 404
     '#description' => '',
405
-    '#collapsible' => FALSE,
406
-    '#collapsed' => FALSE
405
+    '#collapsible' => false,
406
+    '#collapsed' => false
407 407
   );
408 408
   $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
409
-    '#title' => bts('Store at least', array(), NULL, 'boinc:account-preferences-computing'),
409
+    '#title' => bts('Store at least', array(), null, 'boinc:account-preferences-computing'),
410 410
     '#type' => 'textfield',
411
-    '#field_suffix' => bts('days of work', array(), NULL, 'boinc:account-preferences-computing'),
411
+    '#field_suffix' => bts('days of work', array(), null, 'boinc:account-preferences-computing'),
412 412
     '#default_value' => $default['work_buf_min_days'],
413 413
     '#size' => 1,
414
-    '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), NULL, 'boinc:account-preferences-computing')
414
+    '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), null, 'boinc:account-preferences-computing')
415 415
   );
416 416
   $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
417
-    '#title' => bts('Store up to an additional', array(), NULL, 'boinc:account-preferences-computing'),
417
+    '#title' => bts('Store up to an additional', array(), null, 'boinc:account-preferences-computing'),
418 418
     '#type' => 'textfield',
419
-    '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
419
+    '#field_suffix' => bts('days', array(), null, 'boinc:unit-of-time'),
420 420
     '#default_value' => $default['work_buf_additional_days'],
421 421
     '#size' => 1,
422
-    '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), NULL, 'boinc:account-preferences-computing')
422
+    '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), null, 'boinc:account-preferences-computing')
423 423
   );
424 424
   $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
425
-    '#title' => bts('Confirm before connecting to Internet?', array(), NULL, 'boinc:account-preferences-computing'),
425
+    '#title' => bts('Confirm before connecting to Internet?', array(), null, 'boinc:account-preferences-computing'),
426 426
     '#type' => 'radios',
427 427
     '#options' => $form['boolean_options']['#value'],
428 428
     '#attributes' => array('class' => 'fancy'),
429 429
     '#default_value' => $default['confirm_before_connecting'],
430
-    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
430
+    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), null, 'boinc:account-preferences-computing')
431 431
   );
432 432
   $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
433
-    '#title' => bts('Disconnect when done?', array(), NULL, 'boinc:account-preferences-computing'),
433
+    '#title' => bts('Disconnect when done?', array(), null, 'boinc:account-preferences-computing'),
434 434
     '#type' => 'radios',
435 435
     '#options' => $form['boolean_options']['#value'],
436 436
     '#attributes' => array('class' => 'fancy'),
437 437
     '#default_value' => $default['hangup_if_dialed'],
438
-    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
438
+    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), null, 'boinc:account-preferences-computing')
439 439
   );
440 440
   $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
441
-    '#title' => bts('Limit download rate to', array(), NULL, 'boinc:account-preferences-computing'),
441
+    '#title' => bts('Limit download rate to', array(), null, 'boinc:account-preferences-computing'),
442 442
     '#type' => 'textfield',
443 443
     '#field_suffix' => 'Kbytes/sec',
444 444
     '#default_value' => $default['max_bytes_sec_down']/1000,
445 445
     '#size' => 1,
446
-    '#description' => bts('Limit the download rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
446
+    '#description' => bts('Limit the download rate of file transfers.', array(), null, 'boinc:account-preferences-computing')
447 447
   );
448 448
   $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
449
-    '#title' => bts('Limit upload rate to', array(), NULL, 'boinc:account-preferences-computing'),
449
+    '#title' => bts('Limit upload rate to', array(), null, 'boinc:account-preferences-computing'),
450 450
     '#type' => 'textfield',
451 451
     '#field_suffix' => 'Kbytes/sec',
452 452
     '#default_value' => $default['max_bytes_sec_up']/1000,
453 453
     '#size' => 1,
454
-    '#description' => bts('Limit the upload rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
454
+    '#description' => bts('Limit the upload rate of file transfers.', array(), null, 'boinc:account-preferences-computing')
455 455
   );
456 456
   $form['prefs']['advanced']['network']['hour_label'] = array(
457
-    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
457
+    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), null, 'boinc:account-preferences-computing') . '</label></div>'
458 458
   );
459 459
   $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     '#default_value' => $default['net_start_hour']
463 463
   );
464 464
   $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
465
+    '#value' => '<span>' . bts('and', array(), null, 'boinc:account-preference') . '</span>'
466 466
   );
467 467
   $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
@@ -470,10 +470,10 @@  discard block
 block discarded – undo
470 470
     '#default_value' => $default['net_end_hour']
471 471
   );
472 472
   $form['prefs']['advanced']['network']['hour_description'] = array(
473
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
473
+    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), null, 'boinc:account-preferences-computing') . '</div></div>'
474 474
   );
475 475
   $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476
-    '#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
476
+    '#title' => bts('Limit usage to', array(), null, 'boinc:account-preferences-computing'),
477 477
     '#type' => 'textfield',
478 478
     '#field_suffix' => 'Mbytes',
479 479
     '#default_value' => $default['daily_xfer_limit_mb'],
@@ -482,18 +482,18 @@  discard block
 block discarded – undo
482 482
   $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
483 483
     '#field_prefix' => 'every',
484 484
     '#type' => 'textfield',
485
-    '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
485
+    '#field_suffix' => bts('days', array(), null, 'boinc:unit-of-time'),
486 486
     '#default_value' => $default['daily_xfer_period_days'],
487 487
     '#size' => 1,
488
-    '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), NULL, 'boinc:account-preferences-computing'),
488
+    '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), null, 'boinc:account-preferences-computing'),
489 489
   );
490 490
   $form['prefs']['advanced']['network']['dont_verify_images'] = array(
491
-    '#title' => bts('Skip data verification for image files?', array(), NULL, 'boinc:account-preferences-computing'),
491
+    '#title' => bts('Skip data verification for image files?', array(), null, 'boinc:account-preferences-computing'),
492 492
     '#type' => 'radios',
493 493
     '#options' => $form['boolean_options']['#value'],
494 494
     '#attributes' => array('class' => 'fancy'),
495 495
     '#default_value' => $default['dont_verify_images'],
496
-    '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), NULL, 'boinc:account-preferences-computing')
496
+    '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), null, 'boinc:account-preferences-computing')
497 497
   );
498 498
 
499 499
   // The "fancy radios" are made via javascript on document load. In order for
@@ -526,27 +526,27 @@  discard block
 block discarded – undo
526 526
   $form['prefs']['submit'] = array(
527 527
     '#prefix' => '<li class="first tab">',
528 528
     '#type' => 'submit',
529
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
529
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
530 530
     '#suffix' => '</li>'
531 531
   );
532 532
   $form['prefs']['form control tabs'] = array(
533
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
533
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
534 534
   );
535
-  if ($venue AND $venue != 'generic') {
535
+  if ($venue and $venue != 'generic') {
536 536
     global $base_path;
537 537
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
538
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
538
+      l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540 540
           'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541 541
           'attributes' => array(
542 542
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
543
+              array('@name' => $venue), null, 'boinc:account-preferences') . '\')'
544 544
           )
545 545
         )
546 546
       ) . '</li>';
547 547
   }
548 548
   $form['prefs']['view control'] = array(
549
-    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
549
+    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
550 550
   );
551 551
   $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
@@ -567,33 +567,33 @@  discard block
 block discarded – undo
567 567
   // Verify all non-boolean user input values and notify form API of failures
568 568
 
569 569
   // Processing preferences
570
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
570
+  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
571
+  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
572
+  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
573
+  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
574
+  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
575
+  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
576
+  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
577
+  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
578 578
 
579 579
   // Storage preferences
580
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
580
+  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
581
+  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
582
+  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
583
+  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
584
+  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
585
+  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
586
+  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
587 587
 
588 588
   // Network preferences
589
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
589
+  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
590
+  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
591
+  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
592
+  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
593
+  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), null, 'boinc:account-prefrences-computing'));
594
+  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
595
+  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
596
+  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
597 597
 }
598 598
 
599 599
 /**
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     unset($prefs['@attributes']['preset']);
654 654
   }
655 655
   // Save the preset selection (or lack thereof)
656
-  if (!$preset OR $preset == 'custom') {
656
+  if (!$preset or $preset == 'custom') {
657 657
     $prefs['preset'] = 'custom';
658 658
   }
659 659
   else {
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
     watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
673 673
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
674 674
   }
675
-  elseif (!drupal_get_messages('status', FALSE)) {
675
+  elseif (!drupal_get_messages('status', false)) {
676 676
     // Show this message if the set wasn't created automatically (in which case
677 677
     // there is a message tailored to that) {
678 678
     drupal_set_message(t('Your preferences have been updated.
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
   ));
707 707
   db_set_active('default');
708 708
   $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
-  $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
709
+  $current_host->is_new = !$current_host->total_credit and !$current_host->task_count;
710 710
   // Get the list of all other hosts owned by this user for comparison
711 711
   db_set_active('boinc_ro');
712 712
   $all_other_hosts = db_query("
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
     // First, disqualify if hosts were active at the same time
723 723
     if (!$current_host->is_new) {
724 724
       $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
-      $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
725
+      $other_host->is_new = !$other_host->total_credit and !$other_host->task_count;
726 726
       if (!$other_host->is_new) {
727 727
         // If both hosts being compared are not new, see if times overlap
728 728
         if (!times_disjoint($current_host, $other_host)) {
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 /**
756 756
  * Perform the database updates to merge the old host into the new host
757 757
  */
758
-function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
758
+function boincwork_host_merge($old_host, $new_host, &$message = null) {
759 759
   // Decay the average credit of the two hosts
760 760
   require_boinc('credit');
761 761
   $now = time();
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
       WATCHDOG_WARNING
782 782
     );
783 783
     $message = 'Could not merge due to a circular merge error. The site administrators have been contacted about this issue, and will investigate further.';
784
-    return FALSE;
784
+    return false;
785 785
   }
786 786
 
787 787
   if ($new_host->userid==0) {
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
       WATCHDOG_WARNING
796 796
     );
797 797
     $message = 'Could not merge because the target host has userid=0. The site administrators have been contacted about this issue, and will investigate further.';
798
-    return FALSE;
798
+    return false;
799 799
   }
800 800
 
801 801
   // Move credit from the old host to the new host
@@ -811,10 +811,10 @@  discard block
 block discarded – undo
811 811
   );
812 812
   db_set_active('default');
813 813
   if (!$credit_updated) {
814
-    if ($message !== NULL) {
815
-      $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
814
+    if ($message !== null) {
815
+      $message = bts('Could not update credit', array(), null, 'boinc:account-host-merge');
816 816
     }
817
-    return FALSE;
817
+    return false;
818 818
   }
819 819
 
820 820
   // Move results from the old host to the new host
@@ -827,10 +827,10 @@  discard block
 block discarded – undo
827 827
   );
828 828
   db_set_active('default');
829 829
   if (!$results_updated) {
830
-    if ($message !== NULL) {
831
-      $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
830
+    if ($message !== null) {
831
+      $message = bts('Could not update results', array(), null, 'boinc:account-host-merge');
832 832
     }
833
-    return FALSE;
833
+    return false;
834 834
   }
835 835
 
836 836
   // Retire the old host
@@ -847,13 +847,13 @@  discard block
 block discarded – undo
847 847
   );
848 848
   db_set_active('default');
849 849
   if (!$old_host_retired) {
850
-    if ($message !== NULL) {
851
-      $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
850
+    if ($message !== null) {
851
+      $message = bts('Could not retire old computer', array(), null, 'boinc:account-host-merge');
852 852
     }
853
-    return FALSE;
853
+    return false;
854 854
   }
855 855
 
856
-  return TRUE;
856
+  return true;
857 857
 }
858 858
 
859 859
 /**
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
   $form['overview'] = array(
883 883
     '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
884 884
       . ' the same computer by mistake. You can correct this by merging old'
885
-      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
885
+      . ' identities with the newest one.', array(), null, 'boinc:account-host-merge') . '</p>'
886 886
       . '<p>'
887 887
       . bts('Check the computers that are the same as @name'
888 888
       . ' (created on @date at @time with computer ID @id)',
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
           '@time' => date('G:i:s T', $current_host->create_time),
893 893
           '@id' => $current_host->id,
894 894
         ),
895
-        NULL, 'boinc:account-host-merge') . '</p>',
895
+        null, 'boinc:account-host-merge') . '</p>',
896 896
   );
897 897
 
898 898
   $options = array();
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
   $form['merge'] = array(
908 908
     '#title' => '',
909 909
     '#type' => 'tableselect',
910
-    '#header' => array(bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), NULL, 'boinc:host-details'), bts('Computer ID', array(), NULL, 'boinc:host-list')),
910
+    '#header' => array(bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), null, 'boinc:host-details'), bts('Computer ID', array(), null, 'boinc:host-list')),
911 911
     '#options' => $options,
912 912
   );
913 913
 
@@ -922,11 +922,11 @@  discard block
 block discarded – undo
922 922
   $form['prefs']['submit'] = array(
923 923
     '#prefix' => '<li class="first tab">',
924 924
     '#type' => 'submit',
925
-    '#value' => bts('Merge', array(), NULL, 'boinc:form-merge'),
925
+    '#value' => bts('Merge', array(), null, 'boinc:form-merge'),
926 926
     '#suffix' => '</li>'
927 927
   );
928 928
   $form['prefs']['form control tabs'] = array(
929
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
929
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
930 930
   );
931 931
 
932 932
   return $form;
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
   if ($merged) {
965 965
     // Generate a natural language list of IDs that were merged
966 966
     $oxford_comma = ',';
967
-    $conjunction = bts('and', array(), NULL, 'boinc:account-preference');
967
+    $conjunction = bts('and', array(), null, 'boinc:account-preference');
968 968
     $list = array_keys($merged);
969 969
     $last = array_pop($list);
970 970
     if ($list) {
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
           '@old_id' => $list,
984 984
           '@id' => $current_host_id
985 985
         ),
986
-        NULL, 'boinc:account-host-merge'));
986
+        null, 'boinc:account-host-merge'));
987 987
     }
988 988
     else {
989 989
       drupal_set_message(bts(
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
           '@old_ids' => $list,
993 993
           '@id' => $current_host_id
994 994
         ),
995
-        NULL, 'boinc:account-host-merge'));
995
+        null, 'boinc:account-host-merge'));
996 996
     }
997 997
   }
998 998
 
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
             '@old_id' => $id,
1006 1006
             '@message' => $error,
1007 1007
           ),
1008
-          NULL, 'boinc:account-host-merge'),
1008
+          null, 'boinc:account-host-merge'),
1009 1009
         'warning'
1010 1010
       );
1011 1011
     }
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
   global $user;
1027 1027
   $account = user_load($user->uid);
1028 1028
 
1029
-  $established = TRUE;
1029
+  $established = true;
1030 1030
 
1031 1031
   // Get availability of special BOINC preferences
1032 1032
   require_boinc(array('app_types'));
@@ -1037,26 +1037,26 @@  discard block
 block discarded – undo
1037 1037
 
1038 1038
   // Take note if this is not an established preference set on the account
1039 1039
   if (isset($prefs['@attributes']['cleared'])) {
1040
-    $established = FALSE;
1040
+    $established = false;
1041 1041
   }
1042 1042
 
1043 1043
   // Extract modified tag if present
1044
-  $modified = NULL;
1044
+  $modified = null;
1045 1045
   if (isset($prefs['modified']['@value'])) {
1046 1046
     $modified = $prefs['modified']['@value'];
1047 1047
   }
1048 1048
 
1049
-  $venue_is_default = FALSE;
1049
+  $venue_is_default = false;
1050 1050
   if ($account->boincuser_default_pref_set) {
1051 1051
     if ($account->boincuser_default_pref_set == $venue) {
1052
-      $venue_is_default = TRUE;
1052
+      $venue_is_default = true;
1053 1053
     }
1054 1054
   }
1055
-  elseif (!$venue OR $venue == 'generic') {
1056
-    $venue_is_default = TRUE;
1055
+  elseif (!$venue or $venue == 'generic') {
1056
+    $venue_is_default = true;
1057 1057
   }
1058 1058
   else {
1059
-    $venue_is_default = FALSE;
1059
+    $venue_is_default = false;
1060 1060
   }
1061 1061
 
1062 1062
   // Define form defaults
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
   // Standard option sets
1087 1087
   $form['boolean_options'] = array(
1088 1088
     '#type' => 'value',
1089
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1089
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1090 1090
   );
1091 1091
 
1092 1092
   // Identify preference sets that are established to distinguish what has been
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
   $form['#established'] = $established;
1095 1095
 
1096 1096
   // Top level form options
1097
-  $form['#tree'] = TRUE;
1097
+  $form['#tree'] = true;
1098 1098
 
1099 1099
   // Hidden elements
1100 1100
   $form['modified'] = array(
@@ -1112,87 +1112,87 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
   // Common project preferences
1114 1114
   $form['resource'] = array(
1115
-    '#title' => bts('Resource settings', array(), NULL, 'boinc:account-preferences-project'),
1115
+    '#title' => bts('Resource settings', array(), null, 'boinc:account-preferences-project'),
1116 1116
     '#type' => 'fieldset',
1117 1117
     '#description' => null,
1118
-    '#collapsible' => TRUE,
1119
-    '#collapsed' => FALSE
1118
+    '#collapsible' => true,
1119
+    '#collapsed' => false
1120 1120
   );
1121 1121
   $form['resource']['resource_share'] = array(
1122
-    '#title' => bts('Resource share', array(), NULL, 'boinc:account-preferences-project'),
1122
+    '#title' => bts('Resource share', array(), null, 'boinc:account-preferences-project'),
1123 1123
     '#type' => 'textfield',
1124 1124
     '#default_value' => $default['resource_share'],
1125 1125
     '#size' => 5,
1126
-    '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), NULL, 'boinc:account-preferences-project')
1126
+    '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), null, 'boinc:account-preferences-project')
1127 1127
   );
1128 1128
   if ($app_types->count > 1) {
1129 1129
     if ($app_types->cpu) {
1130 1130
       $form['resource']['no_cpu'] = array(
1131
-        '#title' => bts('Use CPU', array(), NULL, 'boinc:account-preferences-project'),
1131
+        '#title' => bts('Use CPU', array(), null, 'boinc:account-preferences-project'),
1132 1132
         '#type' => 'radios',
1133 1133
         '#options' => $form['boolean_options']['#value'],
1134 1134
         '#attributes' => array('class' => 'fancy'),
1135 1135
         '#default_value' => $default['no_cpu'] ? 0 : 1,
1136
-        '#description' => bts('Request CPU-only tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1136
+        '#description' => bts('Request CPU-only tasks from this project.', array(), null, 'boinc:account-preferences-project')
1137 1137
       );
1138 1138
     }
1139 1139
     if ($app_types->cuda) {
1140 1140
       $form['resource']['no_cuda'] = array(
1141
-        '#title' => bts('Use NVIDIA GPU', array(), NULL, 'boinc:account-preferences-project'),
1141
+        '#title' => bts('Use NVIDIA GPU', array(), null, 'boinc:account-preferences-project'),
1142 1142
         '#type' => 'radios',
1143 1143
         '#options' => $form['boolean_options']['#value'],
1144 1144
         '#attributes' => array('class' => 'fancy'),
1145 1145
         '#default_value' => $default['no_cuda'] ? 0 : 1,
1146
-        '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1146
+        '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1147 1147
       );
1148 1148
     }
1149 1149
     if ($app_types->ati) {
1150 1150
       $form['resource']['no_ati'] = array(
1151
-        '#title' => bts('Use AMD GPU', array(), NULL, 'boinc:account-preferences-project'),
1151
+        '#title' => bts('Use AMD GPU', array(), null, 'boinc:account-preferences-project'),
1152 1152
         '#type' => 'radios',
1153 1153
         '#options' => $form['boolean_options']['#value'],
1154 1154
         '#attributes' => array('class' => 'fancy'),
1155 1155
         '#default_value' => $default['no_ati'] ? 0 : 1,
1156
-        '#description' => bts('Request AMD GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1156
+        '#description' => bts('Request AMD GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1157 1157
       );
1158 1158
     }
1159 1159
     if ($app_types->intel_gpu) {
1160 1160
       $form['resource']['no_intel_gpu'] = array(
1161
-        '#title' => bts('Use INTEL GPU', array(), NULL, 'boinc:account-preferences-project'),
1161
+        '#title' => bts('Use INTEL GPU', array(), null, 'boinc:account-preferences-project'),
1162 1162
         '#type' => 'radios',
1163 1163
         '#options' => $form['boolean_options']['#value'],
1164 1164
         '#attributes' => array('class' => 'fancy'),
1165 1165
         '#default_value' => $default['no_intel_gpu'] ? 0 : 1,
1166
-        '#description' => bts('Request Intel GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1166
+        '#description' => bts('Request Intel GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1167 1167
       );
1168 1168
     }
1169 1169
     if ($app_types->apple_gpu) {
1170 1170
       $form['resource']['no_apple_gpu'] = array(
1171
-        '#title' => bts('Use Apple GPU', array(), NULL, 'boinc:account-preferences-project'),
1171
+        '#title' => bts('Use Apple GPU', array(), null, 'boinc:account-preferences-project'),
1172 1172
         '#type' => 'radios',
1173 1173
         '#options' => $form['boolean_options']['#value'],
1174 1174
         '#attributes' => array('class' => 'fancy'),
1175 1175
         '#default_value' => $default['no_apple_gpu'] ? 0 : 1,
1176
-        '#description' => bts('Request Apple GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1176
+        '#description' => bts('Request Apple GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1177 1177
       );
1178 1178
     }
1179 1179
   }
1180 1180
 
1181
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1181
+  if (variable_get('boinc_prefs_options_beta', false)) {
1182 1182
     $form['beta'] = array(
1183
-      '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1183
+      '#title' => bts('Beta settings', array(), null, 'boinc:account-preferences-project'),
1184 1184
       '#type' => 'fieldset',
1185 1185
       '#description' => null,
1186
-      '#collapsible' => TRUE,
1187
-      '#collapsed' => FALSE
1186
+      '#collapsible' => true,
1187
+      '#collapsed' => false
1188 1188
     );
1189 1189
     $form['beta']['allow_beta_work'] = array(
1190
-      '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1190
+      '#title' => bts('Run test applications?', array(), null, 'boinc:account-preferences-project'),
1191 1191
       '#type' => 'radios',
1192 1192
       '#options' => $form['boolean_options']['#value'],
1193 1193
       '#attributes' => array('class' => 'fancy'),
1194 1194
       '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
-      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1195
+      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), null, 'boinc:account-preferences-project')
1196 1196
     );
1197 1197
   }
1198 1198
 
@@ -1201,14 +1201,14 @@  discard block
 block discarded – undo
1201 1201
 
1202 1202
   // Set whether to use this preference set by default for new computers
1203 1203
   $form['default_set'] = array(
1204
-    '#title' => bts('Default set', array(), NULL, 'boinc:account-preferences-project'),
1204
+    '#title' => bts('Default set', array(), null, 'boinc:account-preferences-project'),
1205 1205
     '#type' => 'fieldset',
1206 1206
     '#description' => null,
1207
-    '#collapsible' => TRUE,
1208
-    '#collapsed' => FALSE
1207
+    '#collapsible' => true,
1208
+    '#collapsed' => false
1209 1209
   );
1210 1210
   $form['default_set']['default_venue'] = array(
1211
-    '#title' => bts('Set used for new computers', array(), NULL, 'boinc:account-preferences-project'),
1211
+    '#title' => bts('Set used for new computers', array(), null, 'boinc:account-preferences-project'),
1212 1212
     '#type' => 'radios',
1213 1213
     '#options' => $form['boolean_options']['#value'],
1214 1214
     '#attributes' => array('class' => 'fancy'),
@@ -1227,27 +1227,27 @@  discard block
 block discarded – undo
1227 1227
   $form['prefs']['submit'] = array(
1228 1228
     '#prefix' => '<li class="first tab">',
1229 1229
     '#type' => 'submit',
1230
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1230
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1231 1231
     '#suffix' => '</li>'
1232 1232
   );
1233 1233
   $form['prefs']['form control tabs'] = array(
1234
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1234
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1235 1235
   );
1236
-  if ($venue AND $venue != 'generic') {
1236
+  if ($venue and $venue != 'generic') {
1237 1237
     global $base_path;
1238 1238
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
1239
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1239
+      l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1240 1240
         array(
1241 1241
           'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242 1242
           'attributes' => array(
1243 1243
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1244
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1244
+              array('@name' => $venue), null, 'boinc:account-preferences') . '\')'
1245 1245
           )
1246 1246
         )
1247 1247
       ) . '</li>';
1248 1248
   }
1249 1249
   $form['prefs']['view control'] = array(
1250
-      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1250
+      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251 1251
   );
1252 1252
   $form['prefs']['form control tabs suffix'] = array(
1253 1253
     '#value' => '</ul>'
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
   $ordered_array = array();
1268 1268
   $unordered_array = array();
1269 1269
   foreach ($xml['project_specific_preferences'] as $type => $element) {
1270
-    if (is_array($element) AND is_numeric(key($element))) {
1270
+    if (is_array($element) and is_numeric(key($element))) {
1271 1271
       foreach ($element as $ordered_element) {
1272 1272
         if (isset($ordered_element['@position'])) {
1273 1273
           $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
   // Check for app validation
1320 1320
   if (isset($validation_rules['apps'])) {
1321 1321
     if (isset($validation_rules['apps']['minimum selected'])
1322
-        AND $validation_rules['apps']['minimum selected'] > 0) {
1322
+        and $validation_rules['apps']['minimum selected'] > 0) {
1323 1323
       $apps_selected = 0;
1324 1324
       foreach ($validation_rules['apps']['list'] as $app) {
1325 1325
         if ($form_state['values']['applications'][$app]) $apps_selected++;
@@ -1327,14 +1327,14 @@  discard block
 block discarded – undo
1327 1327
       if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1328 1328
         form_set_error(
1329 1329
           'applications',
1330
-          bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1330
+          bts('At least one application must be selected', array(), null, 'boinc:account-preferences-project')
1331 1331
         );
1332 1332
       }
1333 1333
       if ($apps_selected == count($validation_rules['apps']['list'])) {
1334 1334
         foreach ($validation_rules['apps']['list'] as $app) {
1335 1335
           unset($form_state['values']['applications'][$app]);
1336 1336
         }
1337
-        $form_state['storage']['all apps selected'] = TRUE;
1337
+        $form_state['storage']['all apps selected'] = true;
1338 1338
       }
1339 1339
     }
1340 1340
   }
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
   }
1369 1369
 
1370 1370
   // Beta preferences
1371
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1371
+  if (variable_get('boinc_prefs_options_beta', false)) {
1372 1372
     $prefs['allow_beta_work'] = ($edit['beta']['allow_beta_work']) ? 1 : 0;
1373 1373
   }
1374 1374
 
@@ -1406,7 +1406,7 @@  discard block
 block discarded – undo
1406 1406
     watchdog('boincwork', 'Error updating project prefs for user @id: @message', array('@id' => $user->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
1407 1407
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
1408 1408
   }
1409
-  elseif (!drupal_get_messages('status', FALSE)) {
1409
+  elseif (!drupal_get_messages('status', false)) {
1410 1410
     // Show this message if the set wasn't created automatically (in which case
1411 1411
     // there is a message tailored to that)
1412 1412
     drupal_set_message(t('Your preferences have been updated.
@@ -1441,31 +1441,31 @@  discard block
 block discarded – undo
1441 1441
   // Standard option sets
1442 1442
   $form['boolean_options'] = array(
1443 1443
     '#type' => 'value',
1444
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1444
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1445 1445
   );
1446 1446
 
1447 1447
   $default = array(
1448 1448
     'pm_send_notification' => '', // This is set already in pm_email_notify_user
1449 1449
     'friend_notification' => isset($account->friend_notification) ? $account->friend_notification : 0,
1450
-    'comments_per_page' => (isset($account->comments_per_page) AND $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451
-    'comments_order' => (isset($account->sort) AND $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1450
+    'comments_per_page' => (isset($account->comments_per_page) and $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451
+    'comments_order' => (isset($account->sort) and $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1452 1452
   );
1453 1453
 
1454 1454
   // General options
1455 1455
   $form['general'] = array(
1456 1456
     '#type' => 'fieldset',
1457
-    '#title' => bts('General settings', array(), NULL, 'boinc:account-preferences-community'),
1457
+    '#title' => bts('General settings', array(), null, 'boinc:account-preferences-community'),
1458 1458
     '#weight' => 0,
1459
-    '#collapsible' => TRUE,
1460
-    '#collapsed' => FALSE
1459
+    '#collapsible' => true,
1460
+    '#collapsed' => false
1461 1461
   );
1462 1462
   // Add the BOINC user name (non-unique, user editable)
1463 1463
   $form['general']['boincuser_name'] = array(
1464 1464
     '#type' => 'textfield',
1465
-    '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1465
+    '#title' => bts('Name', array(), null, 'boinc:user-or-team-name'),
1466 1466
     '#default_value' => $account->boincuser_name,
1467 1467
     '#maxlength' => USERNAME_MAX_LENGTH,
1468
-    '#required' => TRUE,
1468
+    '#required' => true,
1469 1469
     '#description' => '',
1470 1470
     '#size' => 40
1471 1471
   );
@@ -1474,8 +1474,8 @@  discard block
 block discarded – undo
1474 1474
     $zones = _system_zonelist();
1475 1475
     $form['general']['timezone'] = array(
1476 1476
       '#type' => 'select',
1477
-      '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
-      '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1477
+      '#title' => bts('Time zone', array(), null, 'boinc:account-preferences-community'),
1478
+      '#default_value' => ($account->timezone !== null) ? $account->timezone : variable_get('date_default_timezone', 0),
1479 1479
       '#options' => $zones,
1480 1480
       '#description' => '',
1481 1481
     );
@@ -1484,10 +1484,10 @@  discard block
 block discarded – undo
1484 1484
   // Notification options
1485 1485
   $form['notifications'] = array(
1486 1486
     '#type' => 'fieldset',
1487
-    '#title' => bts('Notification settings', array(), NULL, 'boinc:account-preferences-community'),
1487
+    '#title' => bts('Notification settings', array(), null, 'boinc:account-preferences-community'),
1488 1488
     '#weight' => 5,
1489
-    '#collapsible' => TRUE,
1490
-    '#collapsed' => FALSE
1489
+    '#collapsible' => true,
1490
+    '#collapsed' => false
1491 1491
   );
1492 1492
   // Pull in private message notification handling and tweak the form
1493 1493
   $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
     $pm_notify['enable_pm_mail']['pm_send_notifications'],
1496 1496
     array(
1497 1497
       '#type' => 'radios',
1498
-      '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1498
+      '#title' => bts('Receive email notification for private messages?', array(), null, 'boinc:account-preferences-community'),
1499 1499
       '#description' => ' ',
1500 1500
       '#options' => $form['boolean_options']['#value'],
1501 1501
       '#attributes' => array('class' => 'fancy')
@@ -1503,9 +1503,9 @@  discard block
 block discarded – undo
1503 1503
   );
1504 1504
   $form['notifications']['friend_notification'] = array(
1505 1505
     '#type' => 'radios',
1506
-    '#title' => bts('Receive email notification for friend requests?', array(), NULL, 'boinc:account-preferences-community'),
1506
+    '#title' => bts('Receive email notification for friend requests?', array(), null, 'boinc:account-preferences-community'),
1507 1507
     '#description' => ' ',
1508
-    '#options' => array(0 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1508
+    '#options' => array(0 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1509 1509
     '#attributes' => array('class' => 'fancy'),
1510 1510
     '#default_value' => $default['friend_notification']
1511 1511
   );
@@ -1521,10 +1521,10 @@  discard block
 block discarded – undo
1521 1521
     }
1522 1522
     $form['locale'] = array(
1523 1523
       '#type' => 'fieldset',
1524
-      '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1524
+      '#title' => bts('Language settings', array(), null, 'boinc:account-preferences-community'),
1525 1525
       '#weight' => 10,
1526
-      '#collapsible' => TRUE,
1527
-      '#collapsed' => FALSE,
1526
+      '#collapsible' => true,
1527
+      '#collapsed' => false,
1528 1528
     );
1529 1529
 
1530 1530
     // Get language negotiation settings.
@@ -1532,30 +1532,30 @@  discard block
 block discarded – undo
1532 1532
     $user_preferred_language = user_preferred_language($account);
1533 1533
     $form['locale']['language'] = array(
1534 1534
       '#type' => 'select',
1535
-      '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1535
+      '#title' => bts('Language', array(), null, 'boinc:account-preferences-community'),
1536 1536
       '#default_value' => check_plain($user_preferred_language->language),
1537 1537
       '#options' => $names,
1538
-      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1538
+      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), null, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), null, 'boinc:account-preferences-community'),
1539 1539
     );
1540 1540
   }
1541 1541
 
1542 1542
   // Avatar options
1543 1543
   $form['gravatar'] = array(
1544 1544
     '#type' => 'item',
1545
-    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1546
-    '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), NULL, 'boinc:account-preferences-community'),
1545
+    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), null, 'boinc:account-preferences-community'),
1546
+    '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), null, 'boinc:account-preferences-community'),
1547 1547
   );
1548 1548
   if (user_access('disable own gravatar', $account)) {
1549 1549
     $form['gravatar'] = array(
1550 1550
       '#type' => 'checkbox',
1551
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
-      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1551
+      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), null, 'boinc:account-preferences-community'),
1552
+      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), null, 'boinc:account-preferences-community'),
1553 1553
       '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554 1554
       '#disabled' => !empty($account->picture),
1555 1555
     );
1556 1556
   }
1557 1557
   $form['gravatar']['#weight'] = 15;
1558
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1558
+  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), null, 'boinc:account-preferences-community') . '</a></legend>';
1559 1559
   // Upload an avatar (pulled from profile_node_form):
1560 1560
   if (!empty($profile_form['field_image'])) {
1561 1561
     $form['field_image'] = $profile_form['field_image'];
@@ -1564,46 +1564,46 @@  discard block
 block discarded – undo
1564 1564
     $form['field_image'] = array(
1565 1565
       '#value' => '<div class="form-item">'
1566 1566
         . '<label class="placeholder">'
1567
-        . bts('This is not available until your profile is set up.', array(), NULL, 'boinc:account-preferences-community')
1567
+        . bts('This is not available until your profile is set up.', array(), null, 'boinc:account-preferences-community')
1568 1568
         . '</label>'
1569
-        . l(bts('Create a profile', array(), NULL, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1569
+        . l(bts('Create a profile', array(), null, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1570 1570
         . '</div>',
1571 1571
     );
1572 1572
   }
1573
-  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1573
+  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), null, 'boinc:account-preferences-community');
1574 1574
   $form['field_image']['#weight'] = 20;
1575 1575
   $form['field_image']['#suffix'] = '</fieldset>';
1576 1576
 
1577 1577
   // Forum options
1578 1578
   $form['forums'] = array(
1579 1579
     '#type' => 'fieldset',
1580
-    '#title' => bts('Forum settings', array(), NULL, 'boinc:account-preferences-community'),
1580
+    '#title' => bts('Forum settings', array(), null, 'boinc:account-preferences-community'),
1581 1581
     '#weight' => 25,
1582
-    '#collapsible' => TRUE,
1583
-    '#collapsed' => FALSE
1582
+    '#collapsible' => true,
1583
+    '#collapsed' => false
1584 1584
   );
1585 1585
   $form['forums']['comments_per_page'] = array(
1586 1586
     '#type' => 'select',
1587
-    '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), NULL, 'boinc:account-preferences-community'),
1587
+    '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), null, 'boinc:account-preferences-community'),
1588 1588
     '#options' => array(10 => 10, 20 => 20, 30 => 30, 50 => 50, 100 => 100),
1589 1589
     '#default_value' => $default['comments_per_page']
1590 1590
   );
1591 1591
   // Can't have a typical Drupal form suffix on a select box?
1592 1592
   $form['forums']['comments_per_page_suffix'] = array(
1593
-    '#value' => '<span>' . bts('comments per page', array(), NULL, 'boinc:account-preferences-community') . '</span>'
1593
+    '#value' => '<span>' . bts('comments per page', array(), null, 'boinc:account-preferences-community') . '</span>'
1594 1594
   );
1595 1595
   $form['forums']['comments_order'] = array(
1596 1596
     '#type' => 'select',
1597
-    '#title' => bts('Sort comments in discussions', array(), NULL, 'boinc:account-preferences-community'),
1598
-    '#options' => array(1 => bts('Newest post first', array(), NULL, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), NULL, 'boinc:account-preferences-community')),
1597
+    '#title' => bts('Sort comments in discussions', array(), null, 'boinc:account-preferences-community'),
1598
+    '#options' => array(1 => bts('Newest post first', array(), null, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), null, 'boinc:account-preferences-community')),
1599 1599
     '#default_value' => $default['comments_order']
1600 1600
   );
1601 1601
   // Signature (pulled from user_edit_form):
1602 1602
   if (variable_get('user_signatures', 0) && module_exists('comment')) {
1603 1603
     $form['forums']['signature'] = array(
1604 1604
       '#type' => 'textarea',
1605
-      '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
-      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1605
+      '#title' => bts('Signature', array(), null, 'boinc:account-preferences-community'),
1606
+      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), null, 'boinc:account-preferences-community'),
1607 1607
       '#default_value' => $account->signature
1608 1608
       );
1609 1609
     // Prevent a "validation error" message when the user attempts to save with a default value they
@@ -1612,11 +1612,11 @@  discard block
 block discarded – undo
1612 1612
       drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613 1613
       $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1614 1614
     }
1615
-    $form['forums']['signature_format'] = filter_form($account->signature_format, NULL, array('signature_format'));
1615
+    $form['forums']['signature_format'] = filter_form($account->signature_format, null, array('signature_format'));
1616 1616
     // Optionally hide signatures from comments
1617 1617
     $form['forums']['hide_signatures'] = array(
1618 1618
       '#type' => 'radios',
1619
-      '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1619
+      '#title' => bts('Hide signatures in forums', array(), null, 'boinc:account-preferences-community'),
1620 1620
       '#description' => ' ',
1621 1621
       '#options' => $form['boolean_options']['#value'],
1622 1622
       '#attributes' => array('class' => 'fancy'),
@@ -1638,12 +1638,12 @@  discard block
 block discarded – undo
1638 1638
   $form['submit'] = array(
1639 1639
     '#prefix' => '<li class="first tab">',
1640 1640
     '#type' => 'submit',
1641
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1641
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1642 1642
     '#suffix' => '</li>',
1643 1643
     '#weight' => 1002,
1644 1644
   );
1645 1645
   $form['form control tabs'] = array(
1646
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1646
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1647 1647
     '#weight' => 1003,
1648 1648
   );
1649 1649
   $form['form control tabs suffix'] = array(
@@ -1673,7 +1673,7 @@  discard block
 block discarded – undo
1673 1673
       form_set_error('boincuser_name',
1674 1674
         bts('You may not use username @blname, as that name is not allowed. Please choose another name.',
1675 1675
             array('@blname' => $edit['boincuser_name']),
1676
-            NULL, 'boinc:account-preferences-community'));
1676
+            null, 'boinc:account-preferences-community'));
1677 1677
       return false;
1678 1678
     }
1679 1679
   }
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
     $profile_node->field_image = $edit['field_image'];
1710 1710
     node_save($profile_node);
1711 1711
     // Flush this from the node cache or changes won't show up immediately!
1712
-    $profile_node = node_load($profile_node->nid, NULL, TRUE);
1712
+    $profile_node = node_load($profile_node->nid, null, true);
1713 1713
   }
1714 1714
 
1715 1715
   // All other settings
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
   }
1739 1739
   user_save($user, $settings);
1740 1740
 
1741
-  drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1741
+  drupal_set_message(bts('Your community preferences have been updated.', array(), null, 'boinc:account-preferences-community'));
1742 1742
 
1743 1743
   // Form will not redirect if storage is set; not good if language changes
1744 1744
   unset($form_state['storage']);
@@ -1772,26 +1772,26 @@  discard block
 block discarded – undo
1772 1772
   // Standard option sets
1773 1773
   $form['boolean_options'] = array(
1774 1774
     '#type' => 'value',
1775
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1775
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1776 1776
   );
1777 1777
 
1778 1778
   $form['privacy'] = array(
1779
-    '#title' => bts('Privacy settings', array(), NULL, 'boinc:account-preferences-privacy'),
1779
+    '#title' => bts('Privacy settings', array(), null, 'boinc:account-preferences-privacy'),
1780 1780
     '#type' => 'fieldset',
1781 1781
     '#description' => null,
1782
-    '#collapsible' => TRUE,
1783
-    '#collapsed' => FALSE
1782
+    '#collapsible' => true,
1783
+    '#collapsed' => false
1784 1784
   );
1785 1785
   $form['privacy']['send_email'] = array(
1786
-    '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1786
+    '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:account-preferences-privacy'),
1787 1787
     '#type' => 'radios',
1788 1788
     '#options' => $form['boolean_options']['#value'],
1789 1789
     '#attributes' => array('class' => 'fancy'),
1790 1790
     '#default_value' => $default['privacy']['send_email']
1791 1791
   );
1792 1792
   $form['privacy']['show_hosts'] = array(
1793
-    '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1794
-    '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), NULL, 'boinc:account-preferences-privacy'),
1793
+    '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:account-preferences-privacy'),
1794
+    '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), null, 'boinc:account-preferences-privacy'),
1795 1795
     '#type' => 'radios',
1796 1796
     '#options' => $form['boolean_options']['#value'],
1797 1797
     '#attributes' => array('class' => 'fancy'),
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
     // Set name to 'privacyconsent_SHORTNAME', which can be parsed
1807 1807
     // later in the submit function.
1808 1808
     $form['privacy']['privacyconsent_'.$ct['shortname']] = array(
1809
-      '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1809
+      '#title' => bts($ct['description'], array(), null, 'boinc:account-preferences-privacy'),
1810 1810
       '#type' => 'radios',
1811 1811
       '#options' => $form['boolean_options']['#value'],
1812 1812
       '#attributes' => array('class' => 'fancy'),
@@ -1820,28 +1820,28 @@  discard block
 block discarded – undo
1820 1820
       $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821 1821
       array(
1822 1822
         '!privacy_policy_link' => l(
1823
-          bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1823
+          bts('privacy policy', array(), null, 'boinc:account-preferences-privacy'),
1824 1824
           '/privacy'
1825 1825
         )
1826 1826
       ),
1827
-      NULL, 'boinc:account-preferences-privacy');
1827
+      null, 'boinc:account-preferences-privacy');
1828 1828
     }
1829 1829
   }
1830 1830
 
1831 1831
   // Ignore and block users
1832 1832
   if (module_exists('ignore_user')) {
1833 1833
     $form['ignoreblock'] = array(
1834
-      '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1834
+      '#title' => bts('Ignore Users', array(), null, 'boinc:account-preferences-privacy'),
1835 1835
       '#type' => 'fieldset',
1836
-      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
-      '#collapsible' => TRUE,
1838
-      '#collapsed' => FALSE
1836
+      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), null, 'boinc:ignore-user-help'),
1837
+      '#collapsible' => true,
1838
+      '#collapsed' => false
1839 1839
     );
1840 1840
 
1841 1841
     // Table for ignored users
1842 1842
     $form['ignoreblock']['current_ignore_section'] = array(
1843 1843
       '#type' => 'item',
1844
-      '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1844
+      '#value' => bts('Current users on your Ignore List', array(), null, 'boinc:ignore-user-list'),
1845 1845
       '#prefix' => '<h4>',
1846 1846
       '#suffix' => '</h4>',
1847 1847
       '#weight' => -20,
@@ -1854,18 +1854,18 @@  discard block
 block discarded – undo
1854 1854
       );
1855 1855
       $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1856 1856
         '#value' => l(
1857
-          bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1857
+          bts('delete', array(), null, 'boinc:ignore-user-delete-button'),
1858 1858
           'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859 1859
           array()
1860 1860
         ),
1861 1861
       );
1862 1862
     }
1863
-    $form['ignoreblock']['pager'] = array('#value' => theme('pager', NULL, 10, 0));
1863
+    $form['ignoreblock']['pager'] = array('#value' => theme('pager', null, 10, 0));
1864 1864
 
1865 1865
     // Sub-form to add user to ignore list
1866 1866
     $form['ignoreblock']['add_ignore_user_section'] = array(
1867 1867
       '#type' => 'item',
1868
-      '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1868
+      '#value' => bts('Add user to Ignore List', array(), null, 'boinc:ignore-user-add'),
1869 1869
       '#prefix' => '<h4>',
1870 1870
       '#suffix' => '</h4>',
1871 1871
       '#weight' => 10,
@@ -1873,8 +1873,8 @@  discard block
 block discarded – undo
1873 1873
 
1874 1874
     $form['ignoreblock']['addusername_toignorelist'] = array(
1875 1875
       '#type' => 'textfield',
1876
-      '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
-      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1876
+      '#title' => bts('Username', array(), null, 'boinc:ignore-user-searchbox'),
1877
+      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), null, 'boinc:ignore-user-searchbox-help'),
1878 1878
       '#weight' => 11,
1879 1879
       '#size' => 50,
1880 1880
       '#autocomplete_path' => 'boincuser/autocomplete',
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
 
1883 1883
     $form['ignoreblock']['addusername_submit'] = array(
1884 1884
       '#type' => 'submit',
1885
-      '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1885
+      '#value' => bts('Ignore user', array(), null, 'boinc:ignore-user-add'),
1886 1886
       '#submit' => array('_boincwork_ignore_list_form_submit'),
1887 1887
       '#weight' => 12,
1888 1888
       '#attributes' => array('class' => 'add_ignore_user'),
@@ -1900,13 +1900,13 @@  discard block
 block discarded – undo
1900 1900
   $form['prefs']['submit'] = array(
1901 1901
     '#prefix' => '<li class="first tab">',
1902 1902
     '#type' => 'submit',
1903
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1903
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1904 1904
     '#validate' => array('boincwork_privacyprefs_form_validate'),
1905 1905
     '#submit' => array('boincwork_privacyprefs_form_submit'),
1906 1906
     '#suffix' => '</li>'
1907 1907
   );
1908 1908
   $form['prefs']['form control tabs'] = array(
1909
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1909
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1910 1910
   );
1911 1911
   $form['prefs']['form control tabs suffix'] = array(
1912 1912
     '#value' => '</ul>'
@@ -1924,8 +1924,8 @@  discard block
 block discarded – undo
1924 1924
   $output .= drupal_render($form['privacy']);
1925 1925
 
1926 1926
   $header = array(
1927
-    bts('Username', array(), NULL, 'boinc:ignore-user-list'),
1928
-    bts('Operations', array(), NULL, 'boinc:ignore-user-list')
1927
+    bts('Username', array(), null, 'boinc:ignore-user-list'),
1928
+    bts('Operations', array(), null, 'boinc:ignore-user-list')
1929 1929
   );
1930 1930
 
1931 1931
   $rows = array();
@@ -1940,7 +1940,7 @@  discard block
 block discarded – undo
1940 1940
   else {
1941 1941
     $rows[] = array(
1942 1942
       array(
1943
-        'data' => bts('You have not added any users to your Ignore List.', array(), NULL, 'boinc:ignore-user-list'),
1943
+        'data' => bts('You have not added any users to your Ignore List.', array(), null, 'boinc:ignore-user-list'),
1944 1944
         'colspan' => '2',
1945 1945
       )
1946 1946
     );
@@ -2019,9 +2019,9 @@  discard block
 block discarded – undo
2019 2019
     bts('@username has been added to your ignore list. See your !privacy_preferences for more details.',
2020 2020
       array(
2021 2021
         '@username' => $form_state['values']['addusername_toignorelist'],
2022
-        '!privacy_preferences' => l(bts('privacy preferences', array(), NULL, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2022
+        '!privacy_preferences' => l(bts('privacy preferences', array(), null, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2023 2023
       ),
2024
-      NULL, 'boinc:ignore-user-add'),
2024
+      null, 'boinc:ignore-user-add'),
2025 2025
     'status');
2026 2026
 }
2027 2027
 
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
   // only non-js users/browsers will see the Apply Filter button.
2047 2047
   $form['submit'] = array(
2048 2048
     '#type' => 'submit',
2049
-    '#value' => bts('Apply Filter', array(), NULL, 'boinc:form-save'),
2049
+    '#value' => bts('Apply Filter', array(), null, 'boinc:form-save'),
2050 2050
     '#attributes' => array('class' => 'js-hide',),
2051 2051
   );
2052 2052
 
Please login to merge, or discard this patch.
html/user/submit.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 
542 542
     $is_assim_move = is_assim_move($app);
543 543
 
544
-    page_head("Batch $batch_id");
544
+    page_head("batch $batch_id");
545 545
     text_start(800);
546 546
     start_table();
547 547
     row2("name", $batch->name);
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 
818 818
     if (get_int('confirmed', true)) {
819 819
         retire_batch($batch);
820
-        page_head("Batch $batch_id retired");
820
+        page_head("batch $batch_id retired");
821 821
         return_link();
822 822
         page_tail();
823 823
     } else {
Please login to merge, or discard this patch.
html/user/buda.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     } else {
226 226
         form_input_text("Plan class$pc", 'variant', $variant);
227 227
     }
228
-    form_select("Dockerfile$sb", 'dockerfile', $sbitems, $variant_desc->dockerfile);
228
+    form_select("dockerfile$sb", 'dockerfile', $sbitems, $variant_desc->dockerfile);
229 229
     form_select2_multi("Application files$sb", 'app_files', $sbitems, $variant_desc->app_files);
230 230
     form_input_text(
231 231
         'Input file names<br><small>Space-separated</small>',
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
     // Note: we don't currently allow indirect file access.
435 435
     // If we did, we'd need to create job.toml to mount project dir
436 436
 
437
-    app_list("Variant $variant added for app $app.");
437
+    app_list("variant $variant added for app $app.");
438 438
 }
439 439
 
440 440
 function variant_delete() {
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         if ($ret) {
462 462
             error_page("delete failed");
463 463
         }
464
-        $notice = "Variant $variant of app $app removed.";
464
+        $notice = "variant $variant of app $app removed.";
465 465
         app_list($notice);
466 466
     } else {
467 467
         page_head("Confirm");
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         if ($ret) {
492 492
             error_page('delete failed');
493 493
         }
494
-        $notice = "App $app removed.";
494
+        $notice = "app $app removed.";
495 495
         app_list($notice);
496 496
     } else {
497 497
         page_head('Confirm');
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         }
557 557
         $dir = "$buda_root/$name";
558 558
         if (file_exists($dir)) {
559
-            error_page("App $name already exists.");
559
+            error_page("app $name already exists.");
560 560
         }
561 561
         mkdir($dir);
562 562
         $desc->user_id = $user->id;
Please login to merge, or discard this patch.
html/user/submit_stats.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 }
193 193
 
194 194
 function flops_graph($batch) {
195
-    page_head("Batch $batch->id job runtimes");
195
+    page_head("batch $batch->id job runtimes");
196 196
     echo "
197 197
     <p>
198 198
     Runtimes of completed jobs, normalized to an average (4.3 GFLOPS) computer.
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         }
252 252
     }
253 253
     arsort($x);
254
-    page_head("Batch $batch->id: completed jobs grouped by host");
254
+    page_head("batch $batch->id: completed jobs grouped by host");
255 255
     text_start();
256 256
     start_table();
257 257
     table_header('Host', 'OS', '# jobs');
Please login to merge, or discard this patch.