Passed
Push — master ( e7a545...e1164f )
by
unknown
01:05 queued 17s
created
boinc/modules/flag_abuse_reason/includes/flag_abuse_reason.flag_default.inc 2 patches
Indentation   +232 added lines, -232 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
  * Node Flags
24 24
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
25 25
 function _flag_abuse_reason_abuse_node_flags(&$flags) {
26
-  // Exported flag: "Node Abuse metalink".
27
-  $flags[] = array (
26
+    // Exported flag: "Node Abuse metalink".
27
+    $flags[] = array (
28 28
     'content_type' => 'node',
29 29
     'name' => 'abuse_node_meta',
30 30
     'title' => 'Node Abuse meta',
31 31
     'global' => false,
32 32
     'types' => array (
33
-      '0' => 'forum',
34
-      '1' => 'news',
35
-      '2' => 'team_forum',
33
+        '0' => 'forum',
34
+        '1' => 'news',
35
+        '2' => 'team_forum',
36 36
     ),
37 37
     'events' => array (
38
-      0 => 'flag',
39
-      1 => 'unflag',
40
-      2 => 'reset',
38
+        0 => 'flag',
39
+        1 => 'unflag',
40
+        2 => 'reset',
41 41
     ),
42 42
     'flag_short' => 'Meta Flag for node',
43 43
     'flag_long' => 'Meta Flag for node.',
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
     'unflag_denied_text' => '',
49 49
     'link_type' => 'confirm',
50 50
     'roles' => array (
51
-      'flag' => array (
51
+        'flag' => array (
52 52
         0 => '2',
53
-      ),
54
-      'unflag' => array (
53
+        ),
54
+        'unflag' => array (
55 55
         0 => '2',
56
-      ),
56
+        ),
57 57
     ),
58 58
     'show_on_page' => true,
59 59
     'show_on_teaser' => false,
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
68 68
     'status' => false,
69 69
     'locked' => array (
70
-      'name' => 'name',
71
-      'global' => 'global',
70
+        'name' => 'name',
71
+        'global' => 'global',
72 72
     ),
73 73
     'module' => 'flag_abuse_reason',
74 74
     'api_version' => 2,
75
-  );
75
+    );
76 76
 
77
-  // Exported flag: "Node Abuse 1".
78
-  $flags[] = array (
77
+    // Exported flag: "Node Abuse 1".
78
+    $flags[] = array (
79 79
     'content_type' => 'node',
80 80
     'name' => 'abuse_node_1',
81 81
     'title' => 'Node Abuse 1',
82 82
     'global' => false,
83 83
     'types' => array (
84
-      '0' => 'forum',
85
-      '1' => 'news',
86
-      '2' => 'team_forum',
84
+        '0' => 'forum',
85
+        '1' => 'news',
86
+        '2' => 'team_forum',
87 87
     ),
88 88
     'events' => array (
89
-      0 => 'flag',
90
-      1 => 'unflag',
91
-      2 => 'reset',
89
+        0 => 'flag',
90
+        1 => 'unflag',
91
+        2 => 'reset',
92 92
     ),
93 93
     'flag_short' => 'Flag as offensive',
94 94
     'flag_long' => 'Flag this content as offensive.',
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
     'unflag_denied_text' => '',
100 100
     'link_type' => 'confirm',
101 101
     'roles' => array (
102
-      'flag' => array (
102
+        'flag' => array (
103 103
         0 => '2',
104
-      ),
105
-      'unflag' => array (
104
+        ),
105
+        'unflag' => array (
106 106
         0 => '2',
107
-      ),
107
+        ),
108 108
     ),
109 109
     'show_on_page' => true,
110 110
     'show_on_teaser' => false,
@@ -118,28 +118,28 @@  discard block
 block discarded – undo
118 118
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
119 119
     'status' => false,
120 120
     'locked' => array (
121
-      'name' => 'name',
122
-      'global' => 'global',
121
+        'name' => 'name',
122
+        'global' => 'global',
123 123
     ),
124 124
     'module' => 'flag_abuse_reason',
125 125
     'api_version' => 2,
126
-  );
126
+    );
127 127
 
128
-  // Exported flag: "Node Abuse 2".
129
-  $flags[] = array (
128
+    // Exported flag: "Node Abuse 2".
129
+    $flags[] = array (
130 130
     'content_type' => 'node',
131 131
     'name' => 'abuse_node_2',
132 132
     'title' => 'Node Abuse 2',
133 133
     'global' => false,
134 134
     'types' => array (
135
-      '0' => 'forum',
136
-      '1' => 'news',
137
-      '2' => 'team_forum',
135
+        '0' => 'forum',
136
+        '1' => 'news',
137
+        '2' => 'team_forum',
138 138
     ),
139 139
     'events' => array (
140
-      0 => 'flag',
141
-      1 => 'unflag',
142
-      2 => 'reset',
140
+        0 => 'flag',
141
+        1 => 'unflag',
142
+        2 => 'reset',
143 143
     ),
144 144
     'flag_short' => 'Flag as offensive',
145 145
     'flag_long' => 'Flag this content as offensive.',
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
     'unflag_denied_text' => '',
151 151
     'link_type' => 'confirm',
152 152
     'roles' => array (
153
-      'flag' => array (
153
+        'flag' => array (
154 154
         0 => '2',
155
-      ),
156
-      'unflag' => array (
155
+        ),
156
+        'unflag' => array (
157 157
         0 => '2',
158
-      ),
158
+        ),
159 159
     ),
160 160
     'show_on_page' => true,
161 161
     'show_on_teaser' => false,
@@ -169,28 +169,28 @@  discard block
 block discarded – undo
169 169
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
170 170
     'status' => false,
171 171
     'locked' => array (
172
-      'name' => 'name',
173
-      'global' => 'global',
172
+        'name' => 'name',
173
+        'global' => 'global',
174 174
     ),
175 175
     'module' => 'flag_abuse_reason',
176 176
     'api_version' => 2,
177
-  );
177
+    );
178 178
 
179
-  // Exported flag: "Node Abuse 3".
180
-  $flags[] = array (
179
+    // Exported flag: "Node Abuse 3".
180
+    $flags[] = array (
181 181
     'content_type' => 'node',
182 182
     'name' => 'abuse_node_3',
183 183
     'title' => 'Node Abuse 3',
184 184
     'global' => false,
185 185
     'types' => array (
186
-      '0' => 'forum',
187
-      '1' => 'news',
188
-      '2' => 'team_forum',
186
+        '0' => 'forum',
187
+        '1' => 'news',
188
+        '2' => 'team_forum',
189 189
     ),
190 190
     'events' => array (
191
-      0 => 'flag',
192
-      1 => 'unflag',
193
-      2 => 'reset',
191
+        0 => 'flag',
192
+        1 => 'unflag',
193
+        2 => 'reset',
194 194
     ),
195 195
     'flag_short' => 'Flag as offensive',
196 196
     'flag_long' => 'Flag this content as offensive.',
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
     'unflag_denied_text' => '',
202 202
     'link_type' => 'confirm',
203 203
     'roles' => array (
204
-      'flag' => array (
204
+        'flag' => array (
205 205
         0 => '2',
206
-      ),
207
-      'unflag' => array (
206
+        ),
207
+        'unflag' => array (
208 208
         0 => '2',
209
-      ),
209
+        ),
210 210
     ),
211 211
     'show_on_page' => true,
212 212
     'show_on_teaser' => false,
@@ -220,28 +220,28 @@  discard block
 block discarded – undo
220 220
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
221 221
     'status' => false,
222 222
     'locked' => array (
223
-      'name' => 'name',
224
-      'global' => 'global',
223
+        'name' => 'name',
224
+        'global' => 'global',
225 225
     ),
226 226
     'module' => 'flag_abuse_reason',
227 227
     'api_version' => 2,
228
-  );
228
+    );
229 229
 
230
-  // Exported flag: "Node Abuse 4".
231
-  $flags[] = array (
230
+    // Exported flag: "Node Abuse 4".
231
+    $flags[] = array (
232 232
     'content_type' => 'node',
233 233
     'name' => 'abuse_node_4',
234 234
     'title' => 'Node Abuse 4',
235 235
     'global' => false,
236 236
     'types' => array (
237
-      '0' => 'forum',
238
-      '1' => 'news',
239
-      '2' => 'team_forum',
237
+        '0' => 'forum',
238
+        '1' => 'news',
239
+        '2' => 'team_forum',
240 240
     ),
241 241
     'events' => array (
242
-      0 => 'flag',
243
-      1 => 'unflag',
244
-      2 => 'reset',
242
+        0 => 'flag',
243
+        1 => 'unflag',
244
+        2 => 'reset',
245 245
     ),
246 246
     'flag_short' => 'Flag as offensive',
247 247
     'flag_long' => 'Flag this content as offensive.',
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
     'unflag_denied_text' => '',
253 253
     'link_type' => 'confirm',
254 254
     'roles' => array (
255
-      'flag' => array (
255
+        'flag' => array (
256 256
         0 => '2',
257
-      ),
258
-      'unflag' => array (
257
+        ),
258
+        'unflag' => array (
259 259
         0 => '2',
260
-      ),
260
+        ),
261 261
     ),
262 262
     'show_on_page' => true,
263 263
     'show_on_teaser' => false,
@@ -271,28 +271,28 @@  discard block
 block discarded – undo
271 271
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
272 272
     'status' => false,
273 273
     'locked' => array (
274
-      'name' => 'name',
275
-      'global' => 'global',
274
+        'name' => 'name',
275
+        'global' => 'global',
276 276
     ),
277 277
     'module' => 'flag_abuse_reason',
278 278
     'api_version' => 2,
279
-  );
279
+    );
280 280
 
281
-  // Exported flag: "Node Abuse 5".
282
-  $flags[] = array (
281
+    // Exported flag: "Node Abuse 5".
282
+    $flags[] = array (
283 283
     'content_type' => 'node',
284 284
     'name' => 'abuse_node_5',
285 285
     'title' => 'Node Abuse 5',
286 286
     'global' => false,
287 287
     'types' => array (
288
-      '0' => 'forum',
289
-      '1' => 'news',
290
-      '2' => 'team_forum',
288
+        '0' => 'forum',
289
+        '1' => 'news',
290
+        '2' => 'team_forum',
291 291
     ),
292 292
     'events' => array (
293
-      0 => 'flag',
294
-      1 => 'unflag',
295
-      2 => 'reset',
293
+        0 => 'flag',
294
+        1 => 'unflag',
295
+        2 => 'reset',
296 296
     ),
297 297
     'flag_short' => 'Flag as offensive',
298 298
     'flag_long' => 'Flag this content as offensive.',
@@ -303,12 +303,12 @@  discard block
 block discarded – undo
303 303
     'unflag_denied_text' => '',
304 304
     'link_type' => 'confirm',
305 305
     'roles' => array (
306
-      'flag' => array (
306
+        'flag' => array (
307 307
         0 => '2',
308
-      ),
309
-      'unflag' => array (
308
+        ),
309
+        'unflag' => array (
310 310
         0 => '2',
311
-      ),
311
+        ),
312 312
     ),
313 313
     'show_on_page' => true,
314 314
     'show_on_teaser' => false,
@@ -322,14 +322,14 @@  discard block
 block discarded – undo
322 322
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
323 323
     'status' => false,
324 324
     'locked' => array (
325
-      'name' => 'name',
326
-      'global' => 'global',
325
+        'name' => 'name',
326
+        'global' => 'global',
327 327
     ),
328 328
     'module' => 'flag_abuse_reason',
329 329
     'api_version' => 2,
330
-  );
330
+    );
331 331
 
332
-  return $flags;
332
+    return $flags;
333 333
 }
334 334
 
335 335
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * *
@@ -337,20 +337,20 @@  discard block
 block discarded – undo
337 337
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
338 338
 function _flag_abuse_reason_abuse_comment_flags(&$flags) {
339 339
 
340
-  // Exported flag: "Comment Abuse meta".
341
-  $flags[] = array(
340
+    // Exported flag: "Comment Abuse meta".
341
+    $flags[] = array(
342 342
     'content_type' => 'comment',
343 343
     'name' => 'abuse_comment_meta',
344 344
     'title' => 'Comment Abuse meta',
345 345
     'global' => '0',
346 346
     'types' => array(
347
-      '0' => 'forum',
348
-      '1' => 'news',
349
-      '2' => 'team_forum',
347
+        '0' => 'forum',
348
+        '1' => 'news',
349
+        '2' => 'team_forum',
350 350
     ),
351 351
     'events' => array (
352
-      0 => 'flag',
353
-      1 => 'unflag',
352
+        0 => 'flag',
353
+        1 => 'unflag',
354 354
     ),
355 355
     'flag_short' => 'Meta Flag for comment',
356 356
     'flag_long' => 'Meta Flag for comment.',
@@ -361,12 +361,12 @@  discard block
 block discarded – undo
361 361
     'unflag_denied_text' => '',
362 362
     'link_type' => 'confirm',
363 363
     'roles' => array(
364
-      'flag' => array(
364
+        'flag' => array(
365 365
         '0' => 2,
366
-      ),
367
-      'unflag' => array(
366
+        ),
367
+        'unflag' => array(
368 368
         '0' => 2,
369
-      ),
369
+        ),
370 370
     ),
371 371
     'weight' => 0,
372 372
     'access_author' => '',
@@ -379,27 +379,27 @@  discard block
 block discarded – undo
379 379
     'status' => false,
380 380
     'show_on_teaser' => false,
381 381
     'locked' => array (
382
-      'name' => 'name',
383
-      'global' => 'global',
382
+        'name' => 'name',
383
+        'global' => 'global',
384 384
     ),
385 385
     'module' => 'flag_abuse_reason',
386 386
     'api_version' => 2,
387
-  );
387
+    );
388 388
 
389
-  // Exported flag: "Comment Abuse 1".
390
-  $flags[] = array (
389
+    // Exported flag: "Comment Abuse 1".
390
+    $flags[] = array (
391 391
     'content_type' => 'comment',
392 392
     'name' => 'abuse_comment_1',
393 393
     'title' => 'Comment Abuse 1',
394 394
     'global' => false,
395 395
     'types' => array (
396
-      '0' => 'forum',
397
-      '1' => 'news',
398
-      '2' => 'team_forum',
396
+        '0' => 'forum',
397
+        '1' => 'news',
398
+        '2' => 'team_forum',
399 399
     ),
400 400
     'events' => array (
401
-      0 => 'flag',
402
-      1 => 'unflag',
401
+        0 => 'flag',
402
+        1 => 'unflag',
403 403
     ),
404 404
     'flag_short' => 'Flag as offensive',
405 405
     'flag_long' => 'Flag this content as offensive.',
@@ -410,12 +410,12 @@  discard block
 block discarded – undo
410 410
     'unflag_denied_text' => '',
411 411
     'link_type' => 'confirm',
412 412
     'roles' => array (
413
-      'flag' => array (
413
+        'flag' => array (
414 414
         0 => '2',
415
-      ),
416
-      'unflag' => array (
415
+        ),
416
+        'unflag' => array (
417 417
         0 => '2',
418
-      ),
418
+        ),
419 419
     ),
420 420
     'access_author' => '',
421 421
     'show_on_comment' => true,
@@ -427,27 +427,27 @@  discard block
 block discarded – undo
427 427
     'status' => false,
428 428
     'show_on_teaser' => false,
429 429
     'locked' => array (
430
-      'name' => 'name',
431
-      'global' => 'global',
430
+        'name' => 'name',
431
+        'global' => 'global',
432 432
     ),
433 433
     'module' => 'flag_abuse_reason',
434 434
     'api_version' => 2,
435
-  );
435
+    );
436 436
 
437
-  // Exported flag: "Comment Abuse 2".
438
-  $flags[] = array (
437
+    // Exported flag: "Comment Abuse 2".
438
+    $flags[] = array (
439 439
     'content_type' => 'comment',
440 440
     'name' => 'abuse_comment_2',
441 441
     'title' => 'Comment Abuse 2',
442 442
     'global' => false,
443 443
     'types' => array (
444
-      '0' => 'forum',
445
-      '1' => 'news',
446
-      '2' => 'team_forum',
444
+        '0' => 'forum',
445
+        '1' => 'news',
446
+        '2' => 'team_forum',
447 447
     ),
448 448
     'events' => array (
449
-      0 => 'flag',
450
-      1 => 'unflag',
449
+        0 => 'flag',
450
+        1 => 'unflag',
451 451
     ),
452 452
     'flag_short' => 'Flag as offensive',
453 453
     'flag_long' => 'Flag this content as offensive.',
@@ -458,12 +458,12 @@  discard block
 block discarded – undo
458 458
     'unflag_denied_text' => '',
459 459
     'link_type' => 'confirm',
460 460
     'roles' => array (
461
-      'flag' => array (
461
+        'flag' => array (
462 462
         0 => '2',
463
-      ),
464
-      'unflag' => array (
463
+        ),
464
+        'unflag' => array (
465 465
         0 => '2',
466
-      ),
466
+        ),
467 467
     ),
468 468
     'access_author' => '',
469 469
     'show_on_comment' => true,
@@ -475,27 +475,27 @@  discard block
 block discarded – undo
475 475
     'status' => false,
476 476
     'show_on_teaser' => false,
477 477
     'locked' => array (
478
-      'name' => 'name',
479
-      'global' => 'global',
478
+        'name' => 'name',
479
+        'global' => 'global',
480 480
     ),
481 481
     'module' => 'flag_abuse_reason',
482 482
     'api_version' => 2,
483
-  );
483
+    );
484 484
 
485
-  // Exported flag: "Comment Abuse 3".
486
-  $flags[] = array (
485
+    // Exported flag: "Comment Abuse 3".
486
+    $flags[] = array (
487 487
     'content_type' => 'comment',
488 488
     'name' => 'abuse_comment_3',
489 489
     'title' => 'Comment Abuse 3',
490 490
     'global' => false,
491 491
     'types' => array (
492
-      '0' => 'forum',
493
-      '1' => 'news',
494
-      '2' => 'team_forum',
492
+        '0' => 'forum',
493
+        '1' => 'news',
494
+        '2' => 'team_forum',
495 495
     ),
496 496
     'events' => array (
497
-      0 => 'flag',
498
-      1 => 'unflag',
497
+        0 => 'flag',
498
+        1 => 'unflag',
499 499
     ),
500 500
     'flag_short' => 'Flag as offensive',
501 501
     'flag_long' => 'Flag this content as offensive.',
@@ -506,12 +506,12 @@  discard block
 block discarded – undo
506 506
     'unflag_denied_text' => '',
507 507
     'link_type' => 'confirm',
508 508
     'roles' => array (
509
-      'flag' => array (
509
+        'flag' => array (
510 510
         0 => '2',
511
-      ),
512
-      'unflag' => array (
511
+        ),
512
+        'unflag' => array (
513 513
         0 => '2',
514
-      ),
514
+        ),
515 515
     ),
516 516
     'access_author' => '',
517 517
     'show_on_comment' => true,
@@ -523,27 +523,27 @@  discard block
 block discarded – undo
523 523
     'status' => false,
524 524
     'show_on_teaser' => false,
525 525
     'locked' => array (
526
-      'name' => 'name',
527
-      'global' => 'global',
526
+        'name' => 'name',
527
+        'global' => 'global',
528 528
     ),
529 529
     'module' => 'flag_abuse_reason',
530 530
     'api_version' => 2,
531
-  );
531
+    );
532 532
 
533
-  // Exported flag: "Comment Abuse 4".
534
-  $flags[] = array (
533
+    // Exported flag: "Comment Abuse 4".
534
+    $flags[] = array (
535 535
     'content_type' => 'comment',
536 536
     'name' => 'abuse_comment_4',
537 537
     'title' => 'Comment Abuse 4',
538 538
     'global' => false,
539 539
     'types' => array (
540
-      '0' => 'forum',
541
-      '1' => 'news',
542
-      '2' => 'team_forum',
540
+        '0' => 'forum',
541
+        '1' => 'news',
542
+        '2' => 'team_forum',
543 543
     ),
544 544
     'events' => array (
545
-      0 => 'flag',
546
-      1 => 'unflag',
545
+        0 => 'flag',
546
+        1 => 'unflag',
547 547
     ),
548 548
     'flag_short' => 'Flag as offensive',
549 549
     'flag_long' => 'Flag this content as offensive.',
@@ -554,12 +554,12 @@  discard block
 block discarded – undo
554 554
     'unflag_denied_text' => '',
555 555
     'link_type' => 'confirm',
556 556
     'roles' => array (
557
-      'flag' => array (
557
+        'flag' => array (
558 558
         0 => '2',
559
-      ),
560
-      'unflag' => array (
559
+        ),
560
+        'unflag' => array (
561 561
         0 => '2',
562
-      ),
562
+        ),
563 563
     ),
564 564
     'access_author' => '',
565 565
     'show_on_comment' => true,
@@ -571,27 +571,27 @@  discard block
 block discarded – undo
571 571
     'status' => false,
572 572
     'show_on_teaser' => false,
573 573
     'locked' => array (
574
-      'name' => 'name',
575
-      'global' => 'global',
574
+        'name' => 'name',
575
+        'global' => 'global',
576 576
     ),
577 577
     'module' => 'flag_abuse_reason',
578 578
     'api_version' => 2,
579
-  );
579
+    );
580 580
 
581
-  // Exported flag: "Comment Abuse 5".
582
-  $flags[] = array (
581
+    // Exported flag: "Comment Abuse 5".
582
+    $flags[] = array (
583 583
     'content_type' => 'comment',
584 584
     'name' => 'abuse_comment_5',
585 585
     'title' => 'Comment Abuse 5',
586 586
     'global' => false,
587 587
     'types' => array (
588
-      '0' => 'forum',
589
-      '1' => 'news',
590
-      '2' => 'team_forum',
588
+        '0' => 'forum',
589
+        '1' => 'news',
590
+        '2' => 'team_forum',
591 591
     ),
592 592
     'events' => array (
593
-      0 => 'flag',
594
-      1 => 'unflag',
593
+        0 => 'flag',
594
+        1 => 'unflag',
595 595
     ),
596 596
     'flag_short' => 'Flag as offensive',
597 597
     'flag_long' => 'Flag this content as offensive.',
@@ -602,12 +602,12 @@  discard block
 block discarded – undo
602 602
     'unflag_denied_text' => '',
603 603
     'link_type' => 'confirm',
604 604
     'roles' => array (
605
-      'flag' => array (
605
+        'flag' => array (
606 606
         0 => '2',
607
-      ),
608
-      'unflag' => array (
607
+        ),
608
+        'unflag' => array (
609 609
         0 => '2',
610
-      ),
610
+        ),
611 611
     ),
612 612
     'access_author' => '',
613 613
     'show_on_comment' => true,
@@ -619,22 +619,22 @@  discard block
 block discarded – undo
619 619
     'status' => false,
620 620
     'show_on_teaser' => false,
621 621
     'locked' => array (
622
-      'name' => 'name',
623
-      'global' => 'global',
622
+        'name' => 'name',
623
+        'global' => 'global',
624 624
     ),
625 625
     'module' => 'flag_abuse_reason',
626 626
     'api_version' => 2,
627
-  );
627
+    );
628 628
 
629
-  return $flags;
629
+    return $flags;
630 630
 }
631 631
 
632 632
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * *
633 633
  * User Flags
634 634
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
635 635
 function _flag_abuse_reason_abuse_user_flags(&$flags) {
636
-  // Exported flag: "User Abuse meta".
637
-  $flags[] = array (
636
+    // Exported flag: "User Abuse meta".
637
+    $flags[] = array (
638 638
     'content_type' => 'user',
639 639
     'name' => 'abuse_user_meta',
640 640
     'title' => 'User Abuse Meta',
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
     'types' => array (
643 643
     ),
644 644
     'events' => array (
645
-      0 => 'flag',
646
-      1 => 'unflag',
645
+        0 => 'flag',
646
+        1 => 'unflag',
647 647
     ),
648 648
     'flag_short' => 'Meta Flag for User',
649 649
     'flag_long' => 'Meta Flag for User.',
@@ -654,12 +654,12 @@  discard block
 block discarded – undo
654 654
     'unflag_denied_text' => '',
655 655
     'link_type' => 'confirm',
656 656
     'roles' => array (
657
-      'flag' => array (
657
+        'flag' => array (
658 658
         0 => '2',
659
-      ),
660
-      'unflag' => array (
659
+        ),
660
+        'unflag' => array (
661 661
         0 => '2',
662
-      ),
662
+        ),
663 663
     ),
664 664
     'show_on_profile' => true,
665 665
     'access_uid' => '',
@@ -671,15 +671,15 @@  discard block
 block discarded – undo
671 671
     'status' => false,
672 672
     'show_on_teaser' => false,
673 673
     'locked' => array (
674
-      'name' => 'name',
675
-      'global' => 'global',
674
+        'name' => 'name',
675
+        'global' => 'global',
676 676
     ),
677 677
     'module' => 'flag_abuse_reason',
678 678
     'api_version' => 2,
679
-  );
679
+    );
680 680
 
681
-  // Exported flag: "User Abuse 1".
682
-  $flags[] = array (
681
+    // Exported flag: "User Abuse 1".
682
+    $flags[] = array (
683 683
     'content_type' => 'user',
684 684
     'name' => 'abuse_user_1',
685 685
     'title' => 'User Abuse 1',
@@ -687,8 +687,8 @@  discard block
 block discarded – undo
687 687
     'types' => array (
688 688
     ),
689 689
     'events' => array (
690
-      0 => 'flag',
691
-      1 => 'unflag',
690
+        0 => 'flag',
691
+        1 => 'unflag',
692 692
     ),
693 693
     'flag_short' => 'Report User',
694 694
     'flag_long' => 'Report this user as offensive.',
@@ -699,12 +699,12 @@  discard block
 block discarded – undo
699 699
     'unflag_denied_text' => '',
700 700
     'link_type' => 'confirm',
701 701
     'roles' => array (
702
-      'flag' => array (
702
+        'flag' => array (
703 703
         0 => '2',
704
-      ),
705
-      'unflag' => array (
704
+        ),
705
+        'unflag' => array (
706 706
         0 => '2',
707
-      ),
707
+        ),
708 708
     ),
709 709
     'show_on_profile' => true,
710 710
     'access_uid' => '',
@@ -716,15 +716,15 @@  discard block
 block discarded – undo
716 716
     'status' => false,
717 717
     'show_on_teaser' => false,
718 718
     'locked' => array (
719
-      'name' => 'name',
720
-      'global' => 'global',
719
+        'name' => 'name',
720
+        'global' => 'global',
721 721
     ),
722 722
     'module' => 'flag_abuse_reason',
723 723
     'api_version' => 2,
724
-  );
724
+    );
725 725
 
726
-  // Exported flag: "User Abuse 2".
727
-  $flags[] = array (
726
+    // Exported flag: "User Abuse 2".
727
+    $flags[] = array (
728 728
     'content_type' => 'user',
729 729
     'name' => 'abuse_user_2',
730 730
     'title' => 'User Abuse 2',
@@ -732,8 +732,8 @@  discard block
 block discarded – undo
732 732
     'types' => array (
733 733
     ),
734 734
     'events' => array (
735
-      0 => 'flag',
736
-      1 => 'unflag',
735
+        0 => 'flag',
736
+        1 => 'unflag',
737 737
     ),
738 738
     'flag_short' => 'Report User',
739 739
     'flag_long' => 'Report this user as offensive.',
@@ -744,12 +744,12 @@  discard block
 block discarded – undo
744 744
     'unflag_denied_text' => '',
745 745
     'link_type' => 'confirm',
746 746
     'roles' => array (
747
-      'flag' => array (
747
+        'flag' => array (
748 748
         0 => '2',
749
-      ),
750
-      'unflag' => array (
749
+        ),
750
+        'unflag' => array (
751 751
         0 => '2',
752
-      ),
752
+        ),
753 753
     ),
754 754
     'show_on_profile' => true,
755 755
     'access_uid' => '',
@@ -761,15 +761,15 @@  discard block
 block discarded – undo
761 761
     'status' => false,
762 762
     'show_on_teaser' => false,
763 763
     'locked' => array (
764
-      'name' => 'name',
765
-      'global' => 'global',
764
+        'name' => 'name',
765
+        'global' => 'global',
766 766
     ),
767 767
     'module' => 'flag_abuse_reason',
768 768
     'api_version' => 2,
769
-  );
769
+    );
770 770
 
771
-  // Exported flag: "User Abuse 3".
772
-  $flags[] = array (
771
+    // Exported flag: "User Abuse 3".
772
+    $flags[] = array (
773 773
     'content_type' => 'user',
774 774
     'name' => 'abuse_user_3',
775 775
     'title' => 'User Abuse 3',
@@ -777,8 +777,8 @@  discard block
 block discarded – undo
777 777
     'types' => array (
778 778
     ),
779 779
     'events' => array (
780
-      0 => 'flag',
781
-      1 => 'unflag',
780
+        0 => 'flag',
781
+        1 => 'unflag',
782 782
     ),
783 783
     'flag_short' => 'Report User',
784 784
     'flag_long' => 'Report this user as offensive.',
@@ -789,12 +789,12 @@  discard block
 block discarded – undo
789 789
     'unflag_denied_text' => '',
790 790
     'link_type' => 'confirm',
791 791
     'roles' => array (
792
-      'flag' => array (
792
+        'flag' => array (
793 793
         0 => '2',
794
-      ),
795
-      'unflag' => array (
794
+        ),
795
+        'unflag' => array (
796 796
         0 => '2',
797
-      ),
797
+        ),
798 798
     ),
799 799
     'show_on_profile' => true,
800 800
     'access_uid' => '',
@@ -806,15 +806,15 @@  discard block
 block discarded – undo
806 806
     'status' => false,
807 807
     'show_on_teaser' => false,
808 808
     'locked' => array (
809
-      'name' => 'name',
810
-      'global' => 'global',
809
+        'name' => 'name',
810
+        'global' => 'global',
811 811
     ),
812 812
     'module' => 'flag_abuse_reason',
813 813
     'api_version' => 2,
814
-  );
814
+    );
815 815
 
816
-  // Exported flag: "User Abuse 4".
817
-  $flags[] = array (
816
+    // Exported flag: "User Abuse 4".
817
+    $flags[] = array (
818 818
     'content_type' => 'user',
819 819
     'name' => 'abuse_user_4',
820 820
     'title' => 'User Abuse 4',
@@ -822,8 +822,8 @@  discard block
 block discarded – undo
822 822
     'types' => array (
823 823
     ),
824 824
     'events' => array (
825
-      0 => 'flag',
826
-      1 => 'unflag',
825
+        0 => 'flag',
826
+        1 => 'unflag',
827 827
     ),
828 828
     'flag_short' => 'Report User',
829 829
     'flag_long' => 'Report this user as offensive.',
@@ -834,12 +834,12 @@  discard block
 block discarded – undo
834 834
     'unflag_denied_text' => '',
835 835
     'link_type' => 'confirm',
836 836
     'roles' => array (
837
-      'flag' => array (
837
+        'flag' => array (
838 838
         0 => '2',
839
-      ),
840
-      'unflag' => array (
839
+        ),
840
+        'unflag' => array (
841 841
         0 => '2',
842
-      ),
842
+        ),
843 843
     ),
844 844
     'show_on_profile' => true,
845 845
     'access_uid' => '',
@@ -851,12 +851,12 @@  discard block
 block discarded – undo
851 851
     'status' => false,
852 852
     'show_on_teaser' => false,
853 853
     'locked' => array (
854
-      'name' => 'name',
855
-      'global' => 'global',
854
+        'name' => 'name',
855
+        'global' => 'global',
856 856
     ),
857 857
     'module' => 'flag_abuse_reason',
858 858
     'api_version' => 2,
859
-  );
859
+    );
860 860
 
861
-  return $flags;
861
+    return $flags;
862 862
 }
Please login to merge, or discard this patch.
Spacing   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
24 24
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
25 25
 function _flag_abuse_reason_abuse_node_flags(&$flags) {
26 26
   // Exported flag: "Node Abuse metalink".
27
-  $flags[] = array (
27
+  $flags[] = array(
28 28
     'content_type' => 'node',
29 29
     'name' => 'abuse_node_meta',
30 30
     'title' => 'Node Abuse meta',
31 31
     'global' => false,
32
-    'types' => array (
32
+    'types' => array(
33 33
       '0' => 'forum',
34 34
       '1' => 'news',
35 35
       '2' => 'team_forum',
36 36
     ),
37
-    'events' => array (
37
+    'events' => array(
38 38
       0 => 'flag',
39 39
       1 => 'unflag',
40 40
       2 => 'reset',
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
     'unflag_message' => '',
48 48
     'unflag_denied_text' => '',
49 49
     'link_type' => 'confirm',
50
-    'roles' => array (
51
-      'flag' => array (
50
+    'roles' => array(
51
+      'flag' => array(
52 52
         0 => '2',
53 53
       ),
54
-      'unflag' => array (
54
+      'unflag' => array(
55 55
         0 => '2',
56 56
       ),
57 57
     ),
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     'reset_long' => 'Reset all flags on this content',
67 67
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
68 68
     'status' => false,
69
-    'locked' => array (
69
+    'locked' => array(
70 70
       'name' => 'name',
71 71
       'global' => 'global',
72 72
     ),
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
   );
76 76
 
77 77
   // Exported flag: "Node Abuse 1".
78
-  $flags[] = array (
78
+  $flags[] = array(
79 79
     'content_type' => 'node',
80 80
     'name' => 'abuse_node_1',
81 81
     'title' => 'Node Abuse 1',
82 82
     'global' => false,
83
-    'types' => array (
83
+    'types' => array(
84 84
       '0' => 'forum',
85 85
       '1' => 'news',
86 86
       '2' => 'team_forum',
87 87
     ),
88
-    'events' => array (
88
+    'events' => array(
89 89
       0 => 'flag',
90 90
       1 => 'unflag',
91 91
       2 => 'reset',
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
     'unflag_message' => '',
99 99
     'unflag_denied_text' => '',
100 100
     'link_type' => 'confirm',
101
-    'roles' => array (
102
-      'flag' => array (
101
+    'roles' => array(
102
+      'flag' => array(
103 103
         0 => '2',
104 104
       ),
105
-      'unflag' => array (
105
+      'unflag' => array(
106 106
         0 => '2',
107 107
       ),
108 108
     ),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     'reset_long' => 'Reset all flags on this content',
118 118
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
119 119
     'status' => false,
120
-    'locked' => array (
120
+    'locked' => array(
121 121
       'name' => 'name',
122 122
       'global' => 'global',
123 123
     ),
@@ -126,17 +126,17 @@  discard block
 block discarded – undo
126 126
   );
127 127
 
128 128
   // Exported flag: "Node Abuse 2".
129
-  $flags[] = array (
129
+  $flags[] = array(
130 130
     'content_type' => 'node',
131 131
     'name' => 'abuse_node_2',
132 132
     'title' => 'Node Abuse 2',
133 133
     'global' => false,
134
-    'types' => array (
134
+    'types' => array(
135 135
       '0' => 'forum',
136 136
       '1' => 'news',
137 137
       '2' => 'team_forum',
138 138
     ),
139
-    'events' => array (
139
+    'events' => array(
140 140
       0 => 'flag',
141 141
       1 => 'unflag',
142 142
       2 => 'reset',
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
     'unflag_message' => '',
150 150
     'unflag_denied_text' => '',
151 151
     'link_type' => 'confirm',
152
-    'roles' => array (
153
-      'flag' => array (
152
+    'roles' => array(
153
+      'flag' => array(
154 154
         0 => '2',
155 155
       ),
156
-      'unflag' => array (
156
+      'unflag' => array(
157 157
         0 => '2',
158 158
       ),
159 159
     ),
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     'reset_long' => 'Reset all flags on this content',
169 169
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
170 170
     'status' => false,
171
-    'locked' => array (
171
+    'locked' => array(
172 172
       'name' => 'name',
173 173
       'global' => 'global',
174 174
     ),
@@ -177,17 +177,17 @@  discard block
 block discarded – undo
177 177
   );
178 178
 
179 179
   // Exported flag: "Node Abuse 3".
180
-  $flags[] = array (
180
+  $flags[] = array(
181 181
     'content_type' => 'node',
182 182
     'name' => 'abuse_node_3',
183 183
     'title' => 'Node Abuse 3',
184 184
     'global' => false,
185
-    'types' => array (
185
+    'types' => array(
186 186
       '0' => 'forum',
187 187
       '1' => 'news',
188 188
       '2' => 'team_forum',
189 189
     ),
190
-    'events' => array (
190
+    'events' => array(
191 191
       0 => 'flag',
192 192
       1 => 'unflag',
193 193
       2 => 'reset',
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
     'unflag_message' => '',
201 201
     'unflag_denied_text' => '',
202 202
     'link_type' => 'confirm',
203
-    'roles' => array (
204
-      'flag' => array (
203
+    'roles' => array(
204
+      'flag' => array(
205 205
         0 => '2',
206 206
       ),
207
-      'unflag' => array (
207
+      'unflag' => array(
208 208
         0 => '2',
209 209
       ),
210 210
     ),
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     'reset_long' => 'Reset all flags on this content',
220 220
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
221 221
     'status' => false,
222
-    'locked' => array (
222
+    'locked' => array(
223 223
       'name' => 'name',
224 224
       'global' => 'global',
225 225
     ),
@@ -228,17 +228,17 @@  discard block
 block discarded – undo
228 228
   );
229 229
 
230 230
   // Exported flag: "Node Abuse 4".
231
-  $flags[] = array (
231
+  $flags[] = array(
232 232
     'content_type' => 'node',
233 233
     'name' => 'abuse_node_4',
234 234
     'title' => 'Node Abuse 4',
235 235
     'global' => false,
236
-    'types' => array (
236
+    'types' => array(
237 237
       '0' => 'forum',
238 238
       '1' => 'news',
239 239
       '2' => 'team_forum',
240 240
     ),
241
-    'events' => array (
241
+    'events' => array(
242 242
       0 => 'flag',
243 243
       1 => 'unflag',
244 244
       2 => 'reset',
@@ -251,11 +251,11 @@  discard block
 block discarded – undo
251 251
     'unflag_message' => '',
252 252
     'unflag_denied_text' => '',
253 253
     'link_type' => 'confirm',
254
-    'roles' => array (
255
-      'flag' => array (
254
+    'roles' => array(
255
+      'flag' => array(
256 256
         0 => '2',
257 257
       ),
258
-      'unflag' => array (
258
+      'unflag' => array(
259 259
         0 => '2',
260 260
       ),
261 261
     ),
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     'reset_long' => 'Reset all flags on this content',
271 271
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
272 272
     'status' => false,
273
-    'locked' => array (
273
+    'locked' => array(
274 274
       'name' => 'name',
275 275
       'global' => 'global',
276 276
     ),
@@ -279,17 +279,17 @@  discard block
 block discarded – undo
279 279
   );
280 280
 
281 281
   // Exported flag: "Node Abuse 5".
282
-  $flags[] = array (
282
+  $flags[] = array(
283 283
     'content_type' => 'node',
284 284
     'name' => 'abuse_node_5',
285 285
     'title' => 'Node Abuse 5',
286 286
     'global' => false,
287
-    'types' => array (
287
+    'types' => array(
288 288
       '0' => 'forum',
289 289
       '1' => 'news',
290 290
       '2' => 'team_forum',
291 291
     ),
292
-    'events' => array (
292
+    'events' => array(
293 293
       0 => 'flag',
294 294
       1 => 'unflag',
295 295
       2 => 'reset',
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
     'unflag_message' => '',
303 303
     'unflag_denied_text' => '',
304 304
     'link_type' => 'confirm',
305
-    'roles' => array (
306
-      'flag' => array (
305
+    'roles' => array(
306
+      'flag' => array(
307 307
         0 => '2',
308 308
       ),
309
-      'unflag' => array (
309
+      'unflag' => array(
310 310
         0 => '2',
311 311
       ),
312 312
     ),
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     'reset_long' => 'Reset all flags on this content',
322 322
     'reset_confirmation' => 'Are you sure you want to reset all flags on this content?',
323 323
     'status' => false,
324
-    'locked' => array (
324
+    'locked' => array(
325 325
       'name' => 'name',
326 326
       'global' => 'global',
327 327
     ),
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
       '1' => 'news',
349 349
       '2' => 'team_forum',
350 350
     ),
351
-    'events' => array (
351
+    'events' => array(
352 352
       0 => 'flag',
353 353
       1 => 'unflag',
354 354
     ),
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
379 379
     'status' => false,
380 380
     'show_on_teaser' => false,
381
-    'locked' => array (
381
+    'locked' => array(
382 382
       'name' => 'name',
383 383
       'global' => 'global',
384 384
     ),
@@ -387,17 +387,17 @@  discard block
 block discarded – undo
387 387
   );
388 388
 
389 389
   // Exported flag: "Comment Abuse 1".
390
-  $flags[] = array (
390
+  $flags[] = array(
391 391
     'content_type' => 'comment',
392 392
     'name' => 'abuse_comment_1',
393 393
     'title' => 'Comment Abuse 1',
394 394
     'global' => false,
395
-    'types' => array (
395
+    'types' => array(
396 396
       '0' => 'forum',
397 397
       '1' => 'news',
398 398
       '2' => 'team_forum',
399 399
     ),
400
-    'events' => array (
400
+    'events' => array(
401 401
       0 => 'flag',
402 402
       1 => 'unflag',
403 403
     ),
@@ -409,11 +409,11 @@  discard block
 block discarded – undo
409 409
     'unflag_message' => '',
410 410
     'unflag_denied_text' => '',
411 411
     'link_type' => 'confirm',
412
-    'roles' => array (
413
-      'flag' => array (
412
+    'roles' => array(
413
+      'flag' => array(
414 414
         0 => '2',
415 415
       ),
416
-      'unflag' => array (
416
+      'unflag' => array(
417 417
         0 => '2',
418 418
       ),
419 419
     ),
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
427 427
     'status' => false,
428 428
     'show_on_teaser' => false,
429
-    'locked' => array (
429
+    'locked' => array(
430 430
       'name' => 'name',
431 431
       'global' => 'global',
432 432
     ),
@@ -435,17 +435,17 @@  discard block
 block discarded – undo
435 435
   );
436 436
 
437 437
   // Exported flag: "Comment Abuse 2".
438
-  $flags[] = array (
438
+  $flags[] = array(
439 439
     'content_type' => 'comment',
440 440
     'name' => 'abuse_comment_2',
441 441
     'title' => 'Comment Abuse 2',
442 442
     'global' => false,
443
-    'types' => array (
443
+    'types' => array(
444 444
       '0' => 'forum',
445 445
       '1' => 'news',
446 446
       '2' => 'team_forum',
447 447
     ),
448
-    'events' => array (
448
+    'events' => array(
449 449
       0 => 'flag',
450 450
       1 => 'unflag',
451 451
     ),
@@ -457,11 +457,11 @@  discard block
 block discarded – undo
457 457
     'unflag_message' => '',
458 458
     'unflag_denied_text' => '',
459 459
     'link_type' => 'confirm',
460
-    'roles' => array (
461
-      'flag' => array (
460
+    'roles' => array(
461
+      'flag' => array(
462 462
         0 => '2',
463 463
       ),
464
-      'unflag' => array (
464
+      'unflag' => array(
465 465
         0 => '2',
466 466
       ),
467 467
     ),
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
475 475
     'status' => false,
476 476
     'show_on_teaser' => false,
477
-    'locked' => array (
477
+    'locked' => array(
478 478
       'name' => 'name',
479 479
       'global' => 'global',
480 480
     ),
@@ -483,17 +483,17 @@  discard block
 block discarded – undo
483 483
   );
484 484
 
485 485
   // Exported flag: "Comment Abuse 3".
486
-  $flags[] = array (
486
+  $flags[] = array(
487 487
     'content_type' => 'comment',
488 488
     'name' => 'abuse_comment_3',
489 489
     'title' => 'Comment Abuse 3',
490 490
     'global' => false,
491
-    'types' => array (
491
+    'types' => array(
492 492
       '0' => 'forum',
493 493
       '1' => 'news',
494 494
       '2' => 'team_forum',
495 495
     ),
496
-    'events' => array (
496
+    'events' => array(
497 497
       0 => 'flag',
498 498
       1 => 'unflag',
499 499
     ),
@@ -505,11 +505,11 @@  discard block
 block discarded – undo
505 505
     'unflag_message' => '',
506 506
     'unflag_denied_text' => '',
507 507
     'link_type' => 'confirm',
508
-    'roles' => array (
509
-      'flag' => array (
508
+    'roles' => array(
509
+      'flag' => array(
510 510
         0 => '2',
511 511
       ),
512
-      'unflag' => array (
512
+      'unflag' => array(
513 513
         0 => '2',
514 514
       ),
515 515
     ),
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
523 523
     'status' => false,
524 524
     'show_on_teaser' => false,
525
-    'locked' => array (
525
+    'locked' => array(
526 526
       'name' => 'name',
527 527
       'global' => 'global',
528 528
     ),
@@ -531,17 +531,17 @@  discard block
 block discarded – undo
531 531
   );
532 532
 
533 533
   // Exported flag: "Comment Abuse 4".
534
-  $flags[] = array (
534
+  $flags[] = array(
535 535
     'content_type' => 'comment',
536 536
     'name' => 'abuse_comment_4',
537 537
     'title' => 'Comment Abuse 4',
538 538
     'global' => false,
539
-    'types' => array (
539
+    'types' => array(
540 540
       '0' => 'forum',
541 541
       '1' => 'news',
542 542
       '2' => 'team_forum',
543 543
     ),
544
-    'events' => array (
544
+    'events' => array(
545 545
       0 => 'flag',
546 546
       1 => 'unflag',
547 547
     ),
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
     'unflag_message' => '',
554 554
     'unflag_denied_text' => '',
555 555
     'link_type' => 'confirm',
556
-    'roles' => array (
557
-      'flag' => array (
556
+    'roles' => array(
557
+      'flag' => array(
558 558
         0 => '2',
559 559
       ),
560
-      'unflag' => array (
560
+      'unflag' => array(
561 561
         0 => '2',
562 562
       ),
563 563
     ),
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
571 571
     'status' => false,
572 572
     'show_on_teaser' => false,
573
-    'locked' => array (
573
+    'locked' => array(
574 574
       'name' => 'name',
575 575
       'global' => 'global',
576 576
     ),
@@ -579,17 +579,17 @@  discard block
 block discarded – undo
579 579
   );
580 580
 
581 581
   // Exported flag: "Comment Abuse 5".
582
-  $flags[] = array (
582
+  $flags[] = array(
583 583
     'content_type' => 'comment',
584 584
     'name' => 'abuse_comment_5',
585 585
     'title' => 'Comment Abuse 5',
586 586
     'global' => false,
587
-    'types' => array (
587
+    'types' => array(
588 588
       '0' => 'forum',
589 589
       '1' => 'news',
590 590
       '2' => 'team_forum',
591 591
     ),
592
-    'events' => array (
592
+    'events' => array(
593 593
       0 => 'flag',
594 594
       1 => 'unflag',
595 595
     ),
@@ -601,11 +601,11 @@  discard block
 block discarded – undo
601 601
     'unflag_message' => '',
602 602
     'unflag_denied_text' => '',
603 603
     'link_type' => 'confirm',
604
-    'roles' => array (
605
-      'flag' => array (
604
+    'roles' => array(
605
+      'flag' => array(
606 606
         0 => '2',
607 607
       ),
608
-      'unflag' => array (
608
+      'unflag' => array(
609 609
         0 => '2',
610 610
       ),
611 611
     ),
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
     'reset_confirmation' => 'Are you sure you want to reset all flags on this comment?',
619 619
     'status' => false,
620 620
     'show_on_teaser' => false,
621
-    'locked' => array (
621
+    'locked' => array(
622 622
       'name' => 'name',
623 623
       'global' => 'global',
624 624
     ),
@@ -634,14 +634,14 @@  discard block
 block discarded – undo
634 634
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
635 635
 function _flag_abuse_reason_abuse_user_flags(&$flags) {
636 636
   // Exported flag: "User Abuse meta".
637
-  $flags[] = array (
637
+  $flags[] = array(
638 638
     'content_type' => 'user',
639 639
     'name' => 'abuse_user_meta',
640 640
     'title' => 'User Abuse Meta',
641 641
     'global' => false,
642
-    'types' => array (
642
+    'types' => array(
643 643
     ),
644
-    'events' => array (
644
+    'events' => array(
645 645
       0 => 'flag',
646 646
       1 => 'unflag',
647 647
     ),
@@ -653,11 +653,11 @@  discard block
 block discarded – undo
653 653
     'unflag_message' => '',
654 654
     'unflag_denied_text' => '',
655 655
     'link_type' => 'confirm',
656
-    'roles' => array (
657
-      'flag' => array (
656
+    'roles' => array(
657
+      'flag' => array(
658 658
         0 => '2',
659 659
       ),
660
-      'unflag' => array (
660
+      'unflag' => array(
661 661
         0 => '2',
662 662
       ),
663 663
     ),
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
     'reset_confirmation' => 'Are you sure you want to reset all flags on this user?',
671 671
     'status' => false,
672 672
     'show_on_teaser' => false,
673
-    'locked' => array (
673
+    'locked' => array(
674 674
       'name' => 'name',
675 675
       'global' => 'global',
676 676
     ),
@@ -679,14 +679,14 @@  discard block
 block discarded – undo
679 679
   );
680 680
 
681 681
   // Exported flag: "User Abuse 1".
682
-  $flags[] = array (
682
+  $flags[] = array(
683 683
     'content_type' => 'user',
684 684
     'name' => 'abuse_user_1',
685 685
     'title' => 'User Abuse 1',
686 686
     'global' => false,
687
-    'types' => array (
687
+    'types' => array(
688 688
     ),
689
-    'events' => array (
689
+    'events' => array(
690 690
       0 => 'flag',
691 691
       1 => 'unflag',
692 692
     ),
@@ -698,11 +698,11 @@  discard block
 block discarded – undo
698 698
     'unflag_message' => '',
699 699
     'unflag_denied_text' => '',
700 700
     'link_type' => 'confirm',
701
-    'roles' => array (
702
-      'flag' => array (
701
+    'roles' => array(
702
+      'flag' => array(
703 703
         0 => '2',
704 704
       ),
705
-      'unflag' => array (
705
+      'unflag' => array(
706 706
         0 => '2',
707 707
       ),
708 708
     ),
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
     'reset_confirmation' => 'Are you sure you want to reset all flags on this user?',
716 716
     'status' => false,
717 717
     'show_on_teaser' => false,
718
-    'locked' => array (
718
+    'locked' => array(
719 719
       'name' => 'name',
720 720
       'global' => 'global',
721 721
     ),
@@ -724,14 +724,14 @@  discard block
 block discarded – undo
724 724
   );
725 725
 
726 726
   // Exported flag: "User Abuse 2".
727
-  $flags[] = array (
727
+  $flags[] = array(
728 728
     'content_type' => 'user',
729 729
     'name' => 'abuse_user_2',
730 730
     'title' => 'User Abuse 2',
731 731
     'global' => false,
732
-    'types' => array (
732
+    'types' => array(
733 733
     ),
734
-    'events' => array (
734
+    'events' => array(
735 735
       0 => 'flag',
736 736
       1 => 'unflag',
737 737
     ),
@@ -743,11 +743,11 @@  discard block
 block discarded – undo
743 743
     'unflag_message' => '',
744 744
     'unflag_denied_text' => '',
745 745
     'link_type' => 'confirm',
746
-    'roles' => array (
747
-      'flag' => array (
746
+    'roles' => array(
747
+      'flag' => array(
748 748
         0 => '2',
749 749
       ),
750
-      'unflag' => array (
750
+      'unflag' => array(
751 751
         0 => '2',
752 752
       ),
753 753
     ),
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
     'reset_confirmation' => 'Are you sure you want to reset all flags on this user?',
761 761
     'status' => false,
762 762
     'show_on_teaser' => false,
763
-    'locked' => array (
763
+    'locked' => array(
764 764
       'name' => 'name',
765 765
       'global' => 'global',
766 766
     ),
@@ -769,14 +769,14 @@  discard block
 block discarded – undo
769 769
   );
770 770
 
771 771
   // Exported flag: "User Abuse 3".
772
-  $flags[] = array (
772
+  $flags[] = array(
773 773
     'content_type' => 'user',
774 774
     'name' => 'abuse_user_3',
775 775
     'title' => 'User Abuse 3',
776 776
     'global' => false,
777
-    'types' => array (
777
+    'types' => array(
778 778
     ),
779
-    'events' => array (
779
+    'events' => array(
780 780
       0 => 'flag',
781 781
       1 => 'unflag',
782 782
     ),
@@ -788,11 +788,11 @@  discard block
 block discarded – undo
788 788
     'unflag_message' => '',
789 789
     'unflag_denied_text' => '',
790 790
     'link_type' => 'confirm',
791
-    'roles' => array (
792
-      'flag' => array (
791
+    'roles' => array(
792
+      'flag' => array(
793 793
         0 => '2',
794 794
       ),
795
-      'unflag' => array (
795
+      'unflag' => array(
796 796
         0 => '2',
797 797
       ),
798 798
     ),
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
     'reset_confirmation' => 'Are you sure you want to reset all flags on this user?',
806 806
     'status' => false,
807 807
     'show_on_teaser' => false,
808
-    'locked' => array (
808
+    'locked' => array(
809 809
       'name' => 'name',
810 810
       'global' => 'global',
811 811
     ),
@@ -814,14 +814,14 @@  discard block
 block discarded – undo
814 814
   );
815 815
 
816 816
   // Exported flag: "User Abuse 4".
817
-  $flags[] = array (
817
+  $flags[] = array(
818 818
     'content_type' => 'user',
819 819
     'name' => 'abuse_user_4',
820 820
     'title' => 'User Abuse 4',
821 821
     'global' => false,
822
-    'types' => array (
822
+    'types' => array(
823 823
     ),
824
-    'events' => array (
824
+    'events' => array(
825 825
       0 => 'flag',
826 826
       1 => 'unflag',
827 827
     ),
@@ -833,11 +833,11 @@  discard block
 block discarded – undo
833 833
     'unflag_message' => '',
834 834
     'unflag_denied_text' => '',
835 835
     'link_type' => 'confirm',
836
-    'roles' => array (
837
-      'flag' => array (
836
+    'roles' => array(
837
+      'flag' => array(
838 838
         0 => '2',
839 839
       ),
840
-      'unflag' => array (
840
+      'unflag' => array(
841 841
         0 => '2',
842 842
       ),
843 843
     ),
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
     'reset_confirmation' => 'Are you sure you want to reset all flags on this user?',
851 851
     'status' => false,
852 852
     'show_on_teaser' => false,
853
-    'locked' => array (
853
+    'locked' => array(
854 854
       'name' => 'name',
855 855
       'global' => 'global',
856 856
     ),
Please login to merge, or discard this patch.
sites/default/boinc/modules/flag_abuse_reason/flag_abuse_reason.module 4 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 function flag_abuse_reason_views_api() {
31 31
   return array(
32 32
     'api' => 2.0,
33
-    'path' => drupal_get_path('module', 'flag_abuse_reason') . '/includes',
33
+    'path' => drupal_get_path('module', 'flag_abuse_reason').'/includes',
34 34
   );
35 35
 }
36 36
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
  * Here we change our flag event/action to 'reset'.
48 48
  */
49 49
 function flag_abuse_reason_preprocess_flag(&$vars) {
50
-  drupal_add_js(drupal_get_path('module', 'flag_abuse_reason') . "/includes/flag_abuse_reason.js");
51
-  drupal_add_css(drupal_get_path('module', 'flag_abuse_reason') . "/css/flag_abuse_reason.css");
50
+  drupal_add_js(drupal_get_path('module', 'flag_abuse_reason')."/includes/flag_abuse_reason.js");
51
+  drupal_add_css(drupal_get_path('module', 'flag_abuse_reason')."/css/flag_abuse_reason.css");
52 52
   $myuser = $vars['user'];
53 53
   $metaflags = array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta');
54 54
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
       // If there are flags on this content, clear the flags and
81 81
       // lock the content.
82 82
       if (user_access('reset abuse flags', $myuser)) {
83
-        if ($count>0) {
83
+        if ($count > 0) {
84 84
           $vars['action'] = 'reset';
85 85
           $vars['link_text'] = t('Clear Reports and Lock');
86 86
           $vars['link_title'] = t('Remove all flags on this content and prevent any new flagging.');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
   // Normal users may cancel their all their reported flags on this
153 153
   // content.
154 154
   else {
155
-    if ( ($event=='unflag') && (in_array($flag->name, $metaflags)) ) {
155
+    if (($event == 'unflag') && (in_array($flag->name, $metaflags))) {
156 156
       $allflags = flag_get_user_flags($flag->content_type, $content_id, $account->uid);
157 157
       foreach ($allflags as $subflag) {
158 158
         $myflag = flag_get_flag(NULL, $subflag->fid);
Please login to merge, or discard this patch.
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -16,29 +16,29 @@  discard block
 block discarded – undo
16 16
  */
17 17
 
18 18
 function flag_abuse_reason_flag_default_flags() {
19
-  $flags = array();
20
-  module_load_include('inc', 'flag_abuse_reason', 'includes/flag_abuse_reason.flag_default');
21
-  _flag_abuse_reason_abuse_node_flags($flags);
22
-  _flag_abuse_reason_abuse_comment_flags($flags);
23
-  _flag_abuse_reason_abuse_user_flags($flags);
24
-  return $flags;
19
+    $flags = array();
20
+    module_load_include('inc', 'flag_abuse_reason', 'includes/flag_abuse_reason.flag_default');
21
+    _flag_abuse_reason_abuse_node_flags($flags);
22
+    _flag_abuse_reason_abuse_comment_flags($flags);
23
+    _flag_abuse_reason_abuse_user_flags($flags);
24
+    return $flags;
25 25
 }
26 26
 
27 27
 /**
28 28
  * Implementation of hook_views_api().
29 29
  */
30 30
 function flag_abuse_reason_views_api() {
31
-  return array(
31
+    return array(
32 32
     'api' => 2.0,
33 33
     'path' => drupal_get_path('module', 'flag_abuse_reason') . '/includes',
34
-  );
34
+    );
35 35
 }
36 36
 
37 37
 /**
38 38
  * Implementation of hook_perm().
39 39
  */
40 40
 function flag_abuse_reason_perm() {
41
-  return array('reset abuse flags');
41
+    return array('reset abuse flags');
42 42
 }
43 43
 
44 44
 /**
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
  * Here we change our flag event/action to 'reset'.
48 48
  */
49 49
 function flag_abuse_reason_preprocess_flag(&$vars) {
50
-  drupal_add_js(drupal_get_path('module', 'flag_abuse_reason') . "/includes/flag_abuse_reason.js");
51
-  drupal_add_css(drupal_get_path('module', 'flag_abuse_reason') . "/css/flag_abuse_reason.css");
52
-  $myuser = $vars['user'];
53
-  $metaflags = array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta');
50
+    drupal_add_js(drupal_get_path('module', 'flag_abuse_reason') . "/includes/flag_abuse_reason.js");
51
+    drupal_add_css(drupal_get_path('module', 'flag_abuse_reason') . "/css/flag_abuse_reason.css");
52
+    $myuser = $vars['user'];
53
+    $metaflags = array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta');
54 54
 
55
-   // permmission check instead of a role
56
-  // Is this one of our abuse flags?
57
-  if (in_array($vars['flag']->name, $metaflags)) {
55
+    // permmission check instead of a role
56
+    // Is this one of our abuse flags?
57
+    if (in_array($vars['flag']->name, $metaflags)) {
58 58
 
59 59
     // count the number of flags on this content
60 60
     $count = db_result(db_query("SELECT COUNT(*) FROM {flag_content} WHERE content_id=%d AND fid=%d", $vars['content_id'], $vars['flag']->fid));
@@ -62,41 +62,41 @@  discard block
 block discarded – undo
62 62
     // If the variable <flagname>-<contentid> is set, then Reset
63 63
     // completely.
64 64
     if (variable_get($vars['flag']->name.'-'.$vars['content_id'], FALSE)) {
65
-      if (user_access('reset abuse flags', $myuser)) {
65
+        if (user_access('reset abuse flags', $myuser)) {
66 66
         $vars['action'] = 'none';
67 67
         $vars['link_text'] = t('Reset Completely');
68 68
         $vars['link_title'] = t('Reset everying, allows users to re-flag content.');
69
-      }
70
-      else {
69
+        }
70
+        else {
71 71
         $vars['action'] = 'none';
72 72
         $vars['link_text'] = t('Locked');
73 73
         $vars['link_title'] = t('Reporting locked by moderator.');
74 74
         $vars['link'] = array();
75 75
         $vars['link_href'] = '';
76 76
         $vars['flag_classes'] = 'flag style-like-link';
77
-      }
77
+        }
78 78
     }
79 79
     else {
80
-      // If there are flags on this content, clear the flags and
81
-      // lock the content.
82
-      if (user_access('reset abuse flags', $myuser)) {
80
+        // If there are flags on this content, clear the flags and
81
+        // lock the content.
82
+        if (user_access('reset abuse flags', $myuser)) {
83 83
         if ($count>0) {
84
-          $vars['action'] = 'reset';
85
-          $vars['link_text'] = t('Clear Reports and Lock');
86
-          $vars['link_title'] = t('Remove all flags on this content and prevent any new flagging.');
84
+            $vars['action'] = 'reset';
85
+            $vars['link_text'] = t('Clear Reports and Lock');
86
+            $vars['link_title'] = t('Remove all flags on this content and prevent any new flagging.');
87 87
         }
88 88
         // Otherwise the link is shown but has no effect.
89 89
         else {
90
-          $vars['action'] = 'none';
91
-          $vars['link_text'] = t('No abuse reports');
92
-          $vars['link_title'] = t('This content has no abuse reports. Link does nothing.');
90
+            $vars['action'] = 'none';
91
+            $vars['link_text'] = t('No abuse reports');
92
+            $vars['link_title'] = t('This content has no abuse reports. Link does nothing.');
93 93
         $vars['link'] = array();
94 94
         $vars['link_href'] = '';
95 95
         $vars['flag_classes'] = 'flag style-like-link';
96 96
         }
97
-      }
97
+        }
98
+    }
98 99
     }
99
-  }
100 100
 }
101 101
 
102 102
 /**
@@ -106,72 +106,72 @@  discard block
 block discarded – undo
106 106
  * we want to remove all flags. http://drupal.org/node/327901#comment-1085685
107 107
  */
108 108
 function flag_abuse_reason_flag($event, $flag, $content_id, $account) {
109
-  $metaflags = array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta');
109
+    $metaflags = array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta');
110 110
 
111
-  // For privileged users, check permissions and reset flags
112
-  // permission check instead of a role.
113
-  if (user_access('reset abuse flags', $account)) {
111
+    // For privileged users, check permissions and reset flags
112
+    // permission check instead of a role.
113
+    if (user_access('reset abuse flags', $account)) {
114 114
     // Is this one of our abuse flags?
115 115
     if (in_array($flag->name, $metaflags)) {
116 116
 
117
-      // Reset the flags completely.
118
-      if (variable_get($flag->name.'-'.$content_id, FALSE)) {
117
+        // Reset the flags completely.
118
+        if (variable_get($flag->name.'-'.$content_id, FALSE)) {
119 119
         // Since the user flags the content again, we need to unflag it.
120 120
         flag_reset_flag($flag, $content_id);
121 121
         drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), NULL, 'boinc:flag-abuse-reset'), 'info');
122 122
         // unlock flag; effectively resets flags for this content
123 123
         variable_del($flag->name.'-'.$content_id);
124
-      }
125
-      else {
124
+        }
125
+        else {
126 126
         // Clear and Lock all flags on this content.
127 127
         $dbresult = db_query("SELECT DISTINCT fid FROM {flag_content} WHERE content_id = %d", $content_id);
128 128
         $rows = 0;
129 129
         while ($myfid = db_fetch_array($dbresult)) {
130
-          $myflag = flag_get_flag(NULL, array_pop($myfid));
131
-          $rows += flag_reset_flag($myflag, $content_id);
130
+            $myflag = flag_get_flag(NULL, array_pop($myfid));
131
+            $rows += flag_reset_flag($myflag, $content_id);
132 132
         }
133 133
         if ($rows) {
134
-          // This user actually flags the content as well, so it may
135
-          // confuse the user if they reset what they thought was one
136
-          // flag and we report two.
137
-          $rows--;
138
-          drupal_set_message(bts('INFO: Cleared !rows flags. Content is now locked and may not be reflagged.', array('!rows' => $rows), NULL, 'boinc:flag-abuse-reset'), 'info');
139
-
140
-          // This is the line which sets a Drupal variable which
141
-          // prevents the flag link from showing again for all
142
-          // users. Effectively preventing the content from being
143
-          // flagged again.
144
-          variable_set($flag->name.'-'.$content_id, TRUE);
134
+            // This user actually flags the content as well, so it may
135
+            // confuse the user if they reset what they thought was one
136
+            // flag and we report two.
137
+            $rows--;
138
+            drupal_set_message(bts('INFO: Cleared !rows flags. Content is now locked and may not be reflagged.', array('!rows' => $rows), NULL, 'boinc:flag-abuse-reset'), 'info');
139
+
140
+            // This is the line which sets a Drupal variable which
141
+            // prevents the flag link from showing again for all
142
+            // users. Effectively preventing the content from being
143
+            // flagged again.
144
+            variable_set($flag->name.'-'.$content_id, TRUE);
145
+        }
145 146
         }
146
-      }
147 147
 
148 148
     }
149
-  }
150
-  // Normal users may cancel their all their reported flags on this
151
-  // content.
152
-  else {
149
+    }
150
+    // Normal users may cancel their all their reported flags on this
151
+    // content.
152
+    else {
153 153
     if ( ($event=='unflag') && (in_array($flag->name, $metaflags)) ) {
154
-      $allflags = flag_get_user_flags($flag->content_type, $content_id, $account->uid);
155
-      foreach ($allflags as $subflag) {
154
+        $allflags = flag_get_user_flags($flag->content_type, $content_id, $account->uid);
155
+        foreach ($allflags as $subflag) {
156 156
         $myflag = flag_get_flag(NULL, $subflag->fid);
157 157
         $rc = $myflag->flag('unflag', $content_id, $account);
158
-      }
158
+        }
159
+    }
159 160
     }
160
-  }
161 161
 }
162 162
 
163 163
 /**
164 164
  * Implementation of hook_form_FORM_ID_alter().
165 165
  */
166 166
 function flag_abuse_reason_form_flag_confirm_alter(&$form, &$form_state) {
167
-  // Permmission check instead of a role.
168
-  if (user_access('reset abuse flags', $account)) {
167
+    // Permmission check instead of a role.
168
+    if (user_access('reset abuse flags', $account)) {
169 169
     $flag_name = $form['flag_name']['#value'];
170 170
     // Is this one of our abuse flags?
171 171
     if (in_array($flag_name, array('abuse_node_meta', 'abuse_comment_meta', 'abuse_user_meta'))) {
172
-      drupal_set_title(t('Flag reset'));
173
-      $form['description']['#value'] = t('Are you sure you want to reset all offensive flag on this content? Once doing so, users will not be able to flag this content again.');
174
-      $form['actions']['submit']['#value'] = t('Reset flags');
172
+        drupal_set_title(t('Flag reset'));
173
+        $form['description']['#value'] = t('Are you sure you want to reset all offensive flag on this content? Once doing so, users will not be able to flag this content again.');
174
+        $form['actions']['submit']['#value'] = t('Reset flags');
175
+    }
175 176
     }
176
-  }
177 177
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
         $vars['action'] = 'none';
67 67
         $vars['link_text'] = t('Reset Completely');
68 68
         $vars['link_title'] = t('Reset everying, allows users to re-flag content.');
69
-      }
70
-      else {
69
+      } else {
71 70
         $vars['action'] = 'none';
72 71
         $vars['link_text'] = t('Locked');
73 72
         $vars['link_title'] = t('Reporting locked by moderator.');
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
         $vars['link_href'] = '';
76 75
         $vars['flag_classes'] = 'flag style-like-link';
77 76
       }
78
-    }
79
-    else {
77
+    } else {
80 78
       // If there are flags on this content, clear the flags and
81 79
       // lock the content.
82 80
       if (user_access('reset abuse flags', $myuser)) {
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
         drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), NULL, 'boinc:flag-abuse-reset'), 'info');
122 120
         // unlock flag; effectively resets flags for this content
123 121
         variable_del($flag->name.'-'.$content_id);
124
-      }
125
-      else {
122
+      } else {
126 123
         // Clear and Lock all flags on this content.
127 124
         $dbresult = db_query("SELECT DISTINCT fid FROM {flag_content} WHERE content_id = %d", $content_id);
128 125
         $rows = 0;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     // If the variable <flagname>-<contentid> is set, then Reset
63 63
     // completely.
64
-    if (variable_get($vars['flag']->name.'-'.$vars['content_id'], FALSE)) {
64
+    if (variable_get($vars['flag']->name.'-'.$vars['content_id'], false)) {
65 65
       if (user_access('reset abuse flags', $myuser)) {
66 66
         $vars['action'] = 'none';
67 67
         $vars['link_text'] = t('Reset Completely');
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
     if (in_array($flag->name, $metaflags)) {
116 116
 
117 117
       // Reset the flags completely.
118
-      if (variable_get($flag->name.'-'.$content_id, FALSE)) {
118
+      if (variable_get($flag->name.'-'.$content_id, false)) {
119 119
         // Since the user flags the content again, we need to unflag it.
120 120
         flag_reset_flag($flag, $content_id);
121
-        drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), NULL, 'boinc:flag-abuse-reset'), 'info');
121
+        drupal_set_message(bts('INFO: Reset everything. Users may reflag this content.', array(), null, 'boinc:flag-abuse-reset'), 'info');
122 122
         // unlock flag; effectively resets flags for this content
123 123
         variable_del($flag->name.'-'.$content_id);
124 124
       }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $dbresult = db_query("SELECT DISTINCT fid FROM {flag_content} WHERE content_id = %d", $content_id);
128 128
         $rows = 0;
129 129
         while ($myfid = db_fetch_array($dbresult)) {
130
-          $myflag = flag_get_flag(NULL, array_pop($myfid));
130
+          $myflag = flag_get_flag(null, array_pop($myfid));
131 131
           $rows += flag_reset_flag($myflag, $content_id);
132 132
         }
133 133
         if ($rows) {
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
           // confuse the user if they reset what they thought was one
136 136
           // flag and we report two.
137 137
           $rows--;
138
-          drupal_set_message(bts('INFO: Cleared !rows flags. Content is now locked and may not be reflagged.', array('!rows' => $rows), NULL, 'boinc:flag-abuse-reset'), 'info');
138
+          drupal_set_message(bts('INFO: Cleared !rows flags. Content is now locked and may not be reflagged.', array('!rows' => $rows), null, 'boinc:flag-abuse-reset'), 'info');
139 139
 
140 140
           // This is the line which sets a Drupal variable which
141 141
           // prevents the flag link from showing again for all
142 142
           // users. Effectively preventing the content from being
143 143
           // flagged again.
144
-          variable_set($flag->name.'-'.$content_id, TRUE);
144
+          variable_set($flag->name.'-'.$content_id, true);
145 145
         }
146 146
       }
147 147
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     if ( ($event=='unflag') && (in_array($flag->name, $metaflags)) ) {
154 154
       $allflags = flag_get_user_flags($flag->content_type, $content_id, $account->uid);
155 155
       foreach ($allflags as $subflag) {
156
-        $myflag = flag_get_flag(NULL, $subflag->fid);
156
+        $myflag = flag_get_flag(null, $subflag->fid);
157 157
         $rc = $myflag->flag('unflag', $content_id, $account);
158 158
       }
159 159
     }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.module 2 patches
Indentation   +840 added lines, -840 removed lines patch added patch discarded remove patch
@@ -27,44 +27,44 @@  discard block
 block discarded – undo
27 27
  * with defined URL paths
28 28
  */
29 29
 function boincuser_menu() {
30
-  $items['account/posts'] = array(
30
+    $items['account/posts'] = array(
31 31
     'title' => 'Recent posts',
32 32
     'description' => '',
33 33
     'page callback' => 'boincuser_goto_recent_posts',
34 34
     'access callback' => 'user_is_logged_in',
35 35
     'type' => MENU_CALLBACK,
36
-  );
37
-  $items['account/profile'] = array(
36
+    );
37
+    $items['account/profile'] = array(
38 38
     'title' => '',
39 39
     'description' => '',
40 40
     'page callback' => 'boincuser_view_profile',
41 41
     'access callback' => 'user_is_logged_in',
42 42
     'type' => MENU_NORMAL_ITEM
43
-  );
44
-  $items['account/profile/view'] = array(
43
+    );
44
+    $items['account/profile/view'] = array(
45 45
     'title' => 'View',
46 46
     'description' => 'Show a user profile',
47 47
     'page callback' => 'boincuser_view_profile',
48 48
     'access callback' => 'user_is_logged_in',
49 49
     'type' => MENU_DEFAULT_LOCAL_TASK,
50 50
     'weight' => 0
51
-  );
52
-  $items['account/profile/edit'] = array(
51
+    );
52
+    $items['account/profile/edit'] = array(
53 53
     'title' => 'Edit',
54 54
     'description' => 'Edit a user profile',
55 55
     'page callback' => 'boincuser_edit_profile',
56 56
     'access arguments' => array('edit own profile content'),
57 57
     'type' => MENU_LOCAL_TASK,
58 58
     'weight' => 5
59
-  );
60
-  $items['account/team'] = array(
59
+    );
60
+    $items['account/team'] = array(
61 61
     'title' => 'User team',
62 62
     'description' => '',
63 63
     'page callback' => 'boincuser_goto_team',
64 64
     'access callback' => 'user_is_logged_in',
65 65
     'type' => MENU_CALLBACK,
66
-  );
67
-  $items['moderate/profile/%user/approve'] = array(
66
+    );
67
+    $items['moderate/profile/%user/approve'] = array(
68 68
     'title' => 'Profile approval',
69 69
     'description' => 'Approve profile content',
70 70
     'page callback' => 'boincuser_moderate_profile_approve',
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
     'access arguments' => array('edit any profile content'),
73 73
     'type' => MENU_CALLBACK,
74 74
     'weight' => 5
75
-  );
76
-  $items['moderate/profile/%user/edit'] = array(
75
+    );
76
+    $items['moderate/profile/%user/edit'] = array(
77 77
     'title' => 'Profile editor',
78 78
     'description' => 'Edit a user profile',
79 79
     'page callback' => 'boincuser_edit_profile',
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
     'access arguments' => array('edit any profile content'),
82 82
     'type' => MENU_CALLBACK,
83 83
     'weight' => 5
84
-  );
85
-  $items['moderate/profile/%/reject'] = array(
84
+    );
85
+    $items['moderate/profile/%/reject'] = array(
86 86
     'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
87 87
     'description' => 'Reject profile content',
88 88
     'page callback' => 'drupal_get_form',
@@ -90,60 +90,60 @@  discard block
 block discarded – undo
90 90
     'access arguments' => array('edit any profile content'),
91 91
     'type' => MENU_CALLBACK,
92 92
     'weight' => 5
93
-  );
94
-  $items['moderate/user/%/ban'] = array(
93
+    );
94
+    $items['moderate/user/%/ban'] = array(
95 95
     'title' => bts('Ban user', array(), NULL, 'boinc:moderate-ban-user'),
96 96
     'description' => 'Ban a user from using community features',
97 97
     'page callback' => 'drupal_get_form',
98 98
     'page arguments' => array('boincuser_moderate_user_ban_form', 2),
99 99
     'access callback' => 'boincuser_moderate_community_access',
100 100
     'type' => MENU_CALLBACK,
101
-  );
102
-  $items['join'] = array(
101
+    );
102
+    $items['join'] = array(
103 103
     'title' => '',
104 104
     'description' => '',
105 105
     'page callback' => 'join_page',
106 106
     'access arguments' => array('access content'),
107 107
     'type' => MENU_NORMAL_ITEM
108
-  );
109
-  $items['join/new'] = array(
108
+    );
109
+    $items['join/new'] = array(
110 110
     'title' => bts("I'm new"),
111 111
     'page callback' => 'join_page',
112 112
     'page arguments' => array(1),
113 113
     'access arguments' => array('access content'),
114 114
     'type' => MENU_DEFAULT_LOCAL_TASK,
115 115
     'weight' => 0
116
-  );
117
-  $items['join/boinc'] = array(
116
+    );
117
+    $items['join/boinc'] = array(
118 118
     'title' => bts("I'm a BOINC user"),
119 119
     'page callback' => 'join_page',
120 120
     'page arguments' => array(1),
121 121
     'access arguments' => array('access content'),
122 122
     'type' => MENU_LOCAL_TASK,
123 123
     'weight' => 5
124
-  );
125
-  $items['user/login/auth'] = array(
124
+    );
125
+    $items['user/login/auth'] = array(
126 126
     'title' => bts('Authenticator login', array(), NULL, 'boinc:authenticator-login-page'),
127 127
     'description' => 'Log in using a user authenticator',
128 128
     'page callback' => 'drupal_get_form',
129 129
     'page arguments' => array('boincuser_authloginform'),
130 130
     'access arguments' => array('access content'),
131 131
     'type' => MENU_CALLBACK,
132
-  );
133
-  $items['user/termsofuse'] = array(
132
+    );
133
+    $items['user/termsofuse'] = array(
134 134
     'title' => bts('Terms of Use', array(), NULL, 'boinc:termsofuse-form'),
135 135
     'description' => 'A site\'s term of use.',
136 136
     'page callback' => 'drupal_get_form',
137 137
     'page arguments' => array('boincuser_termsofuse_form'),
138 138
     'access callback' => 'user_is_logged_in',
139 139
     'type' => MENU_CALLBACK,
140
-  );
141
-  $items['user_control'] = array(
140
+    );
141
+    $items['user_control'] = array(
142 142
     'page callback' => 'boincuser_control',
143 143
     'access arguments' => array('access user profiles'),
144 144
     'type' => MENU_CALLBACK
145
-  );
146
-  $items['admin/boinc'] = array(
145
+    );
146
+    $items['admin/boinc'] = array(
147 147
     'title' => 'BOINC configuration',
148 148
     'position' => 'right',
149 149
     'weight' => -8,
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
     'access arguments' => array('administer site configuration'),
152 152
     'file' => 'system.admin.inc',
153 153
     'file path' => drupal_get_path('module', 'system'),
154
-  );
155
-  $items['admin/boinc/environment'] = array(
154
+    );
155
+    $items['admin/boinc/environment'] = array(
156 156
     'title' => 'Environment: General',
157 157
     'description' => 'Set paths to BOINC functions and any other necessary
158 158
       variables that establish a BOINC environment.',
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
     'access arguments' => array('administer site configuration'),
162 162
     'type' => MENU_NORMAL_ITEM,
163 163
     'file' => 'boincuser.admin.inc'
164
-  );
165
-  $items['admin/boinc/scheduler'] = array(
164
+    );
165
+    $items['admin/boinc/scheduler'] = array(
166 166
     'title' => 'Environment: Scheduling server URLs',
167 167
     'description' => 'Set BOINC scheduler options.',
168 168
     'page callback' => 'drupal_get_form',
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
     'access arguments' => array('administer site configuration'),
171 171
     'type' => MENU_NORMAL_ITEM,
172 172
     'file' => 'boincuser.admin.inc'
173
-  );
174
-  $items['admin/boinc/weboptions'] = array(
173
+    );
174
+    $items['admin/boinc/weboptions'] = array(
175 175
     'title' => 'Environment: Website Options',
176 176
     'description' => 'Set options configuring this Drupal-BOINC Web site.',
177 177
     'page callback' => 'drupal_get_form',
@@ -179,117 +179,117 @@  discard block
 block discarded – undo
179 179
     'access arguments' => array('administer site configuration'),
180 180
     'type' => MENU_NORMAL_ITEM,
181 181
     'file' => 'boincuser.admin.inc'
182
-  );
182
+    );
183 183
   
184
-  $items['create_account.php'] = array(
184
+    $items['create_account.php'] = array(
185 185
     'title' => 'Create Account RPC',
186 186
     'description' => 'RPC for creating user accounts.',
187 187
     'page callback' => 'boincuser_create_account',
188 188
     'access callback' => TRUE,
189 189
     'type' => MENU_CALLBACK
190
-  );
191
-  $items['account_finish.php'] = array(
190
+    );
191
+    $items['account_finish.php'] = array(
192 192
     'title' => 'Welcome to ' . variable_get('site_name', 'Drupal-BOINC'),
193 193
     'description' => 'RPC for after a user has created an account.',
194 194
     'page callback' => 'boincuser_account_finish',
195 195
     'access callback' => TRUE,
196 196
     'type' => MENU_CALLBACK,
197
-  );
198
-  $items['boincuser/autocomplete'] = array(
197
+    );
198
+    $items['boincuser/autocomplete'] = array(
199 199
     'page callback' => '_boincuser_user_name_autocomplete',
200 200
     'access callback' => TRUE,
201 201
     'type' => MENU_CALLBACK,
202
-  );
203
-  $items['user/%user/recoveremail/%'] = array(
202
+    );
203
+    $items['user/%user/recoveremail/%'] = array(
204 204
     'title' => t('Recover previous email'),
205 205
     'description' => t('Form to revert email to previous address.'),
206 206
     'page callback' => 'drupal_get_form',
207 207
     'page arguments' => array('boincuser_revertemail', 3),
208 208
     'access callback' => 'user_is_logged_in',
209 209
     'type' => MENU_CALLBACK,
210
-  );
211
-  $items['recover_email.php'] = array(
210
+    );
211
+    $items['recover_email.php'] = array(
212 212
     'title' => t('Recover previous email'),
213 213
     'description' => t('redirect'),
214 214
     'page callback' => '_boincuser_redirect_recover_email',
215 215
     'access callback' => TRUE,
216 216
     'type' => MENU_CALLBACK,
217
-  );
218
-  return $items;
217
+    );
218
+    return $items;
219 219
 }
220 220
 
221 221
 /**
222 222
  * Implementation of hook_init()
223 223
  */
224 224
 function boincuser_init() {
225
-  global $user;
226
-  // Skip this check for charts, which are loaded separately
227
-  // (may get duplicate or unexpected messages otherwise)
228
-  if (substr($_GET['q'], 0, 7) == 'charts/') {
225
+    global $user;
226
+    // Skip this check for charts, which are loaded separately
227
+    // (may get duplicate or unexpected messages otherwise)
228
+    if (substr($_GET['q'], 0, 7) == 'charts/') {
229 229
     return;
230
-  }
230
+    }
231 231
 
232
-  // If admin user, do some basic site functionality checks
233
-  if (user_access('administer site configuration')) {
232
+    // If admin user, do some basic site functionality checks
233
+    if (user_access('administer site configuration')) {
234 234
     // Ensure we have a configured BOINC environment
235 235
     boinc_get_path();
236 236
     boinc_get_scheduler_tags();
237
-  }
237
+    }
238 238
   
239
-  // Check credits for the verified contributor role
240
-  boincuser_check_credit_requirements();
239
+    // Check credits for the verified contributor role
240
+    boincuser_check_credit_requirements();
241 241
   
242
-  if (module_exists('boincteam')) {
242
+    if (module_exists('boincteam')) {
243 243
     // Display any persistent team messages
244 244
     boincteam_show_messages();
245
-  }
245
+    }
246 246
 
247
-  // Check if user has agreed to the terms of use. If not, send the
248
-  // user to the terms-of-use form. This is only makes sense if the
249
-  // termsofuse is enabled, by having text in the termsofuse variable.
250
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
-  if ( (!empty($termsofuse)) and ($user->uid) ) {
247
+    // Check if user has agreed to the terms of use. If not, send the
248
+    // user to the terms-of-use form. This is only makes sense if the
249
+    // termsofuse is enabled, by having text in the termsofuse variable.
250
+    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
+    if ( (!empty($termsofuse)) and ($user->uid) ) {
253 253
     if ( !boincuser_check_termsofuse($user) and ($existinguser_tou) ) {
254 254
 
255
-      // Admins are exempt, otherwise the admin may not be able to
256
-      // access the site!
257
-      $administrator_role = array_search('administrator', user_roles(true));
258
-      if (!isset($user->roles[$administrator_role])) {
255
+        // Admins are exempt, otherwise the admin may not be able to
256
+        // access the site!
257
+        $administrator_role = array_search('administrator', user_roles(true));
258
+        if (!isset($user->roles[$administrator_role])) {
259 259
         $path = drupal_get_path_alias($_GET['q']);
260 260
 
261 261
         // Any paths that should NOT be redirected go here.
262 262
         // The site will not function correctly if these are not exempt!
263 263
         $paths0 = array(
264
-          'user/termsofuse',
265
-          'logout',
266
-          'account/info/edit',
267
-          'user/' . $user->uid . '/edit',
268
-          'user/' . $user->uid . '/recoveremail/*',
269
-          'recover_email.php',
264
+            'user/termsofuse',
265
+            'logout',
266
+            'account/info/edit',
267
+            'user/' . $user->uid . '/edit',
268
+            'user/' . $user->uid . '/recoveremail/*',
269
+            'recover_email.php',
270 270
         );
271 271
         if (module_exists('boincuser_delete')) {
272
-          $paths0[] = 'user/' . $user->uid . '/delete';
273
-          $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
-          $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
272
+            $paths0[] = 'user/' . $user->uid . '/delete';
273
+            $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
+            $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
275 275
         }
276 276
 
277 277
         // Paths added by the admin
278 278
         $paths1 = preg_split('/\r\n|\r|\n/', variable_get('boinc_weboptions_pathstoignore', "moderation\ncontent/moderation\nprivacy"));
279 279
         $paths2 = array();
280 280
         if (is_array($paths1)) {
281
-          $paths2 = array_map('strtolower', $paths1);
281
+            $paths2 = array_map('strtolower', $paths1);
282 282
         }
283 283
 
284 284
         // paths to ignore
285 285
         $paths_to_ignore = array_unique( array_merge($paths0, $paths2) );
286 286
 
287 287
         if (!_boincuser_ignore_paths($path, $paths_to_ignore)) {
288
-          drupal_goto('user/termsofuse');
288
+            drupal_goto('user/termsofuse');
289
+        }
289 290
         }
290
-      }
291 291
     }
292
-  }
292
+    }
293 293
 }
294 294
 
295 295
 /**
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
  * Drupal user operations
298 298
  */
299 299
 function boincuser_user($op, &$edit, &$account, $category = NULL) {
300
-  require_boinc('boinc_db');
301
-  require_boinc('user');
302
-  require_boinc('xml');
300
+    require_boinc('boinc_db');
301
+    require_boinc('user');
302
+    require_boinc('xml');
303 303
 
304
-  require_boinc('password_compat/password');
305
-  // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306
-  if (isset($account->uid) && ($account->uid > 1)) {
304
+    require_boinc('password_compat/password');
305
+    // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306
+    if (isset($account->uid) && ($account->uid > 1)) {
307 307
     switch($op) {
308 308
     case 'load':
309 309
       // User loading; insert BOINC data into the user object
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
         SELECT boinc_id, penalty_expiration
312 312
         FROM {boincuser} WHERE uid = %d",
313 313
         $account->uid
314
-      ));
315
-      $account->boincuser_id = $drupal_user->boinc_id;
316
-      $account->boincuser_penalty_expiration = $drupal_user->penalty_expiration;
317
-      db_set_active('boinc_rw');
318
-      $boinc_user = db_fetch_object(db_query("
314
+        ));
315
+        $account->boincuser_id = $drupal_user->boinc_id;
316
+        $account->boincuser_penalty_expiration = $drupal_user->penalty_expiration;
317
+        db_set_active('boinc_rw');
318
+        $boinc_user = db_fetch_object(db_query("
319 319
         SELECT
320 320
           name,
321 321
           authenticator,
@@ -331,29 +331,29 @@  discard block
 block discarded – undo
331 331
         FROM {user}
332 332
         WHERE id = %d",
333 333
         $account->boincuser_id
334
-      ));
335
-      $account->boincuser_name = $boinc_user->name;
336
-      $account->boincuser_account_key = $boinc_user->authenticator;
337
-      $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
338
-      $account->boincuser_total_credit = round($boinc_user->total_credit);
339
-      $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340
-      $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
-      $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
342
-      $account->boincuser_default_pref_set = $boinc_user->venue;
343
-      $account->boincteam_id = $boinc_user->teamid;
344
-      $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
345
-      $account->boincuser_email_addr_change_time = $boinc_user->email_addr_change_time;
346
-      db_set_active('default');
347
-      // Set Drupal team ID
348
-      $account->team = NULL;
349
-      if ($account->boincteam_id) {
334
+        ));
335
+        $account->boincuser_name = $boinc_user->name;
336
+        $account->boincuser_account_key = $boinc_user->authenticator;
337
+        $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
338
+        $account->boincuser_total_credit = round($boinc_user->total_credit);
339
+        $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340
+        $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
+        $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
342
+        $account->boincuser_default_pref_set = $boinc_user->venue;
343
+        $account->boincteam_id = $boinc_user->teamid;
344
+        $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
345
+        $account->boincuser_email_addr_change_time = $boinc_user->email_addr_change_time;
346
+        db_set_active('default');
347
+        // Set Drupal team ID
348
+        $account->team = NULL;
349
+        if ($account->boincteam_id) {
350 350
         $account->team = db_result(db_query("
351 351
           SELECT nid FROM {boincteam} WHERE team_id = %d",
352
-          $account->boincteam_id
352
+            $account->boincteam_id
353 353
         ));
354
-      }
355
-      // Set post count
356
-      $account->post_count = db_result(db_query("
354
+        }
355
+        // Set post count
356
+        $account->post_count = db_result(db_query("
357 357
         SELECT COUNT(*) +
358 358
         (
359 359
           SELECT COUNT(*) FROM {node}
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
         WHERE comments.uid = '%d'
367 367
         AND node.status = 1",
368 368
         $account->uid, $account->uid
369
-      ));
370
-      break;
369
+        ));
370
+        break;
371 371
       
372 372
     case 'view':
373 373
       // SAMPLE: Add BOINC data to the user profile
@@ -393,74 +393,74 @@  discard block
 block discarded – undo
393 393
         case 'user_account':
394 394
           // Validate data before updating user account info
395 395
           boincuser_account_validate($edit, $account);
396
-          break;
396
+            break;
397 397
         
398 398
         default:
399 399
           
400 400
         }
401 401
         // We don't want to save validation source, so remove it
402 402
         $edit['validation_source'] = null;
403
-      }
404
-      break;
403
+        }
404
+        break;
405 405
       
406 406
     case 'insert':
407 407
       // New user being added to the system
408 408
       $imported = $_SESSION['importedUser'];
409
-      unset($_SESSION['importedUser']);
409
+        unset($_SESSION['importedUser']);
410 410
       
411
-      watchdog(
411
+        watchdog(
412 412
         'boincuser',
413 413
         'Creating user account for %email_addr',
414 414
         array('%email_addr' => $edit['mail']),
415 415
         WATCHDOG_NOTICE
416
-      );
416
+        );
417 417
       
418
-      // The create_acount RPC will call this block of code when
419
-      // user_save() is used. If user is registering using the Web
420
-      // registration form, create a BOINC user and relationships.
421
-      // Create a BOINC account unless importing from BOINC.
422
-      if (!$imported) {
418
+        // The create_acount RPC will call this block of code when
419
+        // user_save() is used. If user is registering using the Web
420
+        // registration form, create a BOINC user and relationships.
421
+        // Create a BOINC account unless importing from BOINC.
422
+        if (!$imported) {
423 423
 
424 424
         // set email address lower-case
425 425
         $lower_email_addr = strtolower($edit['mail']);
426 426
 
427 427
         if ($edit['boincuser_name']) {
428
-          $myname = $edit['boincuser_name'];
428
+            $myname = $edit['boincuser_name'];
429 429
         }
430 430
         else if ($edit['name']) {
431
-          $myname = $edit['name'];
431
+            $myname = $edit['name'];
432 432
         }
433 433
         else {
434
-          $myname = 'noname';
434
+            $myname = 'noname';
435 435
         }
436 436
 
437 437
         $user_params = array(
438
-          'email_addr' => $lower_email_addr,
439
-          'name' => $myname,
438
+            'email_addr' => $lower_email_addr,
439
+            'name' => $myname,
440 440
         );
441 441
 
442 442
         // If the 'pass' variable is already a hash, then don't hash it again.
443 443
         if ($edit['boinchash_flag']) {
444
-          $user_params['passwd_hash'] = $edit['pass'];
444
+            $user_params['passwd_hash'] = $edit['pass'];
445 445
         }
446 446
         else {
447
-          // The passwd_hash here is only the md5() hash. This is
448
-          // because BOINC make_user(), called later, will run
449
-          // password_hash() on this md5 hash.
450
-          $user_params['passwd_hash'] = md5($edit['pass'].$lower_email_addr);
447
+            // The passwd_hash here is only the md5() hash. This is
448
+            // because BOINC make_user(), called later, will run
449
+            // password_hash() on this md5 hash.
450
+            $user_params['passwd_hash'] = md5($edit['pass'].$lower_email_addr);
451 451
         }
452 452
 
453 453
         $boinc_user = boincuser_register_make_user($user_params);
454 454
         if (!$boinc_user) {
455
-          // Account exists with this email addr
456
-          form_set_error('email', bts('Error creating BOINC account.', array(), NULL, 'boinc:add-new-user'));
457
-          return;
455
+            // Account exists with this email addr
456
+            form_set_error('email', bts('Error creating BOINC account.', array(), NULL, 'boinc:add-new-user'));
457
+            return;
458 458
         }
459 459
 
460 460
         // Add user to community role by default (not banned)
461 461
         $unrestricted_role = array_search('community member', user_roles(true)); 
462 462
         $edit['roles'] = array(
463
-          $unrestricted_role => ''
463
+            $unrestricted_role => ''
464 464
         );
465 465
 
466 466
         // Disable show_hosts flag, set to TRUE by default
@@ -471,14 +471,14 @@  discard block
 block discarded – undo
471 471
         // Cross reference Drupal account with BOINC
472 472
         $reference = db_query("INSERT INTO {boincuser} SET uid='%d', boinc_id='%d'", $account->uid, $boinc_user->id);
473 473
         if (!$reference) {
474
-          drupal_set_message(t('Error connecting BOINC account.'), 'error');
475
-          return;
474
+            drupal_set_message(t('Error connecting BOINC account.'), 'error');
475
+            return;
476 476
         }
477 477
 
478 478
         // if terms of use exist, the user must agree.
479 479
         $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
480 480
         if (!empty($termsofuse)) {
481
-          $reference2 = boincuser_consentto_termsofuse($account);
481
+            $reference2 = boincuser_consentto_termsofuse($account);
482 482
         }
483 483
 
484 484
         // Don't save custom fields to the Drupal user object
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
         $edit['boinchash_flag'] = null;
487 487
         // Set email address to lower case in Drupal users table
488 488
         if ($account) {
489
-          user_save($account, array('mail' => $lower_email_addr));
489
+            user_save($account, array('mail' => $lower_email_addr));
490 490
         }
491
-      }
492
-      break;
491
+        }
492
+        break;
493 493
       
494 494
     case 'update':
495 495
       if (isset($edit['update_source'])) {
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
           // Ensure that BOINC data is altered
501 501
 
502 502
           $changing_email = ($edit['mail'] AND $edit['mail'] != $boinc_user->email_addr) ? true : false;
503
-          $changing_pass = ($edit['pass']) ? true : false;
504
-          if ($changing_email OR $changing_pass) {
503
+            $changing_pass = ($edit['pass']) ? true : false;
504
+            if ($changing_email OR $changing_pass) {
505 505
             // set email address to lower-case
506 506
             $lower_email_addr = strtolower($edit['mail']);
507 507
 
@@ -510,70 +510,70 @@  discard block
 block discarded – undo
510 510
             $passwd_hash = password_hash( md5($passwd.$lower_email_addr), PASSWORD_DEFAULT );
511 511
             // Algorithm for changing email and/or password
512 512
             if ($changing_email) {
513
-              // locally store current email to set as previous email
514
-              $prev_email = $account->mail;
515
-              $mytime = (user_access('administer users')) ? $boinc_user->email_addr_change_time : time();
516
-              $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}', previous_email_addr = '{$prev_email}', email_addr_change_time = $mytime";
513
+                // locally store current email to set as previous email
514
+                $prev_email = $account->mail;
515
+                $mytime = (user_access('administer users')) ? $boinc_user->email_addr_change_time : time();
516
+                $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}', previous_email_addr = '{$prev_email}', email_addr_change_time = $mytime";
517 517
             }
518 518
             else {
519
-              $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}'";
519
+                $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}'";
520 520
             }
521 521
 
522 522
             // Update user account information
523 523
             $result = $boinc_user->update($querypart);
524 524
 
525 525
             if ($changing_email) {
526
-              // reload account
527
-              $account = user_load($account->uid);
528
-              _boincuser_send_emailchange($account, $lower_email_addr, $prev_email, user_access('administer users'));
526
+                // reload account
527
+                $account = user_load($account->uid);
528
+                _boincuser_send_emailchange($account, $lower_email_addr, $prev_email, user_access('administer users'));
529 529
             }
530 530
 
531 531
             // Change email to edit to lower-case version, this sets
532 532
             // email in Drupal database to the lower-case email
533 533
             // address.
534 534
             $edit['mail'] = strtolower($lower_email_addr);
535
-          }
535
+            }
536 536
 
537
-          // Change boinc username
538
-          if ($edit['boincuser_name'] and ($edit['boincuser_name'] != $boinc_user->name)) {
537
+            // Change boinc username
538
+            if ($edit['boincuser_name'] and ($edit['boincuser_name'] != $boinc_user->name)) {
539 539
             $boincuser_name = $edit['boincuser_name'];
540 540
             $result = $boinc_user->update(
541 541
                 "name='{$boincuser_name}'"
542 542
             );
543
-          }
543
+            }
544 544
 
545
-          break;
545
+            break;
546 546
         case 'user_profile':
547 547
           if ($edit['boincuser_name'] != $boinc_user->name) {
548 548
             $boincuser_name = $edit['boincuser_name'];
549 549
             $result = $boinc_user->update(
550 550
                 "name='{$boincuser_name}'"
551 551
             );
552
-          }
553
-          break;
552
+            }
553
+            break;
554 554
         default:
555 555
         }
556 556
         // We don't want to save update source or duplicate custom fields, so
557 557
         // remove them before continuing to core Drupal routines
558 558
         $edit['update_source'] = null;
559 559
         $edit['boincuser_name'] = null;
560
-      }
561
-      break;
560
+        }
561
+        break;
562 562
 
563 563
     case 'login':
564 564
       // Function is forward compatible to Drupal 7
565 565
       boincuser_user_login($edit, $account);
566
-      break;
566
+        break;
567 567
 
568 568
     case 'delete':
569 569
       // Function is forward compatible to Drupal 7
570 570
       boincuser_user_delete($account);
571
-      break;
571
+        break;
572 572
 
573 573
     default:
574 574
       
575 575
     }
576
-  }
576
+    }
577 577
 }
578 578
 
579 579
 /**
@@ -582,39 +582,39 @@  discard block
 block discarded – undo
582 582
  *(forward compatible to Drupal 7).
583 583
  */
584 584
 function boincuser_user_login(&$edit, $account) {
585
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
586
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
587
-
588
-  // Use the same code as boincuser_form_alter(), for case
589
-  // 'user_profile_form', if the refering page is the user password
590
-  // reset form, then do not check for terms of use.
591
-  $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === FALSE) ? 0 : 1;
592
-  if ($reset_pass) {
585
+    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
586
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
587
+
588
+    // Use the same code as boincuser_form_alter(), for case
589
+    // 'user_profile_form', if the refering page is the user password
590
+    // reset form, then do not check for terms of use.
591
+    $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === FALSE) ? 0 : 1;
592
+    if ($reset_pass) {
593 593
     return;
594
-  }
594
+    }
595 595
 
596
-  // Check if user has agreed to terms of use.
597
-  if ( (!empty($termsofuse)) and ($account->uid) and 
596
+    // Check if user has agreed to terms of use.
597
+    if ( (!empty($termsofuse)) and ($account->uid) and 
598 598
        (!boincuser_check_termsofuse($account)) and ($existinguser_tou) ) {
599 599
 
600 600
     // Admins are exempted.
601 601
     $administrator_role = array_search('administrator', user_roles(true));
602 602
     if (!isset($account->roles[$administrator_role])) {
603 603
 
604
-      // Find and save the current destination and use as an parameter
605
-      // to send the user back to here he/she came from.
606
-      $np = ltrim('user/termsofuse', '/');
607
-      $path_for_destination = rawurlencode($np);
604
+        // Find and save the current destination and use as an parameter
605
+        // to send the user back to here he/she came from.
606
+        $np = ltrim('user/termsofuse', '/');
607
+        $path_for_destination = rawurlencode($np);
608 608
 
609
-      $query_for_destination = '';
610
-      $prevdest = $_REQUEST['destination'];
611
-      if ($prevdest) {
609
+        $query_for_destination = '';
610
+        $prevdest = $_REQUEST['destination'];
611
+        if ($prevdest) {
612 612
         $query_for_destination = '?destination=' . $prevdest;
613
-      }
614
-      $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
613
+        }
614
+        $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
615 615
 
616 616
     }
617
-  }
617
+    }
618 618
 }
619 619
 
620 620
 /**
@@ -623,16 +623,16 @@  discard block
 block discarded – undo
623 623
  */
624 624
 function boincuser_user_delete($account) {
625 625
 
626
-  $boincid = $account->boincuser_id;
627
-  // bug in comment module, remove user name from comments. Find all
628
-  // comments with uid=0 and clear the field 'name'.
629
-  $qrc1 = db_query("UPDATE {comments} SET comments.name='' WHERE comments.uid=0");
626
+    $boincid = $account->boincuser_id;
627
+    // bug in comment module, remove user name from comments. Find all
628
+    // comments with uid=0 and clear the field 'name'.
629
+    $qrc1 = db_query("UPDATE {comments} SET comments.name='' WHERE comments.uid=0");
630 630
 
631
-  // Delete entry in drupal boincuser table.
632
-  $qrc2 = db_query("DELETE FROM {boincuser} WHERE uid=%d", $account->uid);
633
-  if (!$qrc2) {
631
+    // Delete entry in drupal boincuser table.
632
+    $qrc2 = db_query("DELETE FROM {boincuser} WHERE uid=%d", $account->uid);
633
+    if (!$qrc2) {
634 634
     watchdog('user', 'Error deleting user account, boincuser table UID: %uid.', array('%uid' => $account->uid), WATCHDOG_ERROR);
635
-  }
635
+    }
636 636
 }
637 637
 
638 638
 
@@ -641,13 +641,13 @@  discard block
 block discarded – undo
641 641
  * Obsolete in Drupal 7...
642 642
  */
643 643
 function boincuser_nodeapi(&$node, $op, $a3 = null, $a4 = null) {
644
-  // In Drupal 7, these operation cases will all exist as their own hooks,
645
-  // so let's approximate that here so that this function can simply be removed
646
-  // upon migration to 7
647
-  switch($op) {
648
-  case 'update':
644
+    // In Drupal 7, these operation cases will all exist as their own hooks,
645
+    // so let's approximate that here so that this function can simply be removed
646
+    // upon migration to 7
647
+    switch($op) {
648
+    case 'update':
649 649
     boincuser_node_update($node);
650
-  }
650
+    }
651 651
 }
652 652
 
653 653
 /**
@@ -655,8 +655,8 @@  discard block
 block discarded – undo
655 655
  * is updated (forward compatible to Drupal 7)
656 656
  */
657 657
 function boincuser_node_update($node) {
658
-  switch($node->type) {
659
-  case 'profile':
658
+    switch($node->type) {
659
+    case 'profile':
660 660
     // Update the BOINC database directly
661 661
     $account = user_load($node->uid);
662 662
     // Save user account data
@@ -668,11 +668,11 @@  discard block
 block discarded – undo
668 668
       UPDATE user
669 669
       SET country = '%s', postal_code = '%s', url = '%s', has_profile = 1
670 670
       WHERE id = %d",
671
-      $country, $postal_code, $url, $account->boincuser_id
671
+        $country, $postal_code, $url, $account->boincuser_id
672 672
     );
673 673
     db_set_active('default');
674 674
     if (!$account_updated) {
675
-      drupal_set_message(t('Error saving BOINC account info.'), 'error');
675
+        drupal_set_message(t('Error saving BOINC account info.'), 'error');
676 676
     }
677 677
     // Save profile data
678 678
     $response1 = $node->field_background[0]['value'];
@@ -683,16 +683,16 @@  discard block
 block discarded – undo
683 683
       SET userid = %d, response1 = '%s', response2 = '%s'
684 684
       ON DUPLICATE KEY UPDATE
685 685
         response1 = '%s', response2 = '%s'",
686
-      $account->boincuser_id, $response1, $response2,
687
-      $response1, $response2
686
+        $account->boincuser_id, $response1, $response2,
687
+        $response1, $response2
688 688
     );
689 689
     db_set_active('default');
690 690
     if (!$profile_updated) {
691
-      drupal_set_message(t('Error saving BOINC profile.'), 'error');
691
+        drupal_set_message(t('Error saving BOINC profile.'), 'error');
692 692
     }
693 693
     break;
694 694
     
695
-  default:
695
+    default:
696 696
     
697 697
   }
698 698
 }
@@ -701,21 +701,21 @@  discard block
 block discarded – undo
701 701
 * Implementation of hook_views_api()
702 702
 */
703 703
 function boincuser_views_api() {
704
-  return array(
704
+    return array(
705 705
     'api' => 2.0,
706 706
     'path' => drupal_get_path('module', 'boincuser')
707
-  );
707
+    );
708 708
 }
709 709
 
710 710
 /**
711 711
 * Implementation of hook_form_alter()
712 712
 */
713 713
 function boincuser_form_alter(&$form, $form_state, $form_id) {
714
-  require_boinc('token');
714
+    require_boinc('token');
715 715
 
716
-  global $user;
717
-  switch ($form_id) {
718
-  case 'flag_confirm':
716
+    global $user;
717
+    switch ($form_id) {
718
+    case 'flag_confirm':
719 719
     // The URL seems to be the only way to put any kind of context to this
720 720
     // request!
721 721
     $action = arg(2);
@@ -724,25 +724,25 @@  discard block
 block discarded – undo
724 724
     
725 725
     // Wrap action buttons for styling consistency
726 726
     $form['form control tabs prefix'] = array(
727
-      '#value' => '<ul class="form-control tab-list">',
728
-      '#weight' => 1001,
727
+        '#value' => '<ul class="form-control tab-list">',
728
+        '#weight' => 1001,
729 729
     );
730 730
     
731 731
     switch ($flag_type) {
732 732
     case 'friend':
733 733
       $friend_id = $form['content_id']['#value'];
734
-      $flag = flag_get_flag('friend');
735
-      $friend_status = flag_friend_determine_friend_status($flag, $friend_id, $user->uid);
734
+        $flag = flag_get_flag('friend');
735
+        $friend_status = flag_friend_determine_friend_status($flag, $friend_id, $user->uid);
736 736
       
737
-      // General friend form overrides
738
-      $form['flag_friend_submit']['#prefix'] = '<li class="first tab">';
739
-      $form['flag_friend_submit']['#value'] = bts('Send request', array(), NULL, 'boinc:friends-page');
740
-      $form['flag_friend_submit']['#type'] = 'submit';
741
-      $form['flag_friend_submit']['#suffix'] = '</li>';
742
-      $form['flag_friend_submit']['#weight'] = 1002;
737
+        // General friend form overrides
738
+        $form['flag_friend_submit']['#prefix'] = '<li class="first tab">';
739
+        $form['flag_friend_submit']['#value'] = bts('Send request', array(), NULL, 'boinc:friends-page');
740
+        $form['flag_friend_submit']['#type'] = 'submit';
741
+        $form['flag_friend_submit']['#suffix'] = '</li>';
742
+        $form['flag_friend_submit']['#weight'] = 1002;
743 743
       
744
-      switch ($friend_status) {
745
-      case FLAG_FRIEND_BOTH:
744
+        switch ($friend_status) {
745
+        case FLAG_FRIEND_BOTH:
746 746
       case FLAG_FRIEND_FLAGGED:
747 747
         unset($form['actions']);
748 748
         $form['flag_friend_submit']['#value'] = bts('Remove friend', array(), NULL, 'boinc:friends-remove');
@@ -751,53 +751,53 @@  discard block
 block discarded – undo
751 751
         $form['#submit'][] = 'boincuser_fix_unfriend_form_submit';
752 752
         $form['#submit'][] = $final_handler;
753 753
         break;
754
-      case FLAG_FRIEND_PENDING:
754
+        case FLAG_FRIEND_PENDING:
755 755
         unset($form['actions']);
756 756
         $form['flag_friend_submit']['#value'] = bts('Remove request', array(), NULL, 'boinc:friends-page');
757 757
         break;
758
-      case FLAG_FRIEND_APPROVAL:
758
+        case FLAG_FRIEND_APPROVAL:
759 759
         if ($action == 'flag') {
760
-          $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
760
+            $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
761 761
         }
762 762
         elseif ($action == 'unflag') {
763
-          unset($form['actions']);
764
-          $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
763
+            unset($form['actions']);
764
+            $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
765 765
         }
766 766
         break;
767
-      case FLAG_FRIEND_UNFLAGGED:
767
+        case FLAG_FRIEND_UNFLAGGED:
768 768
       default:
769 769
         $user_links[] = array(
770
-          'title' => bts('Add as friend', array(), NULL, 'boinc:friends-add'),
771
-          'href' => "flag/confirm/flag/friend/{$account->uid}"
770
+            'title' => bts('Add as friend', array(), NULL, 'boinc:friends-add'),
771
+            'href' => "flag/confirm/flag/friend/{$account->uid}"
772 772
         );
773
-      }
774
-      break;
773
+        }
774
+        break;
775 775
       
776 776
     default:
777 777
     }
778 778
     
779 779
     $form['cancel'] = array(
780
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
781
-      '#weight' => 1004,
780
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
781
+        '#weight' => 1004,
782 782
     );
783 783
     $form['form control tabs suffix'] = array(
784
-      '#value' => '</ul>',
785
-      '#weight' => 1010,
784
+        '#value' => '</ul>',
785
+        '#weight' => 1010,
786 786
     );
787 787
     
788 788
     break;
789 789
     
790
-  // General node edit form
791
-  case 'news_node_form':
790
+    // General node edit form
791
+    case 'news_node_form':
792 792
     $form['separator_bottom'] = array(
793
-      '#value' => '<div class="separator buttons"></div>',
794
-      '#weight' => 999,
793
+        '#value' => '<div class="separator buttons"></div>',
794
+        '#weight' => 999,
795 795
     );
796 796
     
797 797
     // Wrap action buttons for styling consistency
798 798
     $form['buttons']['form control tabs prefix'] = array(
799
-      '#value' => '<ul class="form-control tab-list">',
800
-      '#weight' => 1001,
799
+        '#value' => '<ul class="form-control tab-list">',
800
+        '#weight' => 1001,
801 801
     );
802 802
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
803 803
     $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
@@ -810,15 +810,15 @@  discard block
 block discarded – undo
810 810
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
811 811
     $form['buttons']['preview_changes']['#weight'] = 1004;
812 812
     $form['buttons']['cancel'] = array(
813
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
814
-      '#weight' => 1005,
813
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
814
+        '#weight' => 1005,
815 815
     );
816 816
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
817 817
     $form['buttons']['delete']['#suffix'] = '</li>';
818 818
     $form['buttons']['delete']['#weight'] = 1006;
819 819
     $form['buttons']['form control tabs suffix'] = array(
820
-      '#value' => '</ul>',
821
-      '#weight' => 1010,
820
+        '#value' => '</ul>',
821
+        '#weight' => 1010,
822 822
     );
823 823
     
824 824
     // Preview is ugly, unset until it works
@@ -826,16 +826,16 @@  discard block
 block discarded – undo
826 826
 
827 827
     break;
828 828
   
829
-  case 'node_delete_confirm':
829
+    case 'node_delete_confirm':
830 830
     $form['separator_bottom'] = array(
831
-      '#value' => '<div class="separator buttons"></div>',
832
-      '#weight' => 999,
831
+        '#value' => '<div class="separator buttons"></div>',
832
+        '#weight' => 999,
833 833
     );
834 834
     
835 835
     // Wrap action buttons for styling consistency
836 836
     $form['actions']['form control tabs prefix'] = array(
837
-      '#value' => '<ul class="form-control tab-list">',
838
-      '#weight' => 1001,
837
+        '#value' => '<ul class="form-control tab-list">',
838
+        '#weight' => 1001,
839 839
     );
840 840
     $form['actions']['submit']['#prefix'] = '<li class="first tab">';
841 841
     $form['actions']['submit']['#value'] = bts('Delete', array(), NULL, 'boinc:form-delete');
@@ -843,23 +843,23 @@  discard block
 block discarded – undo
843 843
     $form['actions']['submit']['#weight'] = 1002;
844 844
     $form['actions']['cancel'] = array(
845 845
         '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
846
-      '#weight' => 1005,
846
+        '#weight' => 1005,
847 847
     );
848 848
     $form['actions']['form control tabs suffix'] = array(
849
-      '#value' => '</ul>',
850
-      '#weight' => 1010,
849
+        '#value' => '</ul>',
850
+        '#weight' => 1010,
851 851
     );
852 852
     $form['#redirect'] = 'account/profile';
853 853
     break;
854 854
     
855
-  case 'privatemsg_new':
855
+    case 'privatemsg_new':
856 856
     
857 857
     $form['privatemsg']['body']['#title'] = '';
858 858
     
859 859
     // Wrap action buttons for styling consistency
860 860
     $form['privatemsg']['form control tabs prefix'] = array(
861
-      '#value' => '<ul class="form-control tab-list">',
862
-      '#weight' => 1001,
861
+        '#value' => '<ul class="form-control tab-list">',
862
+        '#weight' => 1001,
863 863
     );
864 864
     $form['privatemsg']['submit']['#prefix'] = '<li class="first tab">';
865 865
     $form['privatemsg']['submit']['#value'] = bts('Send message', array(), NULL, 'boinc:private-message');
@@ -869,26 +869,26 @@  discard block
 block discarded – undo
869 869
     $form['privatemsg']['preview']['#suffix'] = '</li>';
870 870
     $form['privatemsg']['preview']['#weight'] = 1003;
871 871
     $form['privatemsg']['cancel'] = array(
872
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
873
-      '#weight' => 1004,
872
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
873
+        '#weight' => 1004,
874 874
     );
875 875
     $form['privatemsg']['form control tabs suffix'] = array(
876
-      '#value' => '</ul>',
877
-      '#weight' => 1010,
876
+        '#value' => '</ul>',
877
+        '#weight' => 1010,
878 878
     );
879 879
     
880 880
     unset($form['privatemsg']['recipient_display']);
881 881
     
882 882
     break;
883 883
     
884
-  // Login form
885
-  case 'user_login':
884
+    // Login form
885
+    case 'user_login':
886 886
   case 'user_login_block':
887 887
       drupal_set_title(bts('Login', array(), NULL, 'boinc:menu-link'));
888 888
     // Replace name with email in login form
889 889
     unset($form['name']);
890 890
     array_unshift($form, array(
891
-      'email' => array(
891
+        'email' => array(
892 892
         '#type' => 'textfield',
893 893
         '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
894 894
         '#size' => ($form_id == 'user_login_block') ? 15 : 60,
@@ -896,18 +896,18 @@  discard block
 block discarded – undo
896 896
         '#required' => TRUE,
897 897
         '#attributes' => array('tabindex' => '1'),
898 898
         '#description' => bts('Enter your @s email address.', array('@s' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:standard-login-page')
899
-      ),
900
-      'validation_source' => array(
899
+        ),
900
+        'validation_source' => array(
901 901
         '#type' => 'hidden',
902 902
         '#value' => 'user_login'
903
-      )
903
+        )
904 904
     ));
905 905
     $form['#redirect'] = 'home';
906 906
     
907 907
     // Wrap action buttons for styling consistency
908 908
     $form['buttons']['form control tabs prefix'] = array(
909
-      '#value' => '<ul class="form-control tab-list">',
910
-      '#weight' => 1001,
909
+        '#value' => '<ul class="form-control tab-list">',
910
+        '#weight' => 1001,
911 911
     );
912 912
     $form['buttons']['submit'] = $form['submit'];
913 913
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
@@ -915,8 +915,8 @@  discard block
 block discarded – undo
915 915
     $form['buttons']['submit']['#suffix'] = '</li>';
916 916
     $form['buttons']['submit']['#weight'] = 1002;
917 917
     $form['buttons']['form control tabs suffix'] = array(
918
-      '#value' => '</ul>',
919
-      '#weight' => 1010,
918
+        '#value' => '</ul>',
919
+        '#weight' => 1010,
920 920
     );
921 921
     unset($form['submit']);
922 922
     
@@ -925,23 +925,23 @@  discard block
 block discarded – undo
925 925
     isset($form['buttons']['submit']['#attributes']) ? array_push($form['buttons']['submit']['#attributes'], array('tabindex' => '3')) : $form['buttons']['submit']['#attributes'] = array('tabindex' => '3');
926 926
     // If the user login form is being submitted, use BOINC validation handler.
927 927
     if (isset($form_state['post']['email']) and isset($form_state['post']['pass'])) {
928
-      // Find the local validation function's entry so we can replace it.
929
-      $array_key = array_search('user_login_authenticate_validate', $form['#validate']);
930
-      if ($array_key === FALSE) {
928
+        // Find the local validation function's entry so we can replace it.
929
+        $array_key = array_search('user_login_authenticate_validate', $form['#validate']);
930
+        if ($array_key === FALSE) {
931 931
         // Could not find it. Some other module must have run form_alter().
932 932
         // We will simply add our validation just before the final validator.
933 933
         $final_validator = array_pop($form['#validate']);
934 934
         $form['#validate'][] = 'boincuser_login_validate';
935 935
         $form['#validate'][] = $final_validator;
936
-      } else {
936
+        } else {
937 937
         // Replace the local validation function with BOINC validation
938 938
         $form['#validate'][$array_key] = 'boincuser_login_validate';
939
-      }
939
+        }
940 940
     }
941 941
     break;
942 942
     
943
-  // User credentials form
944
-  case 'user_profile_form':
943
+    // User credentials form
944
+    case 'user_profile_form':
945 945
 
946 946
     // Use the displaly name as the title, not the username
947 947
     $account = user_load($form['#uid']);
@@ -949,28 +949,28 @@  discard block
 block discarded – undo
949 949
     
950 950
     // Message for admins
951 951
     if (user_access('administer users')) {
952
-      drupal_set_message(
952
+        drupal_set_message(
953 953
         bts('WARNING: You are editing the information for user. Please note: you may change a user\'s password by itself. But to change the user\'s email address you must change both the email address and the password simultaneously.')
954
-      , 'warning');
954
+        , 'warning');
955 955
     }
956 956
 
957 957
     // Set special message if user has not agreed to TOU
958 958
     $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
959 959
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
960 960
     if ( (!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users')) ) {
961
-      drupal_set_message(
961
+        drupal_set_message(
962 962
         bts('INFO: You have not agreed to the terms of use for @project. You may use this form to change your email address and/or password. Please note: you may not delete your account within seven (7) days of changing your email address.',
963 963
         array(
964
-          '@project' => variable_get('site_name','Drupal-BOINC'),
964
+            '@project' => variable_get('site_name','Drupal-BOINC'),
965 965
         ), NULL, 'boinc:account-credentials-change')
966
-      , 'info');
966
+        , 'info');
967 967
     }
968 968
 
969 969
     // A bit hackish... but don't require the user to enter his password if
970 970
     // coming from the password reset function
971 971
     $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/{$form['#uid']}") === FALSE) ? 0 : 1;
972 972
     if ($reset_pass) {
973
-      $_SESSION['reset_pass'] = 1;
973
+        $_SESSION['reset_pass'] = 1;
974 974
     }
975 975
 
976 976
     // Adjust form elements already present
@@ -982,8 +982,8 @@  discard block
 block discarded – undo
982 982
     $form['account']['pass']['#size'] = 17;
983 983
 
984 984
     if (user_access('administer users')) {
985
-      // Add BOINC username (aka displayname)
986
-      $form['account']['boincuser_name'] = array(
985
+        // Add BOINC username (aka displayname)
986
+        $form['account']['boincuser_name'] = array(
987 987
         '#type' => 'textfield',
988 988
         '#title' => bts('BOINC Username', array(), NULL, 'boinc:user-or-team-name'),
989 989
         '#default_value' => $account->boincuser_name,
@@ -991,68 +991,68 @@  discard block
 block discarded – undo
991 991
         '#required' => TRUE,
992 992
         '#description' => bts('This is the BOINC (external) username. This is the same setting as found in Account -> Preferences -> Community.', array(), NULL, 'boinc:username-change'),
993 993
         '#size' => 40,
994
-      );
994
+        );
995 995
     }
996 996
 
997 997
     // If email address was changed less than 7 days (7 * 86400 s)
998 998
     // ago, it cannot be changed again.
999 999
     $duration = TOKEN_DURATION_ONE_WEEK;
1000 1000
     if (($account->boincuser_email_addr_change_time + $duration) > time() and (!user_access('administer users'))) {
1001
-      $form['account']['mail']['#required'] = FALSE;
1002
-      $form['account']['mailhelp'] = array(
1001
+        $form['account']['mail']['#required'] = FALSE;
1002
+        $form['account']['mailhelp'] = array(
1003 1003
         '#value' => bts("You email address was changed within the past seven (7) days. Please look for an email to !prev_email if you need to revert this change. You may change your email address on !time.",
1004
-          array(
1004
+            array(
1005 1005
             '!prev_email' => $account->boincuser_previous_email_addr,
1006 1006
             '!time' => date('F j, Y \a\t G:i T', $account->boincuser_email_addr_change_time + $duration),
1007
-          ), NULL, 'boinc:account-credentials-change'),
1008
-      );
1007
+            ), NULL, 'boinc:account-credentials-change'),
1008
+        );
1009 1009
     }
1010 1010
 
1011 1011
     if (!$reset_pass AND ($user->uid == $account->uid OR !user_access('administer users'))) {
1012
-      // Add a password authenticator, required to change email or pw
1013
-      $form['account']['current_pass'] = array(
1012
+        // Add a password authenticator, required to change email or pw
1013
+        $form['account']['current_pass'] = array(
1014 1014
         '#type' => 'password',
1015 1015
         '#title' => bts('Enter your password to save changes', array(), NULL, 'boinc:account-credentials-change'),
1016 1016
         '#description' => bts('Enter your current password if changing your email
1017 1017
           address or password.', array(), NULL, 'boinc:account-credentials-change'),
1018 1018
         '#size' => 17,
1019 1019
         '#attributes' => array(
1020
-          'autocomplete' => 'off',
1020
+            'autocomplete' => 'off',
1021 1021
         ),
1022
-      );
1022
+        );
1023 1023
     }
1024 1024
     
1025 1025
     // Add account keys, CPID, etc
1026 1026
     $form['account']['boincuser_id'] = array(
1027
-      '#value' => '
1027
+        '#value' => '
1028 1028
         <div class="form-item">
1029 1029
           <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1030 1030
           <span>' . $account->boincuser_id . '</span>
1031 1031
         </div>',
1032 1032
     );
1033 1033
     $form['account']['user_id'] = array(
1034
-      '#value' => '
1034
+        '#value' => '
1035 1035
         <div class="form-item">
1036 1036
           <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1037 1037
           <span>' . $account->uid . '</span>
1038 1038
         </div>',
1039 1039
     );
1040 1040
     $form['account']['account_key'] = array(
1041
-      '#value' => '
1041
+        '#value' => '
1042 1042
         <div class="form-item">
1043 1043
           <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1044 1044
           <span>' . $account->boincuser_account_key . '</span>
1045 1045
         </div>',
1046 1046
     );
1047 1047
     $form['account']['weak_account_key'] = array(
1048
-      '#value' => '
1048
+        '#value' => '
1049 1049
         <div class="form-item">
1050 1050
           <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1051 1051
           <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
1052 1052
         </div>',
1053 1053
     );
1054 1054
     $form['account']['cpid'] = array(
1055
-      '#value' => '
1055
+        '#value' => '
1056 1056
         <div class="form-item">
1057 1057
           <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1058 1058
           <span>' . $account->boincuser_cpid . '</span>
@@ -1060,30 +1060,30 @@  discard block
 block discarded – undo
1060 1060
     );
1061 1061
     
1062 1062
     $form['account']['separator_bottom'] = array(
1063
-      '#value' => '<div class="separator buttons"></div>'
1063
+        '#value' => '<div class="separator buttons"></div>'
1064 1064
     );
1065 1065
     
1066 1066
     // Wrap action buttons for styling consistency
1067 1067
     $form['form control tabs prefix'] = array(
1068
-      '#value' => '<ul class="form-control tab-list">',
1069
-      '#weight' => 1001,
1068
+        '#value' => '<ul class="form-control tab-list">',
1069
+        '#weight' => 1001,
1070 1070
     );
1071 1071
     $form['submit']['#prefix'] = '<li class="first tab">';
1072 1072
     $form['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
1073 1073
     $form['submit']['#suffix'] = '</li>';
1074 1074
     $form['submit']['#weight'] = 1002;
1075 1075
     $form['cancel'] = array(
1076
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1077
-      '#weight' => 1003,
1076
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1077
+        '#weight' => 1003,
1078 1078
     );
1079 1079
     if (isset($form['delete']) AND is_array($form['delete'])) {
1080
-      $form['delete']['#prefix'] = '<li class="first alt tab">';
1081
-      $form['delete']['#suffix'] = '</li>';
1082
-      $form['delete']['#weight'] = 1004;
1080
+        $form['delete']['#prefix'] = '<li class="first alt tab">';
1081
+        $form['delete']['#suffix'] = '</li>';
1082
+        $form['delete']['#weight'] = 1004;
1083 1083
     }
1084 1084
     $form['form control tabs suffix'] = array(
1085
-      '#value' => '</ul>',
1086
-      '#weight' => 1010,
1085
+        '#value' => '</ul>',
1086
+        '#weight' => 1010,
1087 1087
     );
1088 1088
     
1089 1089
     // Rearrange form elements
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
     // Remove redundant / unnecessary form elements
1104 1104
     unset($form['theme_select']);
1105 1105
     if (!module_exists('boincuser_delete')) {
1106
-      unset($form['delete']);
1106
+        unset($form['delete']);
1107 1107
     }
1108 1108
     
1109 1109
     // These are on the Community preferences form (boincwork module)
@@ -1119,18 +1119,18 @@  discard block
 block discarded – undo
1119 1119
     
1120 1120
     // Internal fields to indicate where these user changes are taking place
1121 1121
     array_unshift($form, array(
1122
-      'validation_source' => array(
1122
+        'validation_source' => array(
1123 1123
         '#type' => 'hidden',
1124 1124
         '#value' => 'user_account'
1125
-      ),
1126
-      'update_source' => array(
1125
+        ),
1126
+        'update_source' => array(
1127 1127
         '#type' => 'hidden',
1128 1128
         '#value' => 'user_account'
1129
-      )
1129
+        )
1130 1130
     ));
1131 1131
     break;
1132 1132
     
1133
-  case 'profile_node_form':
1133
+    case 'profile_node_form':
1134 1134
     
1135 1135
     // Use the display name as the title, not the username
1136 1136
     $account = user_load($form['uid']['#value']);
@@ -1141,22 +1141,22 @@  discard block
 block discarded – undo
1141 1141
     $form['title']['#access'] = FALSE;
1142 1142
 
1143 1143
     $form['separator_bottom'] = array(
1144
-      '#value' => '<div class="separator buttons"></div>',
1145
-      '#weight' => 999,
1144
+        '#value' => '<div class="separator buttons"></div>',
1145
+        '#weight' => 999,
1146 1146
     );
1147 1147
     
1148 1148
     if (module_exists('captcha')) {
1149
-      // Add an optional captcha
1150
-      $form['profile_captcha'] = array(
1149
+        // Add an optional captcha
1150
+        $form['profile_captcha'] = array(
1151 1151
         '#type' => 'captcha',
1152 1152
         '#weight' => 1000,
1153
-      );
1153
+        );
1154 1154
     }
1155 1155
     
1156 1156
     // Wrap action buttons for styling consistency
1157 1157
     $form['buttons']['form control tabs prefix'] = array(
1158
-      '#value' => '<ul class="form-control tab-list">',
1159
-      '#weight' => 1001,
1158
+        '#value' => '<ul class="form-control tab-list">',
1159
+        '#weight' => 1001,
1160 1160
     );
1161 1161
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
1162 1162
     $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
@@ -1169,8 +1169,8 @@  discard block
 block discarded – undo
1169 1169
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
1170 1170
     $form['buttons']['preview_changes']['#weight'] = 1004;
1171 1171
     $form['buttons']['cancel'] = array(
1172
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1173
-      '#weight' => 1005,
1172
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1173
+        '#weight' => 1005,
1174 1174
     );
1175 1175
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
1176 1176
     $form['buttons']['delete']['#suffix'] = '</li>';
@@ -1178,8 +1178,8 @@  discard block
 block discarded – undo
1178 1178
     $form['buttons']['delete']['#weight'] = 1006;
1179 1179
     $form['buttons']['delete']['#submit'] = array('_boincuser_node_profile_delete_submit');
1180 1180
     $form['buttons']['form control tabs suffix'] = array(
1181
-      '#value' => '</ul>',
1182
-      '#weight' => 1010,
1181
+        '#value' => '</ul>',
1182
+        '#weight' => 1010,
1183 1183
     );
1184 1184
     
1185 1185
     $form['#after_build'][] = 'boincuser_profile_node_form_after_build';
@@ -1192,33 +1192,33 @@  discard block
 block discarded – undo
1192 1192
     
1193 1193
     // Internal fields to indicate where these user changes are taking place
1194 1194
     array_unshift($form, array(
1195
-      'validation_source' => array(
1195
+        'validation_source' => array(
1196 1196
         '#type' => 'hidden',
1197 1197
         '#value' => 'user_profile'
1198
-      ),
1199
-      'update_source' => array(
1198
+        ),
1199
+        'update_source' => array(
1200 1200
         '#type' => 'hidden',
1201 1201
         '#value' => 'user_profile'
1202
-      )
1202
+        )
1203 1203
     ));
1204 1204
     break;
1205 1205
   
1206
-  // Registration form
1207
-  case 'user_register':
1206
+    // Registration form
1207
+    case 'user_register':
1208 1208
     array_unshift($form, array(
1209
-      'boincuser_name' => array(
1209
+        'boincuser_name' => array(
1210 1210
         '#type' => 'textfield', 
1211 1211
         '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'), 
1212 1212
         '#default_value' => $edit['boincuser_name'], 
1213 1213
         '#maxlength' => USERNAME_MAX_LENGTH, 
1214 1214
         '#description' => bts('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.', array(), NULL, 'boinc:user-register'), 
1215 1215
         '#required' => TRUE
1216
-      ),
1216
+        ),
1217 1217
     ));
1218 1218
     // Set name temporarily to dummy value to beat validation
1219 1219
     $form['name'] = array(
1220
-      '#type' => 'hidden',
1221
-      '#value' => rand() . '.' . time()
1220
+        '#type' => 'hidden',
1221
+        '#value' => rand() . '.' . time()
1222 1222
     );
1223 1223
 
1224 1224
     // Add JS for submit button disabling
@@ -1228,50 +1228,50 @@  discard block
 block discarded – undo
1228 1228
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
1229 1229
     if (!empty($termsofuse)) {
1230 1230
 
1231
-      $form['termsofuse'] = array(
1231
+        $form['termsofuse'] = array(
1232 1232
         '#type'   => 'fieldset',
1233 1233
         '#prefix' => '<div id="termsofuse-wrapper">', // This is our wrapper div.
1234 1234
         '#suffix' => '</div>',
1235 1235
         '#tree'   => TRUE,
1236 1236
         '#weight' => -15,
1237
-      );
1237
+        );
1238 1238
 
1239
-      $form['termsofuse']['title1'] = array(
1239
+        $form['termsofuse']['title1'] = array(
1240 1240
         '#weight' => -12,
1241 1241
         '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register' ) . '</h2>',
1242 1242
         '#prefix' => '<div id="register-title1">',
1243 1243
         '#suffix' => '</div>',
1244
-      );
1244
+        );
1245 1245
 
1246
-      $form['termsofuse']['body'] = array(
1246
+        $form['termsofuse']['body'] = array(
1247 1247
         '#weight' => -10,
1248 1248
         '#value' => bts($termsofuse, array(), NULL, 'project:user-register'),
1249 1249
         '#prefix' => '<div id="register-termsofuse">',
1250 1250
         '#suffix' => '</div>',
1251
-      );
1251
+        );
1252 1252
 
1253
-      $form['termsofuse']['agreeTOU'] = array(
1253
+        $form['termsofuse']['agreeTOU'] = array(
1254 1254
         '#type' => 'checkbox',
1255 1255
         '#title' => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), NULL, 'project:user-register'),
1256 1256
         '#weight' => -8,
1257 1257
         '#prefix' => '<div id="register-checkbox">',
1258 1258
         '#suffix' => '</div>',
1259
-      );
1259
+        );
1260 1260
     }
1261 1261
 
1262 1262
     $form['title2'] = array(
1263
-      '#weight' => -6,
1264
-      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1265
-      '#prefix' => '<div id="register-title2">',
1266
-      '#suffix' => '</div>',
1263
+        '#weight' => -6,
1264
+        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1265
+        '#prefix' => '<div id="register-title2">',
1266
+        '#suffix' => '</div>',
1267 1267
     );
1268 1268
 
1269 1269
     if (module_exists('captcha')) {
1270
-      // Add an optional captcha
1271
-      $form['register_captcha'] = array(
1270
+        // Add an optional captcha
1271
+        $form['register_captcha'] = array(
1272 1272
         '#type' => 'captcha',
1273 1273
         '#weight' => 1000,
1274
-      );
1274
+        );
1275 1275
     }
1276 1276
     
1277 1277
     $form['#validate'][] = 'boincuser_register_validate';
@@ -1279,43 +1279,43 @@  discard block
 block discarded – undo
1279 1279
     $form['submit']['#weight'] = 1001;
1280 1280
     break;
1281 1281
     
1282
-  // Request new password form
1283
-  case 'user_pass':
1282
+    // Request new password form
1283
+    case 'user_pass':
1284 1284
     drupal_set_title(bts('Forgot password', array(), NULL, 'boinc:forgot-password'));
1285 1285
     // Replace name/email text box with email only; retain "name" label
1286 1286
     // for compatibility with standard Drupal submit function
1287 1287
     unset($form['name']);
1288 1288
     array_unshift($form, array(
1289
-      'name' => array(
1289
+        'name' => array(
1290 1290
         '#type' => 'textfield',
1291 1291
         '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
1292 1292
         '#size' => 60,
1293 1293
         '#maxlength' => EMAIL_MAX_LENGTH,
1294 1294
         '#required' => TRUE,
1295 1295
         '#description' => bts(
1296
-          'Enter your email address to receive instructions for resetting your password (or use the !authenticator_login).',
1297
-          array(
1296
+            'Enter your email address to receive instructions for resetting your password (or use the !authenticator_login).',
1297
+            array(
1298 1298
             '!authenticator_login' => l(
1299
-              bts('authenticator-based login', array(), NULL, 'boinc:forgot-password'),
1300
-              'user/login/auth'
1299
+                bts('authenticator-based login', array(), NULL, 'boinc:forgot-password'),
1300
+                'user/login/auth'
1301
+            )
1301 1302
             )
1302
-          )
1303 1303
         , NULL, 'boinc:forgot-password'),
1304
-      ),
1304
+        ),
1305 1305
     ));
1306 1306
     
1307 1307
     if (module_exists('captcha')) {
1308
-      // Add an optional captcha
1309
-      $form['register_captcha'] = array(
1308
+        // Add an optional captcha
1309
+        $form['register_captcha'] = array(
1310 1310
         '#type' => 'captcha',
1311 1311
         '#weight' => 1000,
1312
-      );
1312
+        );
1313 1313
     }
1314 1314
 
1315 1315
     // Wrap action buttons for styling consistency
1316 1316
     $form['buttons']['form control tabs prefix'] = array(
1317
-      '#value' => '<ul class="form-control tab-list">',
1318
-      '#weight' => 1001,
1317
+        '#value' => '<ul class="form-control tab-list">',
1318
+        '#weight' => 1001,
1319 1319
     );
1320 1320
     $form['buttons']['submit'] = $form['submit'];
1321 1321
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
@@ -1323,26 +1323,26 @@  discard block
 block discarded – undo
1323 1323
     $form['buttons']['submit']['#suffix'] = '</li>';
1324 1324
     $form['buttons']['submit']['#weight'] = 1002;
1325 1325
     $form['buttons']['cancel'] = array(
1326
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1327
-      '#weight' => 1005,
1326
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1327
+        '#weight' => 1005,
1328 1328
     );
1329 1329
     $form['buttons']['form control tabs suffix'] = array(
1330
-      '#value' => '</ul>',
1331
-      '#weight' => 1010,
1330
+        '#value' => '</ul>',
1331
+        '#weight' => 1010,
1332 1332
     );
1333 1333
     unset($form['submit']);
1334 1334
     
1335 1335
     // If the form is being submitted, use BOINC validation handler.
1336 1336
     if (isset($form_state['post']['name'])) {
1337
-      // Prepend the BOINC validation function to local validation
1338
-      array_unshift($form['#validate'], 'boincuser_request_pass_validate');
1337
+        // Prepend the BOINC validation function to local validation
1338
+        array_unshift($form['#validate'], 'boincuser_request_pass_validate');
1339 1339
     }
1340 1340
     break;
1341 1341
     
1342
-  case 'views_exposed_form':
1342
+    case 'views_exposed_form':
1343 1343
       $form['submit']['#value'] = bts('Search', array(), NULL, 'boinc:search-user');
1344 1344
     break;
1345
-  }
1345
+    }
1346 1346
 }
1347 1347
 
1348 1348
 /**
@@ -1350,10 +1350,10 @@  discard block
 block discarded – undo
1350 1350
  * built; this is called from boincuser_form_alter()
1351 1351
  */
1352 1352
 function boincuser_profile_node_form_after_build($form, &$form_state) {
1353
-  // Move to community prefs form
1354
-  $form_state['storage']['avatar'] = $form['field_image'];
1355
-  unset($form['field_image']);
1356
-  return $form;
1353
+    // Move to community prefs form
1354
+    $form_state['storage']['avatar'] = $form['field_image'];
1355
+    unset($form['field_image']);
1356
+    return $form;
1357 1357
 }
1358 1358
 
1359 1359
 /**
@@ -1361,8 +1361,8 @@  discard block
 block discarded – undo
1361 1361
  * @see http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_elements/6
1362 1362
  */
1363 1363
 function boincuser_elements() {
1364
-  $type['password_confirm']['#process'][] = 'boincuser_process_password_confirm';
1365
-  return $type;
1364
+    $type['password_confirm']['#process'][] = 'boincuser_process_password_confirm';
1365
+    return $type;
1366 1366
 }
1367 1367
 
1368 1368
 /**
@@ -1370,11 +1370,11 @@  discard block
 block discarded – undo
1370 1370
  * profile form
1371 1371
  */
1372 1372
 function boincuser_process_password_confirm($element) {
1373
-  // Check if parent element is "account".
1374
-  if ($element['#array_parents'][0] == 'account') {
1373
+    // Check if parent element is "account".
1374
+    if ($element['#array_parents'][0] == 'account') {
1375 1375
     $element['pass1']['#title'] = bts('Change password', array(), NULL, 'boinc:forgot-password');
1376
-  }
1377
-  return $element;
1376
+    }
1377
+    return $element;
1378 1378
 }
1379 1379
 
1380 1380
 /**
@@ -1382,42 +1382,42 @@  discard block
 block discarded – undo
1382 1382
  * Register theme functions for use in this module.
1383 1383
  */
1384 1384
 function boincuser_theme($existing, $type, $theme, $path) {
1385
-  return array(
1385
+    return array(
1386 1386
     'boincuser_user_pass' => array(
1387
-      'arguments' => array()
1387
+        'arguments' => array()
1388 1388
     )
1389
-  );
1389
+    );
1390 1390
 }
1391 1391
 
1392 1392
 /**
1393 1393
  * Implementation of hook_token_values
1394 1394
  */
1395 1395
 function boincuser_token_values($type, $object = NULL, $options = array()) {
1396
-  if ($type == 'user') {
1396
+    if ($type == 'user') {
1397 1397
     $account = user_load($object->uid);
1398 1398
     $tokens['display-name'] = $account->boincuser_name;
1399 1399
     return $tokens;
1400
-  }
1400
+    }
1401 1401
 }
1402 1402
 
1403 1403
 /**
1404 1404
  * Implementation of hook_token_list
1405 1405
  */
1406 1406
 function boincuser_token_list($type = 'all') {
1407
-  if ($type == 'user' || $type == 'all') {
1407
+    if ($type == 'user' || $type == 'all') {
1408 1408
     $tokens['user']['display-name']      = t("The user's name that should be displayed");
1409 1409
     return $tokens;
1410
-  }
1410
+    }
1411 1411
 }
1412 1412
 
1413 1413
 /**
1414 1414
  * Implementation of hook_views_pre_execute()
1415 1415
  */
1416 1416
 function boincuser_views_pre_execute(&$view) {
1417
-  if ($view->args) {
1417
+    if ($view->args) {
1418 1418
     $account_id = $view->args[0];
1419
-  }
1420
-  if ($view->name=="user_activity") {
1419
+    }
1420
+    if ($view->name=="user_activity") {
1421 1421
     // Run the following custom query for the user_activity view
1422 1422
     $view->build_info['query']= "
1423 1423
       SELECT node_revisions.vid AS vid,
@@ -1449,25 +1449,25 @@  discard block
 block discarded – undo
1449 1449
     
1450 1450
     // count_query determines the pager.  Do this so the right item count is returned.
1451 1451
     $view->build_info['count_query'] = $view->build_info['query'];
1452
-  }
1452
+    }
1453 1453
 }
1454 1454
 
1455 1455
 /**
1456 1456
  * Implementation of hook_cron()
1457 1457
  */
1458 1458
 function boincuser_cron() {
1459
-  // Delete expired users in the BOINC database, user_delete table.
1460
-  require_boinc('boinc_db');
1461
-  $num_deleted = BoincUserDeleted::delete_expired();
1462
-  if ($num_deleted>0) {
1459
+    // Delete expired users in the BOINC database, user_delete table.
1460
+    require_boinc('boinc_db');
1461
+    $num_deleted = BoincUserDeleted::delete_expired();
1462
+    if ($num_deleted>0) {
1463 1463
     watchdog('boincuser', "Deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1464
-  }
1464
+    }
1465 1465
 
1466
-  // Delete expired tokens from token table
1467
-  $tokens_deleted = BoincToken::delete_expired();
1468
-  if ($tokens_deleted>0) {
1466
+    // Delete expired tokens from token table
1467
+    $tokens_deleted = BoincToken::delete_expired();
1468
+    if ($tokens_deleted>0) {
1469 1469
     watchdog('boincuser', "Deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1470
-  }
1470
+    }
1471 1471
 }
1472 1472
 
1473 1473
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -1478,17 +1478,17 @@  discard block
 block discarded – undo
1478 1478
  * Page callback shortcut to recent posts for the logged in user
1479 1479
  */
1480 1480
 function boincuser_goto_recent_posts() {
1481
-  global $user;
1482
-  drupal_goto("account/{$user->uid}/posts");
1481
+    global $user;
1482
+    drupal_goto("account/{$user->uid}/posts");
1483 1483
 }
1484 1484
 
1485 1485
 /**
1486 1486
  * Page callback shortcut to the team of the logged in user
1487 1487
  */
1488 1488
 function boincuser_goto_team() {
1489
-  global $user;
1490
-  $account = user_load($user->uid);
1491
-  drupal_goto("community/teams/{$account->team}");
1489
+    global $user;
1490
+    $account = user_load($user->uid);
1491
+    drupal_goto("community/teams/{$account->team}");
1492 1492
 }
1493 1493
 
1494 1494
 /**
@@ -1497,93 +1497,93 @@  discard block
 block discarded – undo
1497 1497
  * user profile pages, so use a wrapper for display
1498 1498
  */
1499 1499
 function boincuser_view_profile($account = null) {
1500
-  // Create the user profile page
1501
-  if (!$account) {
1500
+    // Create the user profile page
1501
+    if (!$account) {
1502 1502
     global $user;
1503 1503
     $account = $user;
1504
-  }
1504
+    }
1505 1505
 
1506
-  $min_credit_to_post = variable_get('boinc_comment_min_credit', 0);
1507
-  $verified_contributor = array_search('verified contributor', user_roles(true));
1508
-  if (!isset($account->roles[$verified_contributor])) {
1506
+    $min_credit_to_post = variable_get('boinc_comment_min_credit', 0);
1507
+    $verified_contributor = array_search('verified contributor', user_roles(true));
1508
+    if (!isset($account->roles[$verified_contributor])) {
1509 1509
     drupal_set_message(bts(
1510 1510
         'You may only create or modify your user profile after earning @count credits.',
1511 1511
         array('@count' => $min_credit_to_post), NULL, 'boinc:view-profile'
1512 1512
     ), 'warning', FALSE);
1513
-  }
1513
+    }
1514 1514
 
1515
-  // For now, just call the user module profile view function
1516
-  user_build_content($account);
1517
-  return theme('user_profile', $account);
1515
+    // For now, just call the user module profile view function
1516
+    user_build_content($account);
1517
+    return theme('user_profile', $account);
1518 1518
 }
1519 1519
 
1520 1520
 /**
1521 1521
  * Page callback for editing a user profile
1522 1522
  */
1523 1523
 function boincuser_edit_profile($account = null) {
1524
-  // Create the user profile form
1525
-  if (!$account) {
1524
+    // Create the user profile form
1525
+    if (!$account) {
1526 1526
     global $user;
1527 1527
     $account = $user;
1528
-  }
1529
-  // Render the form
1530
-  module_load_include('pages.inc', 'node', 'node');
1531
-  return content_profile_page_edit('profile', $account);
1528
+    }
1529
+    // Render the form
1530
+    module_load_include('pages.inc', 'node', 'node');
1531
+    return content_profile_page_edit('profile', $account);
1532 1532
 }
1533 1533
 
1534 1534
 /**
1535
-  * Join page menu callback.
1536
-  * Display instructions on joining for new or existing BOINC users
1537
-  */
1535
+ * Join page menu callback.
1536
+ * Display instructions on joining for new or existing BOINC users
1537
+ */
1538 1538
 function join_page($type = null) {
1539
-  global $base_url;
1540
-  /* The paths/links to the rules-and-policies page is hardcoded
1539
+    global $base_url;
1540
+    /* The paths/links to the rules-and-policies page is hardcoded
1541 1541
    * here. An improvement would be admin settings for the Join Page
1542 1542
    * where this path could be set.
1543 1543
    */
1544
-  $ruleslinkA = 'rules-and-policies';
1545
-  $ruleslinkB = 'content/rules-and-policies';
1546
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1547
-  $registration_enabled = variable_get('user_register', 0);
1548
-  $output = '<div class="join">';
1549
-  switch ($type) {
1550
-  case 'boinc':
1544
+    $ruleslinkA = 'rules-and-policies';
1545
+    $ruleslinkB = 'content/rules-and-policies';
1546
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1547
+    $registration_enabled = variable_get('user_register', 0);
1548
+    $output = '<div class="join">';
1549
+    switch ($type) {
1550
+    case 'boinc':
1551 1551
     $output .= '<ol>';
1552 1552
     if ($registration_enabled) {
1553
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1554
-      array(
1553
+        $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1554
+        array(
1555 1555
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1556 1556
         '@sitename' => $site_name,
1557
-      ), NULL, 'boinc:join-page') . '</li>';
1557
+        ), NULL, 'boinc:join-page') . '</li>';
1558 1558
     }
1559 1559
     $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page') . '</li>';
1560 1560
     $output .= '  <li>' . bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1561 1561
     array(
1562
-      '@sitename' => $site_name,
1563
-      '@siteurl' => $base_url,
1562
+        '@sitename' => $site_name,
1563
+        '@siteurl' => $base_url,
1564 1564
     ), NULL, 'boinc:join-page') . '</li>';
1565 1565
     if ($registration_enabled) {
1566
-      $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1566
+        $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1567 1567
         array(
1568
-          '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1568
+            '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1569 1569
         ), NULL, 'boinc:join-page') . '</li>';
1570 1570
     }
1571 1571
     else {
1572
-      $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1572
+        $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1573 1573
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1574 1574
         array(
1575
-          '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1575
+            '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1576 1576
         ), NULL, 'boinc:join-page') . '</li>';
1577 1577
     }
1578 1578
     $output .= '<li>' . bts("If you're running a pre-5.0 version of BOINC, please
1579 1579
       upgrade to a more recent version of BOINC to create an account
1580 1580
       at @this_project.",
1581
-      array(
1581
+        array(
1582 1582
         '@this_project' => $site_name,
1583
-      ), NULL, 'boinc:join-page') . '</li>';
1583
+        ), NULL, 'boinc:join-page') . '</li>';
1584 1584
     $output .=  '</ol>';
1585 1585
     break;
1586
-  case 'new':
1586
+    case 'new':
1587 1587
   default:
1588 1588
     // Determine if there is a link to rules-and-policies
1589 1589
     //$ruleslink='';
@@ -1598,16 +1598,16 @@  discard block
 block discarded – undo
1598 1598
     // Join page output
1599 1599
     $output .= '<ol>';
1600 1600
     if ($registration_enabled) {
1601
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1602
-      array(
1601
+        $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1602
+        array(
1603 1603
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1604 1604
         '@sitename' => $site_name,
1605
-      ), NULL, 'boinc:join-page') . '</li>';
1605
+        ), NULL, 'boinc:join-page') . '</li>';
1606 1606
     }
1607 1607
     else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1608
-      $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1608
+        $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1609 1609
         '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1610
-      ), NULL, 'boinc:join-page') . '</li>';
1610
+        ), NULL, 'boinc:join-page') . '</li>';
1611 1611
     }
1612 1612
     $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1613 1613
     $output .= '    <p>';
@@ -1617,73 +1617,73 @@  discard block
 block discarded – undo
1617 1617
     $output .= '  </li>';
1618 1618
     $output .= '  <li>' . bts('Run the installer.', array(), NULL, 'boinc:join-page') . '</li>';
1619 1619
     $output .= '  <li>' . bts('Choose @sitename from the list, or enter @siteurl.', array(
1620
-      '@sitename' => $site_name,
1621
-      '@siteurl' => $base_url,
1620
+        '@sitename' => $site_name,
1621
+        '@siteurl' => $base_url,
1622 1622
     ), NULL, 'boinc:join-page') . '</li>';
1623 1623
     $output .=  '</ol>';
1624
-  }
1625
-  $output .= '</div>';
1626
-  return $output;
1624
+    }
1625
+    $output .= '</div>';
1626
+    return $output;
1627 1627
 }
1628 1628
 
1629 1629
 /**
1630
-  * Home page content for embedding in Panels page
1631
-  */
1630
+ * Home page content for embedding in Panels page
1631
+ */
1632 1632
 function boincuser_home_page() {
1633
-  global $user;
1634
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1635
-  // get the front page message from database; this is set in the admin interface under BOINC Other
1636
-  $site_message = variable_get('boinc_other_frontpage','');
1633
+    global $user;
1634
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1635
+    // get the front page message from database; this is set in the admin interface under BOINC Other
1636
+    $site_message = variable_get('boinc_other_frontpage','');
1637 1637
 
1638
-  // Determine the user of the day
1639
-  $current_uotd = db_fetch_object(db_query("
1638
+    // Determine the user of the day
1639
+    $current_uotd = db_fetch_object(db_query("
1640 1640
     SELECT
1641 1641
       uid,
1642 1642
       uotd_time
1643 1643
     FROM {boincuser}
1644 1644
     ORDER BY uotd_time DESC
1645 1645
     LIMIT 1"
1646
-  ));
1647
-  if ($current_uotd->uotd_time < strtotime('today midnight')) {
1646
+    ));
1647
+    if ($current_uotd->uotd_time < strtotime('today midnight')) {
1648 1648
     $uotd = boincuser_select_user_of_the_day();
1649
-  }
1650
-  else {
1649
+    }
1650
+    else {
1651 1651
     $uotd = user_load($current_uotd->uid);
1652
-  }
1653
-  $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
1654
-  $output = '<h2 class="pane-title">';
1655
-  $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1656
-  $output .= '</h2>';
1657
-  $output .= '<div class="boinc-overview balance-height-front">';
1658
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1659
-  if ($user->uid) {
1652
+    }
1653
+    $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
1654
+    $output = '<h2 class="pane-title">';
1655
+    $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1656
+    $output .= '</h2>';
1657
+    $output .= '<div class="boinc-overview balance-height-front">';
1658
+    $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1659
+    if ($user->uid) {
1660 1660
     $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1661
-  }
1662
-  else {
1661
+    }
1662
+    else {
1663 1663
     $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1664
-  }
1665
-  $output .= '</div>';
1666
-  $output .= '<div class="boinc-overview-details">';
1667
-  $output .= '  <div class="detail-container">';
1668
-  $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1669
-  $output .= '      <div class="picture">';
1670
-  $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1664
+    }
1665
+    $output .= '</div>';
1666
+    $output .= '<div class="boinc-overview-details">';
1667
+    $output .= '  <div class="detail-container">';
1668
+    $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1669
+    $output .= '      <div class="picture">';
1670
+    $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1671 1671
     $uotd_image['alt'], array(), FALSE);
1672
-  $output .= '      </div>';
1673
-  $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1674
-  $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1675
-  $output .= '    </a>';
1676
-  $output .= '    <div class="volunteers">';
1677
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1678
-  $output .= '      <div class="platforms">';
1679
-  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1680
-  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1681
-  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1682
-  $output .= '      </div>';
1683
-  $output .= '    </div>';
1684
-  $output .= '  </div>';
1685
-  $output .= '</div>';
1686
-  return $output;
1672
+    $output .= '      </div>';
1673
+    $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1674
+    $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1675
+    $output .= '    </a>';
1676
+    $output .= '    <div class="volunteers">';
1677
+    $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1678
+    $output .= '      <div class="platforms">';
1679
+    $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1680
+    $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1681
+    $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1682
+    $output .= '      </div>';
1683
+    $output .= '    </div>';
1684
+    $output .= '  </div>';
1685
+    $output .= '</div>';
1686
+    return $output;
1687 1687
 }
1688 1688
 
1689 1689
 /**
@@ -1691,81 +1691,81 @@  discard block
 block discarded – undo
1691 1691
  * Create a new user account based on supplied parameters.
1692 1692
  */
1693 1693
 function boincuser_create_account() {
1694
-  global $base_url;
1694
+    global $base_url;
1695 1695
 
1696
-  require_boinc('boinc_db');
1697
-  require_boinc('user_util');
1698
-  require_boinc('xml');
1699
-  $params = array(
1696
+    require_boinc('boinc_db');
1697
+    require_boinc('user_util');
1698
+    require_boinc('xml');
1699
+    $params = array(
1700 1700
     'email_addr' => isset($_GET['email_addr']) ? $_GET['email_addr'] : '',
1701 1701
     'user_name' => isset($_GET['user_name']) ? $_GET['user_name'] : '',
1702 1702
     'passwd_hash' => isset($_GET['passwd_hash']) ? $_GET['passwd_hash'] : ''
1703
-  );
1703
+    );
1704 1704
   
1705
-  // Begin output
1706
-  xml_header();
1705
+    // Begin output
1706
+    xml_header();
1707 1707
   
1708
-  // Account creation disabled
1709
-  $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1710
-  if (!$enablethisRPC) {
1708
+    // Account creation disabled
1709
+    $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1710
+    if (!$enablethisRPC) {
1711 1711
     $mess = bts('Account creation is done through our Web site. Please register at @url', array(
1712
-      '@url' => $base_url . '/user/registration',
1712
+        '@url' => $base_url . '/user/registration',
1713 1713
     ),
1714 1714
     NULL, 'boinc:create_account');
1715 1715
     xml_error(-208, $mess);
1716
-  }
1717
-  // Invalid invite code
1716
+    }
1717
+    // Invalid invite code
1718 1718
   
1719
-  // Validate input
1720
-  if (user_validate_mail($params['email_addr']) or !is_valid_email_addr($params['email_addr'])) {
1719
+    // Validate input
1720
+    if (user_validate_mail($params['email_addr']) or !is_valid_email_addr($params['email_addr'])) {
1721 1721
     xml_error(-205);
1722
-  }
1722
+    }
1723 1723
 
1724
-  // Make sure user_name is unique and cleaned
1725
-  $unique_name = create_proper_drupalname($params['user_name']);
1726
-  if ($error = user_validate_name($unique_name)) {
1724
+    // Make sure user_name is unique and cleaned
1725
+    $unique_name = create_proper_drupalname($params['user_name']);
1726
+    if ($error = user_validate_name($unique_name)) {
1727 1727
     xml_error(-188, $error);
1728
-  }
1729
-  if (strlen($params['passwd_hash']) != 32) {
1728
+    }
1729
+    if (strlen($params['passwd_hash']) != 32) {
1730 1730
     xml_error(-1, 'password hash length not 32');
1731
-  }
1731
+    }
1732 1732
   
1733
-  // Process input
1734
-  // Check this email against previous email addresses.
1735
-  $tmpuser = BoincUser::lookup_prev_email_addr($params['email_addr']);
1736
-  if ($tmpuser) {
1733
+    // Process input
1734
+    // Check this email against previous email addresses.
1735
+    $tmpuser = BoincUser::lookup_prev_email_addr($params['email_addr']);
1736
+    if ($tmpuser) {
1737 1737
     xml_error(-137);
1738
-  }
1738
+    }
1739 1739
 
1740
-  // Check this email on current email addresses.
1741
-  $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1742
-  if ($boinc_user) {
1740
+    // Check this email on current email addresses.
1741
+    $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1742
+    if ($boinc_user) {
1743 1743
     // Return authenticator for existing users
1744 1744
     if ( ($params['passwd_hash'] == $boinc_user->passwd_hash) or
1745 1745
     password_verify($params['passwd_hash'], $boinc_user->passwd_hash) ) {
1746
-      $output = array('authenticator' => $boinc_user->authenticator);
1746
+        $output = array('authenticator' => $boinc_user->authenticator);
1747 1747
     }
1748 1748
     else {
1749
-      xml_error(-137);
1749
+        xml_error(-137);
1750 1750
     }
1751
-  }
1752
-  else {
1751
+    }
1752
+    else {
1753 1753
     // Verify that there isn't somehow a Drupal user already (not possible with proper function)
1754 1754
     if ($existing_user = user_load(array('mail' => $params['email_addr']))) {
1755
-      xml_error(-137, 'account error');
1755
+        xml_error(-137, 'account error');
1756 1756
     }
1757 1757
     // Create new account
1758 1758
     $unrestricted_role = array_search('community member', user_roles(true));
1759 1759
 
1760 1760
     $newUser = array(
1761
-      'name' => $unique_name,
1762
-      'pass' => $params['passwd_hash'], // note: passing a hash here requires ALL passwords to be hashed via hook prior to interacting with the hash stored in the db
1763
-      'mail' => $params['email_addr'],
1764
-      'status' => 1,
1765
-      'init' => $params['email_addr'],
1766
-      'roles' => array($unrestricted_role => ''),
1767
-      'boincuser_name' => $params['user_name'],
1768
-      'boinchash_flag' => TRUE,
1761
+        'name' => $unique_name,
1762
+        'pass' => $params['passwd_hash'], // note: passing a hash here requires ALL passwords to be hashed via hook prior to interacting with the hash stored in the db
1763
+        'mail' => $params['email_addr'],
1764
+        'status' => 1,
1765
+        'init' => $params['email_addr'],
1766
+        'roles' => array($unrestricted_role => ''),
1767
+        'boincuser_name' => $params['user_name'],
1768
+        'boinchash_flag' => TRUE,
1769 1769
     );
1770 1770
 
1771 1771
     // Create the drupal user. If the drupal user cannot be created,
@@ -1773,17 +1773,17 @@  discard block
 block discarded – undo
1773 1773
     // The user is created in the 'insert' op in hook_user.
1774 1774
     $user = user_save(null, $newUser);
1775 1775
     if (!$user) {
1776
-      watchdog('boincuser', 'create_account: Failed to create Drupal user account for @email', array('@email' => $params['email_addr']), WATCHDOG_WARNING);
1777
-      xml_error(-137, 'error creating BOINC account');
1776
+        watchdog('boincuser', 'create_account: Failed to create Drupal user account for @email', array('@email' => $params['email_addr']), WATCHDOG_WARNING);
1777
+        xml_error(-137, 'error creating BOINC account');
1778 1778
     }// if drupal user created.
1779 1779
 
1780 1780
     $output = array('authenticator' => $user->boincuser_account_key);
1781
-  }// if existing user found.
1781
+    }// if existing user found.
1782 1782
 
1783
-  // Output authenticator
1784
-  echo " <account_out>\n";
1785
-  echo "   <authenticator>{$output['authenticator']}</authenticator>\n";
1786
-  echo "</account_out>\n";
1783
+    // Output authenticator
1784
+    echo " <account_out>\n";
1785
+    echo "   <authenticator>{$output['authenticator']}</authenticator>\n";
1786
+    echo "</account_out>\n";
1787 1787
 }
1788 1788
 
1789 1789
 /**
@@ -1791,166 +1791,166 @@  discard block
 block discarded – undo
1791 1791
  * account is created using the BOINC clinet.
1792 1792
  */
1793 1793
 function boincuser_account_finish() {
1794
-  global $user;
1794
+    global $user;
1795 1795
 
1796
-  $authtoken = isset($_GET['auth']) ? $_GET['auth'] : '';
1796
+    $authtoken = isset($_GET['auth']) ? $_GET['auth'] : '';
1797 1797
 
1798
-  // Ensure there is a authentication token before continuing
1799
-  if (empty($authtoken)) {
1798
+    // Ensure there is a authentication token before continuing
1799
+    if (empty($authtoken)) {
1800 1800
     drupal_not_found();
1801 1801
     return ;
1802
-  }
1802
+    }
1803 1803
 
1804
-  if (strlen($authtoken) != 32) {
1804
+    if (strlen($authtoken) != 32) {
1805 1805
     drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1806 1806
     drupal_goto();
1807
-  }
1807
+    }
1808 1808
 
1809
-  require_boinc('boinc_db');
1810
-  $boinc_user = BoincUser::lookup("authenticator='".addslashes($authtoken)."'");
1811
-  if (!$boinc_user) {
1809
+    require_boinc('boinc_db');
1810
+    $boinc_user = BoincUser::lookup("authenticator='".addslashes($authtoken)."'");
1811
+    if (!$boinc_user) {
1812 1812
     drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1813 1813
     drupal_goto();
1814
-  }
1815
-  $user = user_load(get_drupal_id($boinc_user->id));
1814
+    }
1815
+    $user = user_load(get_drupal_id($boinc_user->id));
1816 1816
 
1817
-  if (!$user) {
1817
+    if (!$user) {
1818 1818
     drupal_set_message(bts('ERROR: There was a problem loading your account. Try logging in with your user name and password.', array(), NULL, 'boinc:account-finish'), 'error');
1819 1819
     drupal_goto();
1820
-  }
1820
+    }
1821 1821
 
1822
-  // Lookup path to custom account finish page
1823
-  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1824
-  if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1822
+    // Lookup path to custom account finish page
1823
+    $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1824
+    if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1825 1825
     $node = menu_get_object('node', 1, $customaccountfinishpath);
1826 1826
     if ($node) {
1827
-      return node_page_view($node);
1827
+        return node_page_view($node);
1828
+    }
1828 1829
     }
1829
-  }
1830 1830
 
1831
-  // open links in new window
1832
-  $options = array(
1831
+    // open links in new window
1832
+    $options = array(
1833 1833
     'attributes' => array( 'target' => '_blank' ),
1834
-  );
1834
+    );
1835 1835
 
1836
-  // Check moderation page exists
1837
-  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1838
-  if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1836
+    // Check moderation page exists
1837
+    $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1838
+    if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1839 1839
     $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
1840
-  } else {
1840
+    } else {
1841 1841
     $modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
1842
-  }
1842
+    }
1843 1843
 
1844
-  $username = $user->boincuser_name;
1845
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1846
-  $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1847
-  array(
1844
+    $username = $user->boincuser_name;
1845
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1846
+    $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1847
+    array(
1848 1848
     '@user_name' => $username,
1849 1849
     '@site_name' => $site_name,
1850
-  ), NULL, 'boinc:account-finish') . "</p>";
1850
+    ), NULL, 'boinc:account-finish') . "</p>";
1851 1851
 
1852
-  $links = array(
1852
+    $links = array(
1853 1853
     array(
1854
-      'data' => bts('Change your username at !community_preferences.', array(
1854
+        'data' => bts('Change your username at !community_preferences.', array(
1855 1855
         '!community_preferences' => l(bts('Community Preferences', array(), NULL, 'boinc:account-fininsh'), 'account/prefs/community', $options),
1856
-      ), NULL, 'boinc:account-finish'),
1857
-      'children' => array(
1856
+        ), NULL, 'boinc:account-finish'),
1857
+        'children' => array(
1858 1858
         bts('Your username is used to identify yourself to other volunteers on this Web site.', array(), NULL, 'boinc:account-finish'),
1859 1859
         bts('In addition, you may set your account\'s default language and adjust notification settings.', array(), NULL, 'boinc:account-finish'),
1860
-      ),
1860
+        ),
1861 1861
     ),
1862 1862
     array(
1863
-      'data' => bts('Change your !computing_preferences.', array(
1863
+        'data' => bts('Change your !computing_preferences.', array(
1864 1864
         '!computing_preferences' => l(bts('Computing Preferences', array(), NULL, 'boinc:account-finish'), 'account/prefs', $options),
1865
-      ), NULL, 'boinc:account-finish'),
1866
-      'children' => array(
1865
+        ), NULL, 'boinc:account-finish'),
1866
+        'children' => array(
1867 1867
         bts('You may adjust how much CPU, RAM, and Disk space the BOINC client is allowed to use for tasks on your computer.', array(), NULL, 'boinc:account-finish'),
1868 1868
         bts('By default, you will run @site_name tasks without any additional configuration.', array(
1869
-          '@site_name' => $site_name,
1869
+            '@site_name' => $site_name,
1870 1870
         ), NULL, 'boinc:account-finish'),
1871 1871
         bts('It is recommended new volunteers leave the default settings until they gain experience running some tasks. Ask questions in the !forums to get advice before making changes to a setting you don\'t understand.', array(
1872
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options),
1872
+            '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options),
1873 1873
         ), NULL, 'boinc:account-finish'),
1874
-      ),
1874
+        ),
1875 1875
     ),
1876 1876
     array(
1877 1877
         'data' => bts('Create a !user_profile.', array(
1878
-          '!user_profile' => l(bts('User Profile', array(), NULL, 'boinc:account-finish'), '/account/profile/edit', $options),
1878
+            '!user_profile' => l(bts('User Profile', array(), NULL, 'boinc:account-finish'), '/account/profile/edit', $options),
1879 1879
         ), NULL, 'boinc:account-finish'),
1880
-      'children' => array(
1880
+        'children' => array(
1881 1881
         bts('A user profile will inform other volunteers who you are and why you joined @site_name.', array(
1882
-          '@site_name' => $site_name,
1882
+            '@site_name' => $site_name,
1883 1883
         ), NULL, 'boinc:account-finish'),
1884 1884
         $modsentence,
1885
-      ),
1885
+        ),
1886 1886
     ),
1887 1887
     array(
1888
-      'data' => bts('Join a !team.', array(
1888
+        'data' => bts('Join a !team.', array(
1889 1889
         '!team' => l(bts('Team', array(), NULL, 'boinc:account-finish'), '/community/teams', $options),
1890
-      ), NULL, 'boinc:account-finish'),
1891
-      'children' => array(
1890
+        ), NULL, 'boinc:account-finish'),
1891
+        'children' => array(
1892 1892
         bts('You may join a team, made up of other volunteers.', array(), NULL, 'boinc:account-finish'),
1893
-      ),
1893
+        ),
1894 1894
     ),
1895 1895
     array(
1896
-      'data' => bts('Go to your !account_dashboard.', array(
1896
+        'data' => bts('Go to your !account_dashboard.', array(
1897 1897
         '!account_dashboard'=> l(bts('Account Dashboard', array(), NULL, 'boinc:account-finish'), 'account/dashboard', $options),
1898
-      ), NULL, 'boinc:account-finish'),
1899
-      'children' => array(
1898
+        ), NULL, 'boinc:account-finish'),
1899
+        'children' => array(
1900 1900
         bts('Your account dashboard has information and links about your computer(s) and task(s) assigned.', array(), NULL, 'boinc:account-finish'),
1901
-      ),
1901
+        ),
1902 1902
     ),
1903 1903
     array(
1904
-      'data' => bts('Visit our !help pages.', array(
1904
+        'data' => bts('Visit our !help pages.', array(
1905 1905
         '!help' => l(bts('Help', array(), NULL, 'boinc:account-finish'), '/help', $options)
1906
-      ), NULL, 'boinc:account-finish'),
1907
-      'children' => array(
1906
+        ), NULL, 'boinc:account-finish'),
1907
+        'children' => array(
1908 1908
         bts('Ask for help in our community\'s !forums.', array(
1909
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options)
1909
+            '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options)
1910 1910
         ), NULL, 'boinc:account-finish'),
1911
-      ),
1911
+        ),
1912 1912
     ),
1913
-  );
1913
+    );
1914 1914
 
1915
-  //List of links
1916
-  $output .= theme_item_list($links, $title = NULL, $type='ul');
1915
+    //List of links
1916
+    $output .= theme_item_list($links, $title = NULL, $type='ul');
1917 1917
 
1918
-  return $output;
1918
+    return $output;
1919 1919
 }
1920 1920
 
1921 1921
 /**
1922 1922
  * Determine if the user has permission to control community access
1923 1923
  */
1924 1924
 function boincuser_moderate_community_access() {
1925
-  if (user_access('assign community member role')
1925
+    if (user_access('assign community member role')
1926 1926
   OR user_access('assign all roles')) {
1927 1927
     return TRUE;
1928
-  }
1929
-  return FALSE;
1928
+    }
1929
+    return FALSE;
1930 1930
 }
1931 1931
 
1932 1932
 /**
1933 1933
  * Get the count of items in the moderation queue
1934 1934
  */
1935 1935
 function boincuser_moderation_queue_count($caller = 'user') {
1936
-  $allowed = FALSE;
1937
-  switch ($caller) {
1938
-  case 'cron':
1936
+    $allowed = FALSE;
1937
+    switch ($caller) {
1938
+    case 'cron':
1939 1939
     $allowed = TRUE;
1940 1940
     break;
1941
-  case 'user':
1941
+    case 'user':
1942 1942
   default:
1943 1943
     $allowed = user_access('edit any profile content');
1944
-  }
1945
-  if ($allowed) {
1944
+    }
1945
+    if ($allowed) {
1946 1946
     return db_result(db_query("
1947 1947
       SELECT COUNT(*)
1948 1948
       FROM {node}
1949 1949
       WHERE type = 'profile'
1950 1950
       AND moderate = 1"
1951 1951
     ));
1952
-  }
1953
-  return NULL;
1952
+    }
1953
+    return NULL;
1954 1954
 }
1955 1955
 
1956 1956
 /**
@@ -1959,43 +1959,43 @@  discard block
 block discarded – undo
1959 1959
  * than through the user account info form.
1960 1960
  */
1961 1961
 function boincuser_control($uid = NULL, $action = NULL) {
1962
-  if (!$uid OR !$account = user_load($uid)) {
1962
+    if (!$uid OR !$account = user_load($uid)) {
1963 1963
     // What are you even doing here...
1964 1964
     return FALSE;
1965
-  }
1966
-  switch ($action) {
1967
-  case 'ban':
1965
+    }
1966
+    switch ($action) {
1967
+    case 'ban':
1968 1968
     if (boincuser_moderate_community_access()) {
1969
-      $penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
1970
-      $boincuser_record = array(
1969
+        $penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
1970
+        $boincuser_record = array(
1971 1971
         'uid' => $uid,
1972 1972
         'penalty_expiration' => time() + $penalty_period,
1973
-      );
1974
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
1975
-      $community_role = array_search('community member', user_roles(true));
1976
-      if (isset($account->roles[$community_role])) {
1973
+        );
1974
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
1975
+        $community_role = array_search('community member', user_roles(true));
1976
+        if (isset($account->roles[$community_role])) {
1977 1977
         unset($account->roles[$community_role]);
1978 1978
         user_save($account, array('roles' => $account->roles));
1979
-      }
1979
+        }
1980 1980
     }
1981 1981
     break;
1982
-  case 'lift-ban':
1982
+    case 'lift-ban':
1983 1983
     if (boincuser_moderate_community_access()) {
1984
-      $boincuser_record = array(
1984
+        $boincuser_record = array(
1985 1985
         'uid' => $uid,
1986 1986
         'penalty_expiration' => 0,
1987
-      );
1988
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
1989
-      $community_role = array_search('community member', user_roles(true));
1990
-      if (!isset($account->roles[$community_role])) {
1987
+        );
1988
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
1989
+        $community_role = array_search('community member', user_roles(true));
1990
+        if (!isset($account->roles[$community_role])) {
1991 1991
         $account->roles[$community_role] = 'community member';
1992 1992
         user_save($account, array('roles' => $account->roles));
1993
-      }
1993
+        }
1994 1994
     }
1995 1995
     break;
1996
-  default:
1996
+    default:
1997 1997
   }
1998
-  drupal_goto("account/{$account->uid}");
1998
+    drupal_goto("account/{$account->uid}");
1999 1999
 }
2000 2000
 
2001 2001
 /**
@@ -2003,29 +2003,29 @@  discard block
 block discarded – undo
2003 2003
  * moderation flag.
2004 2004
  */
2005 2005
 function boincuser_moderate_profile_approve($account) {
2006
-  $node = new stdClass;
2007
-  $node->type = 'profile';
2008
-  $node->language = '';
2009
-  $nid = content_profile_profile_exists($node, $account->uid);
2010
-  $profile = node_load($nid);
2011
-  $profile->moderate = 0;
2012
-  $profile->status = 1;
2013
-  node_save($profile);
2014
-  drupal_set_message('This profile has been marked as approved.');
2015
-  drupal_goto();
2006
+    $node = new stdClass;
2007
+    $node->type = 'profile';
2008
+    $node->language = '';
2009
+    $nid = content_profile_profile_exists($node, $account->uid);
2010
+    $profile = node_load($nid);
2011
+    $profile->moderate = 0;
2012
+    $profile->status = 1;
2013
+    node_save($profile);
2014
+    drupal_set_message('This profile has been marked as approved.');
2015
+    drupal_goto();
2016 2016
 }
2017 2017
 
2018 2018
 /**
2019 2019
  * Mark a user profile as rejected and notify the user of the reason.
2020 2020
  */
2021 2021
 function boincuser_moderate_profile_reject($uid, $reason = '') {
2022
-  $account = user_load($uid);
2023
-  $node = new stdClass;
2024
-  $node->type = 'profile';
2025
-  $node->language = '';
2026
-  $nid = content_profile_profile_exists($node, $uid);
2027
-  $profile = node_load($nid);
2028
-  if ($profile->nid) {
2022
+    $account = user_load($uid);
2023
+    $node = new stdClass;
2024
+    $node->type = 'profile';
2025
+    $node->language = '';
2026
+    $nid = content_profile_profile_exists($node, $uid);
2027
+    $profile = node_load($nid);
2028
+    if ($profile->nid) {
2029 2029
     global $user;
2030 2030
     global $base_url;
2031 2031
     global $base_path;
@@ -2036,64 +2036,64 @@  discard block
 block discarded – undo
2036 2036
     $profile->status = 0;
2037 2037
     node_save($profile);
2038 2038
     $settings = array(
2039
-      'from' => '',
2040
-      'subject' => "Profile moderation at {$site_name}",
2041
-      'message' => ''
2042
-      . "{$account->boincuser_name},\n"
2043
-      . "\n"
2044
-      . "{$moderator->boincuser_name} has rejected your profile at"
2045
-      . " {$site_name} for the following reason: \n"
2046
-      . "\n"
2047
-      . "{$reason}\n"
2048
-      . "\n"
2049
-      . "\n"
2050
-      . "Since it has not been approved, your profile is not visible to other"
2051
-      . " {$site_name} users. Please make the needed changes here:\n"
2052
-      . "\n"
2053
-      . "{$site_url}account/profile \n"
2054
-      . "\n"
2055
-      . "Thanks, \n"
2056
-      . "\n"
2057
-      . "{$site_name} support team",
2039
+        'from' => '',
2040
+        'subject' => "Profile moderation at {$site_name}",
2041
+        'message' => ''
2042
+        . "{$account->boincuser_name},\n"
2043
+        . "\n"
2044
+        . "{$moderator->boincuser_name} has rejected your profile at"
2045
+        . " {$site_name} for the following reason: \n"
2046
+        . "\n"
2047
+        . "{$reason}\n"
2048
+        . "\n"
2049
+        . "\n"
2050
+        . "Since it has not been approved, your profile is not visible to other"
2051
+        . " {$site_name} users. Please make the needed changes here:\n"
2052
+        . "\n"
2053
+        . "{$site_url}account/profile \n"
2054
+        . "\n"
2055
+        . "Thanks, \n"
2056
+        . "\n"
2057
+        . "{$site_name} support team",
2058 2058
     );
2059 2059
     rules_action_mail_to_user($account, $settings);
2060 2060
     drupal_set_message('This profile has been marked as rejected.');
2061
-  }
2062
-  drupal_goto();
2061
+    }
2062
+    drupal_goto();
2063 2063
 }
2064 2064
 
2065 2065
 /**
2066 2066
  * Ban a user and send a notification of the reason.
2067 2067
  */
2068 2068
 function boincuser_moderate_user_ban($uid, $reason = '', $duration = '') {
2069
-  if (user_access('assign community member role')
2069
+    if (user_access('assign community member role')
2070 2070
   OR user_access('assign all roles')) {
2071 2071
     $account = user_load($uid);
2072 2072
     if ($account->uid) {
2073
-      module_load_include('inc', 'rules', 'modules/system.rules');
2074
-      if ($duration === '') {
2073
+        module_load_include('inc', 'rules', 'modules/system.rules');
2074
+        if ($duration === '') {
2075 2075
         $duration = variable_get('boinc_penalty_period', 7*24*60*60);
2076
-      }
2077
-      $penalty_expiration = ($duration > 0) ? time() + $duration : 4294967295;
2078
-      $boincuser_record = array(
2076
+        }
2077
+        $penalty_expiration = ($duration > 0) ? time() + $duration : 4294967295;
2078
+        $boincuser_record = array(
2079 2079
         'uid' => $uid,
2080 2080
         'penalty_expiration' => $penalty_expiration,
2081
-      );
2082
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
2081
+        );
2082
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
2083 2083
       
2084
-      $community_role = array_search('community member', user_roles(true));
2085
-      if (isset($account->roles[$community_role])) {
2084
+        $community_role = array_search('community member', user_roles(true));
2085
+        if (isset($account->roles[$community_role])) {
2086 2086
         unset($account->roles[$community_role]);
2087 2087
         user_save($account, array('roles' => $account->roles));
2088
-      }
2088
+        }
2089 2089
       
2090
-      global $user;
2091
-      global $base_url;
2092
-      global $base_path;
2093
-      $site_name = variable_get('site_name', 'Drupal-BOINC');
2094
-      $site_url = $base_url . $base_path;
2095
-      $moderator = user_load($user->uid);
2096
-      $settings = array(
2090
+        global $user;
2091
+        global $base_url;
2092
+        global $base_path;
2093
+        $site_name = variable_get('site_name', 'Drupal-BOINC');
2094
+        $site_url = $base_url . $base_path;
2095
+        $moderator = user_load($user->uid);
2096
+        $settings = array(
2097 2097
         'from' => '',
2098 2098
         'subject' => "User moderation at {$site_name}",
2099 2099
         'message' => ''
@@ -2114,12 +2114,12 @@  discard block
 block discarded – undo
2114 2114
         . "Thanks, \n"
2115 2115
         . "\n"
2116 2116
         . "{$site_name} support team",
2117
-      );
2118
-      rules_action_mail_to_user($account, $settings);
2119
-      drupal_set_message('This user has been banned.');
2117
+        );
2118
+        rules_action_mail_to_user($account, $settings);
2119
+        drupal_set_message('This user has been banned.');
2120 2120
     }
2121
-  }
2122
-  drupal_goto();
2121
+    }
2122
+    drupal_goto();
2123 2123
 }
2124 2124
 
2125 2125
 
@@ -2131,15 +2131,15 @@  discard block
 block discarded – undo
2131 2131
  *
2132 2132
  */
2133 2133
 function boincuser_get_weak_auth($boinc_id = null) {
2134
-  if (!$boinc_id) {
2134
+    if (!$boinc_id) {
2135 2135
     global $user;
2136 2136
     $account = user_load($user->uid);
2137 2137
     $boinc_id = $account->boincuser_id;
2138
-  }
2138
+    }
2139 2139
   
2140
-  $boinc_user = boincuser_load($account->boincuser_id);
2140
+    $boinc_user = boincuser_load($account->boincuser_id);
2141 2141
   
2142
-  return weak_auth($boinc_user);
2142
+    return weak_auth($boinc_user);
2143 2143
 }
2144 2144
 
2145 2145
 /**
@@ -2148,75 +2148,75 @@  discard block
 block discarded – undo
2148 2148
  * Drupal User so must be inserted into comments, etc. (not so by default)
2149 2149
  */
2150 2150
 function boincuser_get_user_profile_image($uid, $avatar = TRUE) {
2151
-  // Though the function name implies otherwise, get the avatar by default
2152
-  $image_field = ($avatar) ? 'field_image_fid' : 'field_profile_image_fid';
2153
-  $image_fid = db_result(db_query("
2151
+    // Though the function name implies otherwise, get the avatar by default
2152
+    $image_field = ($avatar) ? 'field_image_fid' : 'field_profile_image_fid';
2153
+    $image_fid = db_result(db_query("
2154 2154
     SELECT ctp.%s
2155 2155
     FROM {content_type_profile} ctp
2156 2156
     INNER JOIN {node} n ON ctp.nid = n.nid
2157 2157
     WHERE n.uid = %d AND n.type = '%s'",
2158 2158
     $image_field, $uid, 'profile'));
2159
-  $user_image['image'] = field_file_load($image_fid);
2160
-  if (!$user_image['image']['filepath']) {
2159
+    $user_image['image'] = field_file_load($image_fid);
2160
+    if (!$user_image['image']['filepath']) {
2161 2161
     // Load the default image if one does not exist
2162 2162
     $account = user_load($uid);
2163 2163
     if ($avatar AND module_exists('gravatar') AND user_access('use gravatar', $account) AND $account->gravatar) {
2164
-      // Use a Gravatar rather than the system default image
2165
-      $options = array(
2164
+        // Use a Gravatar rather than the system default image
2165
+        $options = array(
2166 2166
         'size' => 100,
2167 2167
         'rating' => 'G',
2168
-      );
2169
-      // Get the Gravatar URL and see if the image exists
2170
-      $url = gravatar_get_gravatar($account->mail, $options);
2171
-      $headers = @get_headers($url);
2172
-      if (preg_match("|200|", $headers[0])) {
2168
+        );
2169
+        // Get the Gravatar URL and see if the image exists
2170
+        $url = gravatar_get_gravatar($account->mail, $options);
2171
+        $headers = @get_headers($url);
2172
+        if (preg_match("|200|", $headers[0])) {
2173 2173
         return $url;
2174
-      }
2174
+        }
2175 2175
     }
2176 2176
     // Get default image if nothing else works
2177 2177
     $content_node_widget_settings = db_result(db_query("SELECT widget_settings FROM {content_node_field_instance} WHERE field_name = '%s'", ($avatar ? 'field_image' : 'field_profile_image')));
2178 2178
     $content_node_widget_settings = unserialize($content_node_widget_settings);
2179 2179
     $user_image['image'] = $content_node_widget_settings['default_image'];
2180
-  }
2181
-  $user = user_load($uid);
2182
-  // Use boinc username for image alt/title attributes
2183
-  $user_image['alt'] = $user->boincuser_name;
2184
-  return $user_image;
2180
+    }
2181
+    $user = user_load($uid);
2182
+    // Use boinc username for image alt/title attributes
2183
+    $user_image['alt'] = $user->boincuser_name;
2184
+    return $user_image;
2185 2185
 }
2186 2186
 
2187 2187
 /**
2188 2188
  * Generate a table of a user's projects
2189 2189
  */
2190 2190
 function boincuser_get_projects_table($account = null) {
2191
-  if ($account AND is_numeric($account)) {
2191
+    if ($account AND is_numeric($account)) {
2192 2192
     $account = user_load($account);
2193
-  }
2194
-  $projects = boincuser_get_projects($account);
2195
-  if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2193
+    }
2194
+    $projects = boincuser_get_projects($account);
2195
+    if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2196 2196
   
2197
-  $output = '';
2198
-  $output .= '<table class="user-projects">' . "\n";
2199
-  $output .= '<thead>' . "\n";
2200
-  $output .= '  <tr>' . "\n";
2201
-  $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2202
-  $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2203
-  $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2204
-  $output .= '  </tr>' . "\n";
2205
-  $output .= '</thead>' . "\n";
2206
-  $output .= '<tbody>' . "\n";
2207
-  foreach ($projects AS $project) {
2197
+    $output = '';
2198
+    $output .= '<table class="user-projects">' . "\n";
2199
+    $output .= '<thead>' . "\n";
2200
+    $output .= '  <tr>' . "\n";
2201
+    $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2202
+    $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2203
+    $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2204
+    $output .= '  </tr>' . "\n";
2205
+    $output .= '</thead>' . "\n";
2206
+    $output .= '<tbody>' . "\n";
2207
+    foreach ($projects AS $project) {
2208 2208
     $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
2209 2209
     $output .= '  <tr>' . "\n";
2210 2210
     $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
2211 2211
     $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->expavg_credit) . '</td>' . "\n"; 
2212 2212
     $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->total_credit) . '</td>' . "\n";
2213 2213
     $output .= '  </tr>' . "\n";
2214
-  }
2215
-  $output .= '</tbody>' . "\n";
2216
-  $output .= '</table>' . "\n";
2217
-  $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2218
-  //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2219
-  return $output;
2214
+    }
2215
+    $output .= '</tbody>' . "\n";
2216
+    $output .= '</table>' . "\n";
2217
+    $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2218
+    //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2219
+    return $output;
2220 2220
 }
2221 2221
 
2222 2222
 /**
@@ -2224,25 +2224,25 @@  discard block
 block discarded – undo
2224 2224
  */
2225 2225
 function boincuser_get_stats_user_data($cpid = null) {
2226 2226
   
2227
-  // [TODO] Set this stuff in site config!
2228
-  $stats_server = 'stats.gridrepublic.org';
2229
-  $stats_rpc = 'rpc/get_user.php';
2227
+    // [TODO] Set this stuff in site config!
2228
+    $stats_server = 'stats.gridrepublic.org';
2229
+    $stats_rpc = 'rpc/get_user.php';
2230 2230
   
2231
-  // Construct query string
2232
-  $get = array(
2231
+    // Construct query string
2232
+    $get = array(
2233 2233
     'cpid' => $cpid
2234
-  );
2235
-  $args = array();
2236
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2237
-  $query = '?' . implode('&', $args);
2234
+    );
2235
+    $args = array();
2236
+    foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2237
+    $query = '?' . implode('&', $args);
2238 2238
   
2239
-  // Load XML from RPC
2240
-  $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
2241
-  $result = drupal_http_request($target_url);
2242
-  if (in_array($result->code, array(200, 304))) {
2239
+    // Load XML from RPC
2240
+    $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
2241
+    $result = drupal_http_request($target_url);
2242
+    if (in_array($result->code, array(200, 304))) {
2243 2243
     return simplexml_load_string($result->data);
2244
-  }
2245
-  return NULL;
2244
+    }
2245
+    return NULL;
2246 2246
 }
2247 2247
 
2248 2248
 /**
@@ -2250,15 +2250,15 @@  discard block
 block discarded – undo
2250 2250
  */
2251 2251
 function boincuser_get_projects($account = null) {
2252 2252
   
2253
-  // Use the current user by default
2254
-  if (!$account) {
2253
+    // Use the current user by default
2254
+    if (!$account) {
2255 2255
     global $user;
2256 2256
     $account = user_load($user->uid);
2257
-  }
2257
+    }
2258 2258
   
2259
-  $account_stats = boincuser_get_stats_user_data($account->boincuser_cpid);
2259
+    $account_stats = boincuser_get_stats_user_data($account->boincuser_cpid);
2260 2260
   
2261
-  return ($account_stats AND isset($account_stats->project)) ? $account_stats->project : null;
2261
+    return ($account_stats AND isset($account_stats->project)) ? $account_stats->project : null;
2262 2262
 }
2263 2263
 
2264 2264
 
@@ -2266,11 +2266,11 @@  discard block
 block discarded – undo
2266 2266
  * Get the links to display under the user profile
2267 2267
  */
2268 2268
 function boincuser_get_profile_links($uid) {
2269
-  global $user;
2270
-  $account = user_load($uid);
2271
-  $profile = content_profile_load('profile', $account->uid);
2272
-  $output = '';
2273
-  if ($profile) {
2269
+    global $user;
2270
+    $account = user_load($uid);
2271
+    $profile = content_profile_load('profile', $account->uid);
2272
+    $output = '';
2273
+    if ($profile) {
2274 2274
     $profile_is_approved = ($profile->status AND !$profile->moderate);
2275 2275
     $user_is_moderator = user_access('edit any profile content');
2276 2276
     $is_own_profile = ($user->uid == $account->uid);
@@ -2278,15 +2278,15 @@  discard block
 block discarded – undo
2278 2278
     $links = array();
2279 2279
     
2280 2280
     if ($profile->moderate AND $user_is_moderator) {
2281
-      $links['approve_profile'] = array(
2281
+        $links['approve_profile'] = array(
2282 2282
         'title' => bts('Approve profile', array(), NULL, 'boinc:moderate-user'),
2283 2283
         'href' => "{$profile_moderation_path}/approve",
2284 2284
         'attributes' => array(
2285
-          'title' => bts('Approve this profile content', array(), NULL, 'boinc:moderate-user'),
2286
-          'class' => 'first primary tab',
2285
+            'title' => bts('Approve this profile content', array(), NULL, 'boinc:moderate-user'),
2286
+            'class' => 'first primary tab',
2287 2287
         )
2288
-      );
2289
-      /*$links['edit_profile'] = array(
2288
+        );
2289
+        /*$links['edit_profile'] = array(
2290 2290
         'title' => bts('Edit profile', array(), NULL, 'boinc:moderate-user'),
2291 2291
         'href' => "{$profile_moderation_path}/edit",
2292 2292
         'attributes' => array(
@@ -2294,27 +2294,27 @@  discard block
 block discarded – undo
2294 2294
           'class' => 'tab',
2295 2295
         )
2296 2296
       );*/
2297
-      $links['reject_profile'] = array(
2297
+        $links['reject_profile'] = array(
2298 2298
         'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
2299 2299
         'href' => "{$profile_moderation_path}/reject",
2300 2300
         'attributes' => array(
2301
-          'title' => bts('Reject this profile content', array(), NULL, 'boinc:moderate-user'),
2302
-          'class' => 'tab',
2301
+            'title' => bts('Reject this profile content', array(), NULL, 'boinc:moderate-user'),
2302
+            'class' => 'tab',
2303 2303
         )
2304
-      );
2304
+        );
2305 2305
     }
2306 2306
     $output .= '<ul class="tab-list">';
2307 2307
     $count = 0;
2308 2308
     foreach ($links as $key => $link) {
2309
-      $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2310
-      $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2311
-      $output .= '</li>';
2312
-      $count++;
2309
+        $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2310
+        $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2311
+        $output .= '</li>';
2312
+        $count++;
2313 2313
     }
2314 2314
     $output .= '<li class="' . (($count) ? '' : 'first ') . 'last tab">' . flag_create_link('abuse_user_meta', $account->uid) . '</li>';
2315 2315
     $output .= '</ul>';
2316
-  }
2317
-  return $output;
2316
+    }
2317
+    return $output;
2318 2318
 /*
2319 2319
 <ul class="tab-list">
2320 2320
   <li class="primary first tab">
@@ -2351,36 +2351,36 @@  discard block
 block discarded – undo
2351 2351
  */
2352 2352
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
2353 2353
 
2354
-  foreach ($documents as $document) {
2354
+    foreach ($documents as $document) {
2355 2355
     if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
2356
-      // Node information.
2357
-      $nid = $document->entity_id;
2358
-      $node = node_load($nid);
2359
-      $account = user_load($node->uid);
2360
-
2361
-      // Use boincuser name and not drupal user name
2362
-      $document->label = apachesolr_clean_text($account->boincuser_name);
2363
-      // Author information
2364
-      if ($node->uid == 0 || strlen($node->name) == 0) {
2356
+        // Node information.
2357
+        $nid = $document->entity_id;
2358
+        $node = node_load($nid);
2359
+        $account = user_load($node->uid);
2360
+
2361
+        // Use boincuser name and not drupal user name
2362
+        $document->label = apachesolr_clean_text($account->boincuser_name);
2363
+        // Author information
2364
+        if ($node->uid == 0 || strlen($node->name) == 0) {
2365 2365
         // @see user_validate_name(). !'0' === TRUE.
2366 2366
         $document->ss_name = '0';
2367
-      }
2368
-      else {
2367
+        }
2368
+        else {
2369 2369
         $document->ss_name = $account->boincuser_name;
2370 2370
         // We want the name to be searchable for keywords.
2371 2371
         $document->tos_name = $account->boincuser_name;
2372
-      }
2372
+        }
2373 2373
 
2374
-      // Rename "Profle" to "User"
2375
-      $document->bundle = "User";
2376
-      $document->bundle_name = "User";
2374
+        // Rename "Profle" to "User"
2375
+        $document->bundle = "User";
2376
+        $document->bundle_name = "User";
2377 2377
 
2378
-      // Replace the Solr document's created field with the date the user 
2379
-      // account was created. This replaces the node creation date typically 
2380
-      // used for indexing nodes.
2381
-      $document->ds_created = apachesolr_date_iso($account->created);
2378
+        // Replace the Solr document's created field with the date the user 
2379
+        // account was created. This replaces the node creation date typically 
2380
+        // used for indexing nodes.
2381
+        $document->ds_created = apachesolr_date_iso($account->created);
2382
+    }
2382 2383
     }
2383
-  }
2384 2384
 
2385 2385
 }
2386 2386
 
@@ -2392,23 +2392,23 @@  discard block
 block discarded – undo
2392 2392
  * Implementation of hook_privatemsg_name_lookup();
2393 2393
  */
2394 2394
 function boincuser_privatemsg_name_lookup($string) {
2395
-  // Get the BOINC ID from the name string, and lookup the
2396
-  // corresponding drupal user.
2397
-  $boincname = substr($string, 0, strrpos($string, '_'));
2398
-  $boincid = substr($string, strrpos($string, '_') + 1);
2399
-  $drupalid = get_drupal_id($boincid);
2400
-
2401
-  // Name has spaced replaced with special UTF-8 characters in
2402
-  // privatemsg module. We need to convert them back to spaces for the
2403
-  // check below.
2404
-  $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2405
-  if ($drupalid>0) {
2395
+    // Get the BOINC ID from the name string, and lookup the
2396
+    // corresponding drupal user.
2397
+    $boincname = substr($string, 0, strrpos($string, '_'));
2398
+    $boincid = substr($string, strrpos($string, '_') + 1);
2399
+    $drupalid = get_drupal_id($boincid);
2400
+
2401
+    // Name has spaced replaced with special UTF-8 characters in
2402
+    // privatemsg module. We need to convert them back to spaces for the
2403
+    // check below.
2404
+    $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2405
+    if ($drupalid>0) {
2406 2406
     if ($recipient = user_load(array('uid' => $drupalid))) {
2407
-      // Double-check that the loaded user matches both boincuser_id
2408
-      // and boincuser_name.
2409
-      if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2407
+        // Double-check that the loaded user matches both boincuser_id
2408
+        // and boincuser_name.
2409
+        if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2410 2410
         return $recipient;
2411
-      }
2411
+        }
2412
+    }
2412 2413
     }
2413
-  }
2414 2414
 }
Please login to merge, or discard this patch.
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     'type' => MENU_CALLBACK
190 190
   );
191 191
   $items['account_finish.php'] = array(
192
-    'title' => 'Welcome to ' . variable_get('site_name', 'Drupal-BOINC'),
192
+    'title' => 'Welcome to '.variable_get('site_name', 'Drupal-BOINC'),
193 193
     'description' => 'RPC for after a user has created an account.',
194 194
     'page callback' => 'boincuser_account_finish',
195 195
     'access callback' => TRUE,
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
   // termsofuse is enabled, by having text in the termsofuse variable.
250 250
   $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251 251
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
-  if ( (!empty($termsofuse)) and ($user->uid) ) {
253
-    if ( !boincuser_check_termsofuse($user) and ($existinguser_tou) ) {
252
+  if ((!empty($termsofuse)) and ($user->uid)) {
253
+    if (!boincuser_check_termsofuse($user) and ($existinguser_tou)) {
254 254
 
255 255
       // Admins are exempt, otherwise the admin may not be able to
256 256
       // access the site!
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
           'user/termsofuse',
265 265
           'logout',
266 266
           'account/info/edit',
267
-          'user/' . $user->uid . '/edit',
268
-          'user/' . $user->uid . '/recoveremail/*',
267
+          'user/'.$user->uid.'/edit',
268
+          'user/'.$user->uid.'/recoveremail/*',
269 269
           'recover_email.php',
270 270
         );
271 271
         if (module_exists('boincuser_delete')) {
272
-          $paths0[] = 'user/' . $user->uid . '/delete';
273
-          $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
-          $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
272
+          $paths0[] = 'user/'.$user->uid.'/delete';
273
+          $paths0[] = 'user/'.$user->uid.'/deleteconfirm/*';
274
+          $paths0[] = 'user/'.$user->uid.'/odeleteconfirm/*';
275 275
         }
276 276
 
277 277
         // Paths added by the admin
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         }
283 283
 
284 284
         // paths to ignore
285
-        $paths_to_ignore = array_unique( array_merge($paths0, $paths2) );
285
+        $paths_to_ignore = array_unique(array_merge($paths0, $paths2));
286 286
 
287 287
         if (!_boincuser_ignore_paths($path, $paths_to_ignore)) {
288 288
           drupal_goto('user/termsofuse');
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
   require_boinc('password_compat/password');
305 305
   // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306 306
   if (isset($account->uid) && ($account->uid > 1)) {
307
-    switch($op) {
307
+    switch ($op) {
308 308
     case 'load':
309 309
       // User loading; insert BOINC data into the user object
310 310
       $drupal_user = db_fetch_object(db_query("
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
       ));
335 335
       $account->boincuser_name = $boinc_user->name;
336 336
       $account->boincuser_account_key = $boinc_user->authenticator;
337
-      $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
337
+      $account->boincuser_weak_auth = md5($boinc_user->authenticator.$boinc_user->passwd_hash);
338 338
       $account->boincuser_total_credit = round($boinc_user->total_credit);
339 339
       $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340 340
       $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
-      $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
341
+      $account->boincuser_cpid = md5($boinc_user->cross_project_id.$account->mail);
342 342
       $account->boincuser_default_pref_set = $boinc_user->venue;
343 343
       $account->boincteam_id = $boinc_user->teamid;
344 344
       $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
             // Set password hash appropriately
509 509
             $passwd = ($edit['pass']) ? $edit['pass'] : $edit['current_pass'];
510
-            $passwd_hash = password_hash( md5($passwd.$lower_email_addr), PASSWORD_DEFAULT );
510
+            $passwd_hash = password_hash(md5($passwd.$lower_email_addr), PASSWORD_DEFAULT);
511 511
             // Algorithm for changing email and/or password
512 512
             if ($changing_email) {
513 513
               // locally store current email to set as previous email
@@ -594,8 +594,8 @@  discard block
 block discarded – undo
594 594
   }
595 595
 
596 596
   // Check if user has agreed to terms of use.
597
-  if ( (!empty($termsofuse)) and ($account->uid) and 
598
-       (!boincuser_check_termsofuse($account)) and ($existinguser_tou) ) {
597
+  if ((!empty($termsofuse)) and ($account->uid) and 
598
+       (!boincuser_check_termsofuse($account)) and ($existinguser_tou)) {
599 599
 
600 600
     // Admins are exempted.
601 601
     $administrator_role = array_search('administrator', user_roles(true));
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
       $query_for_destination = '';
610 610
       $prevdest = $_REQUEST['destination'];
611 611
       if ($prevdest) {
612
-        $query_for_destination = '?destination=' . $prevdest;
612
+        $query_for_destination = '?destination='.$prevdest;
613 613
       }
614
-      $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
614
+      $_REQUEST['destination'] = $path_for_destination.$query_for_destination;
615 615
 
616 616
     }
617 617
   }
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
   // In Drupal 7, these operation cases will all exist as their own hooks,
645 645
   // so let's approximate that here so that this function can simply be removed
646 646
   // upon migration to 7
647
-  switch($op) {
647
+  switch ($op) {
648 648
   case 'update':
649 649
     boincuser_node_update($node);
650 650
   }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
  * is updated (forward compatible to Drupal 7)
656 656
  */
657 657
 function boincuser_node_update($node) {
658
-  switch($node->type) {
658
+  switch ($node->type) {
659 659
   case 'profile':
660 660
     // Update the BOINC database directly
661 661
     $account = user_load($node->uid);
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
     }
778 778
     
779 779
     $form['cancel'] = array(
780
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
780
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest).'</li>',
781 781
       '#weight' => 1004,
782 782
     );
783 783
     $form['form control tabs suffix'] = array(
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
811 811
     $form['buttons']['preview_changes']['#weight'] = 1004;
812 812
     $form['buttons']['cancel'] = array(
813
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
813
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}").'</li>',
814 814
       '#weight' => 1005,
815 815
     );
816 816
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
     $form['actions']['submit']['#suffix'] = '</li>';
843 843
     $form['actions']['submit']['#weight'] = 1002;
844 844
     $form['actions']['cancel'] = array(
845
-        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
845
+        '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}").'</li>',
846 846
       '#weight' => 1005,
847 847
     );
848 848
     $form['actions']['form control tabs suffix'] = array(
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
     $form['privatemsg']['preview']['#suffix'] = '</li>';
870 870
     $form['privatemsg']['preview']['#weight'] = 1003;
871 871
     $form['privatemsg']['cancel'] = array(
872
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
872
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
873 873
       '#weight' => 1004,
874 874
     );
875 875
     $form['privatemsg']['form control tabs suffix'] = array(
@@ -957,11 +957,11 @@  discard block
 block discarded – undo
957 957
     // Set special message if user has not agreed to TOU
958 958
     $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
959 959
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
960
-    if ( (!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users')) ) {
960
+    if ((!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users'))) {
961 961
       drupal_set_message(
962 962
         bts('INFO: You have not agreed to the terms of use for @project. You may use this form to change your email address and/or password. Please note: you may not delete your account within seven (7) days of changing your email address.',
963 963
         array(
964
-          '@project' => variable_get('site_name','Drupal-BOINC'),
964
+          '@project' => variable_get('site_name', 'Drupal-BOINC'),
965 965
         ), NULL, 'boinc:account-credentials-change')
966 966
       , 'info');
967 967
     }
@@ -1026,36 +1026,36 @@  discard block
 block discarded – undo
1026 1026
     $form['account']['boincuser_id'] = array(
1027 1027
       '#value' => '
1028 1028
         <div class="form-item">
1029
-          <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1030
-          <span>' . $account->boincuser_id . '</span>
1029
+          <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1030
+          <span>' . $account->boincuser_id.'</span>
1031 1031
         </div>',
1032 1032
     );
1033 1033
     $form['account']['user_id'] = array(
1034 1034
       '#value' => '
1035 1035
         <div class="form-item">
1036
-          <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1037
-          <span>' . $account->uid . '</span>
1036
+          <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1037
+          <span>' . $account->uid.'</span>
1038 1038
         </div>',
1039 1039
     );
1040 1040
     $form['account']['account_key'] = array(
1041 1041
       '#value' => '
1042 1042
         <div class="form-item">
1043
-          <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1044
-          <span>' . $account->boincuser_account_key . '</span>
1043
+          <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change').'</label>
1044
+          <span>' . $account->boincuser_account_key.'</span>
1045 1045
         </div>',
1046 1046
     );
1047 1047
     $form['account']['weak_account_key'] = array(
1048 1048
       '#value' => '
1049 1049
         <div class="form-item">
1050
-          <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1051
-          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
1050
+          <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change').'</label>
1051
+          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}".'</span>
1052 1052
         </div>',
1053 1053
     );
1054 1054
     $form['account']['cpid'] = array(
1055 1055
       '#value' => '
1056 1056
         <div class="form-item">
1057
-          <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1058
-          <span>' . $account->boincuser_cpid . '</span>
1057
+          <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1058
+          <span>' . $account->boincuser_cpid.'</span>
1059 1059
         </div>',
1060 1060
     );
1061 1061
     
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
     $form['submit']['#suffix'] = '</li>';
1074 1074
     $form['submit']['#weight'] = 1002;
1075 1075
     $form['cancel'] = array(
1076
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1076
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
1077 1077
       '#weight' => 1003,
1078 1078
     );
1079 1079
     if (isset($form['delete']) AND is_array($form['delete'])) {
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
1170 1170
     $form['buttons']['preview_changes']['#weight'] = 1004;
1171 1171
     $form['buttons']['cancel'] = array(
1172
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1172
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
1173 1173
       '#weight' => 1005,
1174 1174
     );
1175 1175
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -1218,11 +1218,11 @@  discard block
 block discarded – undo
1218 1218
     // Set name temporarily to dummy value to beat validation
1219 1219
     $form['name'] = array(
1220 1220
       '#type' => 'hidden',
1221
-      '#value' => rand() . '.' . time()
1221
+      '#value' => rand().'.'.time()
1222 1222
     );
1223 1223
 
1224 1224
     // Add JS for submit button disabling
1225
-    drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
1225
+    drupal_add_js(drupal_get_path('module', 'boincuser').'/boincuser.js');
1226 1226
 
1227 1227
     // Terms of use section
1228 1228
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
 
1239 1239
       $form['termsofuse']['title1'] = array(
1240 1240
         '#weight' => -12,
1241
-        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register' ) . '</h2>',
1241
+        '#value' => '<h2>'.bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register').'</h2>',
1242 1242
         '#prefix' => '<div id="register-title1">',
1243 1243
         '#suffix' => '</div>',
1244 1244
       );
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
 
1262 1262
     $form['title2'] = array(
1263 1263
       '#weight' => -6,
1264
-      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1264
+      '#value' => '<h2>'.bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register').'</h2>',
1265 1265
       '#prefix' => '<div id="register-title2">',
1266 1266
       '#suffix' => '</div>',
1267 1267
     );
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
     $form['buttons']['submit']['#suffix'] = '</li>';
1324 1324
     $form['buttons']['submit']['#weight'] = 1002;
1325 1325
     $form['buttons']['cancel'] = array(
1326
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1326
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login').'</li>',
1327 1327
       '#weight' => 1005,
1328 1328
     );
1329 1329
     $form['buttons']['form control tabs suffix'] = array(
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
  */
1406 1406
 function boincuser_token_list($type = 'all') {
1407 1407
   if ($type == 'user' || $type == 'all') {
1408
-    $tokens['user']['display-name']      = t("The user's name that should be displayed");
1408
+    $tokens['user']['display-name'] = t("The user's name that should be displayed");
1409 1409
     return $tokens;
1410 1410
   }
1411 1411
 }
@@ -1417,9 +1417,9 @@  discard block
 block discarded – undo
1417 1417
   if ($view->args) {
1418 1418
     $account_id = $view->args[0];
1419 1419
   }
1420
-  if ($view->name=="user_activity") {
1420
+  if ($view->name == "user_activity") {
1421 1421
     // Run the following custom query for the user_activity view
1422
-    $view->build_info['query']= "
1422
+    $view->build_info['query'] = "
1423 1423
       SELECT node_revisions.vid AS vid,
1424 1424
         node.nid AS node_nid,
1425 1425
         node.uid AS users_node_uid,
@@ -1459,13 +1459,13 @@  discard block
 block discarded – undo
1459 1459
   // Delete expired users in the BOINC database, user_delete table.
1460 1460
   require_boinc('boinc_db');
1461 1461
   $num_deleted = BoincUserDeleted::delete_expired();
1462
-  if ($num_deleted>0) {
1462
+  if ($num_deleted > 0) {
1463 1463
     watchdog('boincuser', "Deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1464 1464
   }
1465 1465
 
1466 1466
   // Delete expired tokens from token table
1467 1467
   $tokens_deleted = BoincToken::delete_expired();
1468
-  if ($tokens_deleted>0) {
1468
+  if ($tokens_deleted > 0) {
1469 1469
     watchdog('boincuser', "Deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1470 1470
   }
1471 1471
 }
@@ -1550,38 +1550,38 @@  discard block
 block discarded – undo
1550 1550
   case 'boinc':
1551 1551
     $output .= '<ol>';
1552 1552
     if ($registration_enabled) {
1553
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1553
+      $output .= '<li>'.bts('First !create_an_account here at @sitename.',
1554 1554
       array(
1555 1555
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1556 1556
         '@sitename' => $site_name,
1557
-      ), NULL, 'boinc:join-page') . '</li>';
1557
+      ), NULL, 'boinc:join-page').'</li>';
1558 1558
     }
1559
-    $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page') . '</li>';
1560
-    $output .= '  <li>' . bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1559
+    $output .= '  <li>'.bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page').'</li>';
1560
+    $output .= '  <li>'.bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1561 1561
     array(
1562 1562
       '@sitename' => $site_name,
1563 1563
       '@siteurl' => $base_url,
1564
-    ), NULL, 'boinc:join-page') . '</li>';
1564
+    ), NULL, 'boinc:join-page').'</li>';
1565 1565
     if ($registration_enabled) {
1566
-      $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1566
+      $output .= '<li>'.bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1567 1567
         array(
1568 1568
           '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1569
-        ), NULL, 'boinc:join-page') . '</li>';
1569
+        ), NULL, 'boinc:join-page').'</li>';
1570 1570
     }
1571 1571
     else {
1572
-      $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1572
+      $output .= '<li>'.bts("If you're running a command-line version of BOINC,
1573 1573
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1574 1574
         array(
1575 1575
           '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1576
-        ), NULL, 'boinc:join-page') . '</li>';
1576
+        ), NULL, 'boinc:join-page').'</li>';
1577 1577
     }
1578
-    $output .= '<li>' . bts("If you're running a pre-5.0 version of BOINC, please
1578
+    $output .= '<li>'.bts("If you're running a pre-5.0 version of BOINC, please
1579 1579
       upgrade to a more recent version of BOINC to create an account
1580 1580
       at @this_project.",
1581 1581
       array(
1582 1582
         '@this_project' => $site_name,
1583
-      ), NULL, 'boinc:join-page') . '</li>';
1584
-    $output .=  '</ol>';
1583
+      ), NULL, 'boinc:join-page').'</li>';
1584
+    $output .= '</ol>';
1585 1585
     break;
1586 1586
   case 'new':
1587 1587
   default:
@@ -1593,34 +1593,34 @@  discard block
 block discarded – undo
1593 1593
     //  $ruleslink = drupal_lookup_path('source', $ruleslinkB);
1594 1594
     //}
1595 1595
 
1596
-    $ruleslink = drupal_lookup_path('source', variable_get('boinc_weboptions_rulespolicies', '') );
1596
+    $ruleslink = drupal_lookup_path('source', variable_get('boinc_weboptions_rulespolicies', ''));
1597 1597
 
1598 1598
     // Join page output
1599 1599
     $output .= '<ol>';
1600 1600
     if ($registration_enabled) {
1601
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1601
+      $output .= '<li>'.bts('First !create_an_account here at @sitename.',
1602 1602
       array(
1603 1603
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1604 1604
         '@sitename' => $site_name,
1605
-      ), NULL, 'boinc:join-page') . '</li>';
1605
+      ), NULL, 'boinc:join-page').'</li>';
1606 1606
     }
1607
-    else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1608
-      $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1607
+    else if (menu_valid_path(array('link_path' => $ruleslink))) {
1608
+      $output .= '  <li>'.bts("Read our !rules_and_policies.", array(
1609 1609
         '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1610
-      ), NULL, 'boinc:join-page') . '</li>';
1610
+      ), NULL, 'boinc:join-page').'</li>';
1611 1611
     }
1612
-    $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1612
+    $output .= '  <li>'.bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1613 1613
     $output .= '    <p>';
1614 1614
     $output .= '      <a class="button" href="http://boinc.berkeley.edu/download.php">Download</a>';
1615 1615
     $output .= '    </p>';
1616
-    $output .= '    ' . bts("For Android devices, download BOINC from the Google Play Store or Amazon App Store.", array(), NULL, 'boinc:join-page');
1616
+    $output .= '    '.bts("For Android devices, download BOINC from the Google Play Store or Amazon App Store.", array(), NULL, 'boinc:join-page');
1617 1617
     $output .= '  </li>';
1618
-    $output .= '  <li>' . bts('Run the installer.', array(), NULL, 'boinc:join-page') . '</li>';
1619
-    $output .= '  <li>' . bts('Choose @sitename from the list, or enter @siteurl.', array(
1618
+    $output .= '  <li>'.bts('Run the installer.', array(), NULL, 'boinc:join-page').'</li>';
1619
+    $output .= '  <li>'.bts('Choose @sitename from the list, or enter @siteurl.', array(
1620 1620
       '@sitename' => $site_name,
1621 1621
       '@siteurl' => $base_url,
1622
-    ), NULL, 'boinc:join-page') . '</li>';
1623
-    $output .=  '</ol>';
1622
+    ), NULL, 'boinc:join-page').'</li>';
1623
+    $output .= '</ol>';
1624 1624
   }
1625 1625
   $output .= '</div>';
1626 1626
   return $output;
@@ -1633,7 +1633,7 @@  discard block
 block discarded – undo
1633 1633
   global $user;
1634 1634
   $site_name = variable_get('site_name', 'Drupal-BOINC');
1635 1635
   // get the front page message from database; this is set in the admin interface under BOINC Other
1636
-  $site_message = variable_get('boinc_other_frontpage','');
1636
+  $site_message = variable_get('boinc_other_frontpage', '');
1637 1637
 
1638 1638
   // Determine the user of the day
1639 1639
   $current_uotd = db_fetch_object(db_query("
@@ -1655,30 +1655,30 @@  discard block
 block discarded – undo
1655 1655
   $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1656 1656
   $output .= '</h2>';
1657 1657
   $output .= '<div class="boinc-overview balance-height-front">';
1658
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1658
+  $output .= '  <div>'.bts($site_message, array(), NULL, "project:front page").' '.l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about').'</div>';
1659 1659
   if ($user->uid) {
1660
-    $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1660
+    $output .= '  <div>'.l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))).'</div>';
1661 1661
   }
1662 1662
   else {
1663
-    $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1663
+    $output .= '  <div>'.l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))).'</div>';
1664 1664
   }
1665 1665
   $output .= '</div>';
1666 1666
   $output .= '<div class="boinc-overview-details">';
1667 1667
   $output .= '  <div class="detail-container">';
1668
-  $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1668
+  $output .= '    <a class="user-of-the-day" href="account/'.$uotd->uid.'">';
1669 1669
   $output .= '      <div class="picture">';
1670 1670
   $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1671 1671
     $uotd_image['alt'], array(), FALSE);
1672 1672
   $output .= '      </div>';
1673
-  $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1674
-  $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1673
+  $output .= '      <div class="text">'.bts('User of the day', array(), NULL, 'boinc:front-page').'</div>';
1674
+  $output .= '      <div class="detail">'.$uotd->boincuser_name.'</div>';
1675 1675
   $output .= '    </a>';
1676 1676
   $output .= '    <div class="volunteers">';
1677
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1677
+  $output .= '      <div class="text">'.bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page').'</div>';
1678 1678
   $output .= '      <div class="platforms">';
1679
-  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1680
-  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1681
-  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1679
+  $output .= '        <div class="detail platform windows">'.bts('Windows', array(), NULL, 'boinc:front-page').'</div>';
1680
+  $output .= '        <div class="detail platform mac">'.bts('Mac', array(), NULL, 'boinc:front-page').'</div>';
1681
+  $output .= '        <div class="detail platform linux">'.bts('Linux', array(), NULL, 'boinc:front-page').'</div>';
1682 1682
   $output .= '      </div>';
1683 1683
   $output .= '    </div>';
1684 1684
   $output .= '  </div>';
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
   $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1710 1710
   if (!$enablethisRPC) {
1711 1711
     $mess = bts('Account creation is done through our Web site. Please register at @url', array(
1712
-      '@url' => $base_url . '/user/registration',
1712
+      '@url' => $base_url.'/user/registration',
1713 1713
     ),
1714 1714
     NULL, 'boinc:create_account');
1715 1715
     xml_error(-208, $mess);
@@ -1741,8 +1741,8 @@  discard block
 block discarded – undo
1741 1741
   $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1742 1742
   if ($boinc_user) {
1743 1743
     // Return authenticator for existing users
1744
-    if ( ($params['passwd_hash'] == $boinc_user->passwd_hash) or
1745
-    password_verify($params['passwd_hash'], $boinc_user->passwd_hash) ) {
1744
+    if (($params['passwd_hash'] == $boinc_user->passwd_hash) or
1745
+    password_verify($params['passwd_hash'], $boinc_user->passwd_hash)) {
1746 1746
       $output = array('authenticator' => $boinc_user->authenticator);
1747 1747
     }
1748 1748
     else {
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
   // Ensure there is a authentication token before continuing
1799 1799
   if (empty($authtoken)) {
1800 1800
     drupal_not_found();
1801
-    return ;
1801
+    return;
1802 1802
   }
1803 1803
 
1804 1804
   if (strlen($authtoken) != 32) {
@@ -1820,8 +1820,8 @@  discard block
 block discarded – undo
1820 1820
   }
1821 1821
 
1822 1822
   // Lookup path to custom account finish page
1823
-  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1824
-  if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1823
+  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', ''));
1824
+  if (menu_valid_path(array('link_path' => $customaccountfinishpath))) {
1825 1825
     $node = menu_get_object('node', 1, $customaccountfinishpath);
1826 1826
     if ($node) {
1827 1827
       return node_page_view($node);
@@ -1830,12 +1830,12 @@  discard block
 block discarded – undo
1830 1830
 
1831 1831
   // open links in new window
1832 1832
   $options = array(
1833
-    'attributes' => array( 'target' => '_blank' ),
1833
+    'attributes' => array('target' => '_blank'),
1834 1834
   );
1835 1835
 
1836 1836
   // Check moderation page exists
1837
-  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1838
-  if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1837
+  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', ''));
1838
+  if (menu_valid_path(array('link_path' => $moderationpath))) {
1839 1839
     $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
1840 1840
   } else {
1841 1841
     $modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
@@ -1843,11 +1843,11 @@  discard block
 block discarded – undo
1843 1843
 
1844 1844
   $username = $user->boincuser_name;
1845 1845
   $site_name = variable_get('site_name', 'Drupal-BOINC');
1846
-  $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1846
+  $output = "<p>".bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1847 1847
   array(
1848 1848
     '@user_name' => $username,
1849 1849
     '@site_name' => $site_name,
1850
-  ), NULL, 'boinc:account-finish') . "</p>";
1850
+  ), NULL, 'boinc:account-finish')."</p>";
1851 1851
 
1852 1852
   $links = array(
1853 1853
     array(
@@ -1913,7 +1913,7 @@  discard block
 block discarded – undo
1913 1913
   );
1914 1914
 
1915 1915
   //List of links
1916
-  $output .= theme_item_list($links, $title = NULL, $type='ul');
1916
+  $output .= theme_item_list($links, $title = NULL, $type = 'ul');
1917 1917
 
1918 1918
   return $output;
1919 1919
 }
@@ -2030,7 +2030,7 @@  discard block
 block discarded – undo
2030 2030
     global $base_url;
2031 2031
     global $base_path;
2032 2032
     $site_name = variable_get('site_name', 'Drupal-BOINC');
2033
-    $site_url = $base_url . $base_path;
2033
+    $site_url = $base_url.$base_path;
2034 2034
     $moderator = user_load($user->uid);
2035 2035
     $profile->moderate = 0;
2036 2036
     $profile->status = 0;
@@ -2091,7 +2091,7 @@  discard block
 block discarded – undo
2091 2091
       global $base_url;
2092 2092
       global $base_path;
2093 2093
       $site_name = variable_get('site_name', 'Drupal-BOINC');
2094
-      $site_url = $base_url . $base_path;
2094
+      $site_url = $base_url.$base_path;
2095 2095
       $moderator = user_load($user->uid);
2096 2096
       $settings = array(
2097 2097
         'from' => '',
@@ -2195,25 +2195,25 @@  discard block
 block discarded – undo
2195 2195
   if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2196 2196
   
2197 2197
   $output = '';
2198
-  $output .= '<table class="user-projects">' . "\n";
2199
-  $output .= '<thead>' . "\n";
2200
-  $output .= '  <tr>' . "\n";
2201
-  $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2202
-  $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2203
-  $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2204
-  $output .= '  </tr>' . "\n";
2205
-  $output .= '</thead>' . "\n";
2206
-  $output .= '<tbody>' . "\n";
2198
+  $output .= '<table class="user-projects">'."\n";
2199
+  $output .= '<thead>'."\n";
2200
+  $output .= '  <tr>'."\n";
2201
+  $output .= '    <th>'.bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite').'</th>'."\n";
2202
+  $output .= '    <th class="numeric">'.bts('Avg credit', array(), NULL, 'boinc:account-dashboard').'</th>'."\n";
2203
+  $output .= '    <th class="numeric">'.bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits').'</th>'."\n";
2204
+  $output .= '  </tr>'."\n";
2205
+  $output .= '</thead>'."\n";
2206
+  $output .= '<tbody>'."\n";
2207 2207
   foreach ($projects AS $project) {
2208
-    $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
2209
-    $output .= '  <tr>' . "\n";
2210
-    $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
2211
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->expavg_credit) . '</td>' . "\n"; 
2212
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->total_credit) . '</td>' . "\n";
2213
-    $output .= '  </tr>' . "\n";
2208
+    $url = rtrim($project->url, '/').'/show_user.php?userid='.$project->id;
2209
+    $output .= '  <tr>'."\n";
2210
+    $output .= '    <td>'.l($project->name, $url).'</td>'."\n";
2211
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->expavg_credit).'</td>'."\n"; 
2212
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->total_credit).'</td>'."\n";
2213
+    $output .= '  </tr>'."\n";
2214 2214
   }
2215
-  $output .= '</tbody>' . "\n";
2216
-  $output .= '</table>' . "\n";
2215
+  $output .= '</tbody>'."\n";
2216
+  $output .= '</table>'."\n";
2217 2217
   $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2218 2218
   //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2219 2219
   return $output;
@@ -2233,8 +2233,8 @@  discard block
 block discarded – undo
2233 2233
     'cpid' => $cpid
2234 2234
   );
2235 2235
   $args = array();
2236
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2237
-  $query = '?' . implode('&', $args);
2236
+  foreach ($get as $arg => $value) $args[] = "{$arg}=".rawurlencode($value);
2237
+  $query = '?'.implode('&', $args);
2238 2238
   
2239 2239
   // Load XML from RPC
2240 2240
   $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
@@ -2306,12 +2306,12 @@  discard block
 block discarded – undo
2306 2306
     $output .= '<ul class="tab-list">';
2307 2307
     $count = 0;
2308 2308
     foreach ($links as $key => $link) {
2309
-      $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2309
+      $output .= '<li class="'.(($count == 0) ? 'first primary ' : '').'tab">';
2310 2310
       $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2311 2311
       $output .= '</li>';
2312 2312
       $count++;
2313 2313
     }
2314
-    $output .= '<li class="' . (($count) ? '' : 'first ') . 'last tab">' . flag_create_link('abuse_user_meta', $account->uid) . '</li>';
2314
+    $output .= '<li class="'.(($count) ? '' : 'first ').'last tab">'.flag_create_link('abuse_user_meta', $account->uid).'</li>';
2315 2315
     $output .= '</ul>';
2316 2316
   }
2317 2317
   return $output;
@@ -2352,7 +2352,7 @@  discard block
 block discarded – undo
2352 2352
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
2353 2353
 
2354 2354
   foreach ($documents as $document) {
2355
-    if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
2355
+    if ($document->entity_type == 'node' AND $document->bundle == 'profile') {
2356 2356
       // Node information.
2357 2357
       $nid = $document->entity_id;
2358 2358
       $node = node_load($nid);
@@ -2402,11 +2402,11 @@  discard block
 block discarded – undo
2402 2402
   // privatemsg module. We need to convert them back to spaces for the
2403 2403
   // check below.
2404 2404
   $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2405
-  if ($drupalid>0) {
2405
+  if ($drupalid > 0) {
2406 2406
     if ($recipient = user_load(array('uid' => $drupalid))) {
2407 2407
       // Double-check that the loaded user matches both boincuser_id
2408 2408
       // and boincuser_name.
2409
-      if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2409
+      if (($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name)) {
2410 2410
         return $recipient;
2411 2411
       }
2412 2412
     }
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.features.inc 2 patches
Indentation   +1674 added lines, -1674 removed lines patch added patch discarded remove patch
@@ -4,38 +4,38 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_ctools_plugin_api().
5 5
  */
6 6
 function boinc_standard_ctools_plugin_api() {
7
-  list($module, $api) = func_get_args();
8
-  if ($module == "input_formats" && $api == "input_formats") {
7
+    list($module, $api) = func_get_args();
8
+    if ($module == "input_formats" && $api == "input_formats") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "page_manager" && $api == "pages_default") {
10
+    }
11
+    elseif ($module == "page_manager" && $api == "pages_default") {
12 12
     return array("version" => 1);
13
-  }
14
-  elseif ($module == "panels_mini" && $api == "panels_default") {
13
+    }
14
+    elseif ($module == "panels_mini" && $api == "panels_default") {
15 15
     return array("version" => 1);
16
-  }
17
-  elseif ($module == "strongarm" && $api == "strongarm") {
16
+    }
17
+    elseif ($module == "strongarm" && $api == "strongarm") {
18 18
     return array("version" => 1);
19
-  }
20
-  elseif ($module == "wysiwyg" && $api == "wysiwyg") {
19
+    }
20
+    elseif ($module == "wysiwyg" && $api == "wysiwyg") {
21 21
     return array("version" => 2);
22
-  }
22
+    }
23 23
 }
24 24
 
25 25
 /**
26 26
  * Implementation of hook_flag_default_flags().
27 27
  */
28 28
 function boinc_standard_flag_default_flags() {
29
-  $flags = array();
30
-  // Exported flag: "Comment Abuse 1 SPAM".
31
-  $flags['abuse_comment_1'] = array(
29
+    $flags = array();
30
+    // Exported flag: "Comment Abuse 1 SPAM".
31
+    $flags['abuse_comment_1'] = array(
32 32
     'content_type' => 'comment',
33 33
     'title' => 'Comment Abuse 1 SPAM',
34 34
     'global' => FALSE,
35 35
     'types' => array(
36
-      '0' => 'forum',
37
-      '1' => 'news',
38
-      '2' => 'team_forum',
36
+        '0' => 'forum',
37
+        '1' => 'news',
38
+        '2' => 'team_forum',
39 39
     ),
40 40
     'flag_short' => 'Flag as SPAM',
41 41
     'flag_long' => 'Flag this comment as SPAM.',
@@ -46,31 +46,31 @@  discard block
 block discarded – undo
46 46
     'unflag_denied_text' => '',
47 47
     'link_type' => 'toggle',
48 48
     'roles' => array(
49
-      'flag' => array(
49
+        'flag' => array(
50 50
         '0' => 2,
51
-      ),
52
-      'unflag' => array(
51
+        ),
52
+        'unflag' => array(
53 53
         '0' => 2,
54
-      ),
54
+        ),
55 55
     ),
56 56
     'weight' => 0,
57 57
     'access_author' => '',
58 58
     'show_on_comment' => 0,
59 59
     'module' => 'boinc_standard',
60 60
     'locked' => array(
61
-      '0' => 'name',
61
+        '0' => 'name',
62 62
     ),
63 63
     'api_version' => 2,
64
-  );
65
-  // Exported flag: "Comment Abuse 2 LINK".
66
-  $flags['abuse_comment_2'] = array(
64
+    );
65
+    // Exported flag: "Comment Abuse 2 LINK".
66
+    $flags['abuse_comment_2'] = array(
67 67
     'content_type' => 'comment',
68 68
     'title' => 'Comment Abuse 2 LINK',
69 69
     'global' => FALSE,
70 70
     'types' => array(
71
-      '0' => 'forum',
72
-      '1' => 'news',
73
-      '2' => 'team_forum',
71
+        '0' => 'forum',
72
+        '1' => 'news',
73
+        '2' => 'team_forum',
74 74
     ),
75 75
     'flag_short' => 'Flag as abusive link',
76 76
     'flag_long' => 'Flag this comment with abusive link.',
@@ -81,31 +81,31 @@  discard block
 block discarded – undo
81 81
     'unflag_denied_text' => '',
82 82
     'link_type' => 'toggle',
83 83
     'roles' => array(
84
-      'flag' => array(
84
+        'flag' => array(
85 85
         '0' => 2,
86
-      ),
87
-      'unflag' => array(
86
+        ),
87
+        'unflag' => array(
88 88
         '0' => 2,
89
-      ),
89
+        ),
90 90
     ),
91 91
     'weight' => 0,
92 92
     'access_author' => '',
93 93
     'show_on_comment' => 0,
94 94
     'module' => 'boinc_standard',
95 95
     'locked' => array(
96
-      '0' => 'name',
96
+        '0' => 'name',
97 97
     ),
98 98
     'api_version' => 2,
99
-  );
100
-  // Exported flag: "Comment Abuse 3 Hostile".
101
-  $flags['abuse_comment_3'] = array(
99
+    );
100
+    // Exported flag: "Comment Abuse 3 Hostile".
101
+    $flags['abuse_comment_3'] = array(
102 102
     'content_type' => 'comment',
103 103
     'title' => 'Comment Abuse 3 Hostile',
104 104
     'global' => FALSE,
105 105
     'types' => array(
106
-      '0' => 'forum',
107
-      '1' => 'news',
108
-      '2' => 'team_forum',
106
+        '0' => 'forum',
107
+        '1' => 'news',
108
+        '2' => 'team_forum',
109 109
     ),
110 110
     'flag_short' => 'Flag as hostile',
111 111
     'flag_long' => 'Flag this comment as hostile.',
@@ -116,31 +116,31 @@  discard block
 block discarded – undo
116 116
     'unflag_denied_text' => '',
117 117
     'link_type' => 'toggle',
118 118
     'roles' => array(
119
-      'flag' => array(
119
+        'flag' => array(
120 120
         '0' => 2,
121
-      ),
122
-      'unflag' => array(
121
+        ),
122
+        'unflag' => array(
123 123
         '0' => 2,
124
-      ),
124
+        ),
125 125
     ),
126 126
     'weight' => 0,
127 127
     'access_author' => '',
128 128
     'show_on_comment' => 0,
129 129
     'module' => 'boinc_standard',
130 130
     'locked' => array(
131
-      '0' => 'name',
131
+        '0' => 'name',
132 132
     ),
133 133
     'api_version' => 2,
134
-  );
135
-  // Exported flag: "Comment Abuse 4 Not Kid Friendly".
136
-  $flags['abuse_comment_4'] = array(
134
+    );
135
+    // Exported flag: "Comment Abuse 4 Not Kid Friendly".
136
+    $flags['abuse_comment_4'] = array(
137 137
     'content_type' => 'comment',
138 138
     'title' => 'Comment Abuse 4 Not Kid Friendly',
139 139
     'global' => FALSE,
140 140
     'types' => array(
141
-      '0' => 'forum',
142
-      '1' => 'news',
143
-      '2' => 'team_forum',
141
+        '0' => 'forum',
142
+        '1' => 'news',
143
+        '2' => 'team_forum',
144 144
     ),
145 145
     'flag_short' => 'Flag as not kid-friendly',
146 146
     'flag_long' => 'Flag this comment as not kid-friendly.',
@@ -151,31 +151,31 @@  discard block
 block discarded – undo
151 151
     'unflag_denied_text' => '',
152 152
     'link_type' => 'toggle',
153 153
     'roles' => array(
154
-      'flag' => array(
154
+        'flag' => array(
155 155
         '0' => 2,
156
-      ),
157
-      'unflag' => array(
156
+        ),
157
+        'unflag' => array(
158 158
         '0' => 2,
159
-      ),
159
+        ),
160 160
     ),
161 161
     'weight' => 0,
162 162
     'access_author' => '',
163 163
     'show_on_comment' => 0,
164 164
     'module' => 'boinc_standard',
165 165
     'locked' => array(
166
-      '0' => 'name',
166
+        '0' => 'name',
167 167
     ),
168 168
     'api_version' => 2,
169
-  );
170
-  // Exported flag: "Comment Abuse 5 Other".
171
-  $flags['abuse_comment_5'] = array(
169
+    );
170
+    // Exported flag: "Comment Abuse 5 Other".
171
+    $flags['abuse_comment_5'] = array(
172 172
     'content_type' => 'comment',
173 173
     'title' => 'Comment Abuse 5 Other',
174 174
     'global' => FALSE,
175 175
     'types' => array(
176
-      '0' => 'forum',
177
-      '1' => 'news',
178
-      '2' => 'team_forum',
176
+        '0' => 'forum',
177
+        '1' => 'news',
178
+        '2' => 'team_forum',
179 179
     ),
180 180
     'flag_short' => 'Flag as other',
181 181
     'flag_long' => 'Flag this comment - other reason',
@@ -186,31 +186,31 @@  discard block
 block discarded – undo
186 186
     'unflag_denied_text' => '',
187 187
     'link_type' => 'toggle',
188 188
     'roles' => array(
189
-      'flag' => array(
189
+        'flag' => array(
190 190
         '0' => 2,
191
-      ),
192
-      'unflag' => array(
191
+        ),
192
+        'unflag' => array(
193 193
         '0' => 2,
194
-      ),
194
+        ),
195 195
     ),
196 196
     'weight' => 0,
197 197
     'access_author' => '',
198 198
     'show_on_comment' => 0,
199 199
     'module' => 'boinc_standard',
200 200
     'locked' => array(
201
-      '0' => 'name',
201
+        '0' => 'name',
202 202
     ),
203 203
     'api_version' => 2,
204
-  );
205
-  // Exported flag: "Comment Abuse meta".
206
-  $flags['abuse_comment_meta'] = array(
204
+    );
205
+    // Exported flag: "Comment Abuse meta".
206
+    $flags['abuse_comment_meta'] = array(
207 207
     'content_type' => 'comment',
208 208
     'title' => 'Comment Abuse meta',
209 209
     'global' => '0',
210 210
     'types' => array(
211
-      '0' => 'forum',
212
-      '1' => 'news',
213
-      '2' => 'team_forum',
211
+        '0' => 'forum',
212
+        '1' => 'news',
213
+        '2' => 'team_forum',
214 214
     ),
215 215
     'flag_short' => 'Report',
216 216
     'flag_long' => 'Report comment.',
@@ -221,31 +221,31 @@  discard block
 block discarded – undo
221 221
     'unflag_denied_text' => '',
222 222
     'link_type' => 'toggle',
223 223
     'roles' => array(
224
-      'flag' => array(
224
+        'flag' => array(
225 225
         '0' => 2,
226
-      ),
227
-      'unflag' => array(
226
+        ),
227
+        'unflag' => array(
228 228
         '0' => 2,
229
-      ),
229
+        ),
230 230
     ),
231 231
     'weight' => 0,
232 232
     'access_author' => '',
233 233
     'show_on_comment' => 1,
234 234
     'module' => 'boinc_standard',
235 235
     'locked' => array(
236
-      '0' => 'name',
236
+        '0' => 'name',
237 237
     ),
238 238
     'api_version' => 2,
239
-  );
240
-  // Exported flag: "Node Abuse 1 SPAM".
241
-  $flags['abuse_node_1'] = array(
239
+    );
240
+    // Exported flag: "Node Abuse 1 SPAM".
241
+    $flags['abuse_node_1'] = array(
242 242
     'content_type' => 'node',
243 243
     'title' => 'Node Abuse 1 SPAM',
244 244
     'global' => FALSE,
245 245
     'types' => array(
246
-      '0' => 'forum',
247
-      '1' => 'news',
248
-      '2' => 'team_forum',
246
+        '0' => 'forum',
247
+        '1' => 'news',
248
+        '2' => 'team_forum',
249 249
     ),
250 250
     'flag_short' => 'Flag as SPAM',
251 251
     'flag_long' => 'Flag this content SPAM.',
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
     'unflag_denied_text' => '',
257 257
     'link_type' => 'toggle',
258 258
     'roles' => array(
259
-      'flag' => array(
259
+        'flag' => array(
260 260
         '0' => 2,
261
-      ),
262
-      'unflag' => array(
261
+        ),
262
+        'unflag' => array(
263 263
         '0' => 2,
264
-      ),
264
+        ),
265 265
     ),
266 266
     'weight' => 0,
267 267
     'show_on_page' => 0,
@@ -271,19 +271,19 @@  discard block
 block discarded – undo
271 271
     'i18n' => '0',
272 272
     'module' => 'boinc_standard',
273 273
     'locked' => array(
274
-      '0' => 'name',
274
+        '0' => 'name',
275 275
     ),
276 276
     'api_version' => 2,
277
-  );
278
-  // Exported flag: "Node Abuse 2 Link".
279
-  $flags['abuse_node_2'] = array(
277
+    );
278
+    // Exported flag: "Node Abuse 2 Link".
279
+    $flags['abuse_node_2'] = array(
280 280
     'content_type' => 'node',
281 281
     'title' => 'Node Abuse 2 Link',
282 282
     'global' => FALSE,
283 283
     'types' => array(
284
-      '0' => 'forum',
285
-      '1' => 'news',
286
-      '2' => 'team_forum',
284
+        '0' => 'forum',
285
+        '1' => 'news',
286
+        '2' => 'team_forum',
287 287
     ),
288 288
     'flag_short' => 'Report as abusive link',
289 289
     'flag_long' => 'Flag this content as abusive link.',
@@ -294,12 +294,12 @@  discard block
 block discarded – undo
294 294
     'unflag_denied_text' => '',
295 295
     'link_type' => 'toggle',
296 296
     'roles' => array(
297
-      'flag' => array(
297
+        'flag' => array(
298 298
         '0' => 2,
299
-      ),
300
-      'unflag' => array(
299
+        ),
300
+        'unflag' => array(
301 301
         '0' => 2,
302
-      ),
302
+        ),
303 303
     ),
304 304
     'weight' => 0,
305 305
     'show_on_page' => 0,
@@ -309,19 +309,19 @@  discard block
 block discarded – undo
309 309
     'i18n' => '0',
310 310
     'module' => 'boinc_standard',
311 311
     'locked' => array(
312
-      '0' => 'name',
312
+        '0' => 'name',
313 313
     ),
314 314
     'api_version' => 2,
315
-  );
316
-  // Exported flag: "Node Abuse 3 Hostile".
317
-  $flags['abuse_node_3'] = array(
315
+    );
316
+    // Exported flag: "Node Abuse 3 Hostile".
317
+    $flags['abuse_node_3'] = array(
318 318
     'content_type' => 'node',
319 319
     'title' => 'Node Abuse 3 Hostile',
320 320
     'global' => FALSE,
321 321
     'types' => array(
322
-      '0' => 'forum',
323
-      '1' => 'news',
324
-      '2' => 'team_forum',
322
+        '0' => 'forum',
323
+        '1' => 'news',
324
+        '2' => 'team_forum',
325 325
     ),
326 326
     'flag_short' => 'Flag as hostile',
327 327
     'flag_long' => 'Flag this content as hostile.',
@@ -332,12 +332,12 @@  discard block
 block discarded – undo
332 332
     'unflag_denied_text' => '',
333 333
     'link_type' => 'toggle',
334 334
     'roles' => array(
335
-      'flag' => array(
335
+        'flag' => array(
336 336
         '0' => 2,
337
-      ),
338
-      'unflag' => array(
337
+        ),
338
+        'unflag' => array(
339 339
         '0' => 2,
340
-      ),
340
+        ),
341 341
     ),
342 342
     'weight' => 0,
343 343
     'show_on_page' => 0,
@@ -347,19 +347,19 @@  discard block
 block discarded – undo
347 347
     'i18n' => '0',
348 348
     'module' => 'boinc_standard',
349 349
     'locked' => array(
350
-      '0' => 'name',
350
+        '0' => 'name',
351 351
     ),
352 352
     'api_version' => 2,
353
-  );
354
-  // Exported flag: "Node Abuse 4 Not Kid Friendly".
355
-  $flags['abuse_node_4'] = array(
353
+    );
354
+    // Exported flag: "Node Abuse 4 Not Kid Friendly".
355
+    $flags['abuse_node_4'] = array(
356 356
     'content_type' => 'node',
357 357
     'title' => 'Node Abuse 4 Not Kid Friendly',
358 358
     'global' => FALSE,
359 359
     'types' => array(
360
-      '0' => 'forum',
361
-      '1' => 'news',
362
-      '2' => 'team_forum',
360
+        '0' => 'forum',
361
+        '1' => 'news',
362
+        '2' => 'team_forum',
363 363
     ),
364 364
     'flag_short' => 'Flag as not kid-friendly',
365 365
     'flag_long' => 'Flag this content as not kid-friendly.',
@@ -370,12 +370,12 @@  discard block
 block discarded – undo
370 370
     'unflag_denied_text' => '',
371 371
     'link_type' => 'toggle',
372 372
     'roles' => array(
373
-      'flag' => array(
373
+        'flag' => array(
374 374
         '0' => 2,
375
-      ),
376
-      'unflag' => array(
375
+        ),
376
+        'unflag' => array(
377 377
         '0' => 2,
378
-      ),
378
+        ),
379 379
     ),
380 380
     'weight' => 0,
381 381
     'show_on_page' => 0,
@@ -385,19 +385,19 @@  discard block
 block discarded – undo
385 385
     'i18n' => '0',
386 386
     'module' => 'boinc_standard',
387 387
     'locked' => array(
388
-      '0' => 'name',
388
+        '0' => 'name',
389 389
     ),
390 390
     'api_version' => 2,
391
-  );
392
-  // Exported flag: "Node Abuse 5 Other".
393
-  $flags['abuse_node_5'] = array(
391
+    );
392
+    // Exported flag: "Node Abuse 5 Other".
393
+    $flags['abuse_node_5'] = array(
394 394
     'content_type' => 'node',
395 395
     'title' => 'Node Abuse 5 Other',
396 396
     'global' => FALSE,
397 397
     'types' => array(
398
-      '0' => 'forum',
399
-      '1' => 'news',
400
-      '2' => 'team_forum',
398
+        '0' => 'forum',
399
+        '1' => 'news',
400
+        '2' => 'team_forum',
401 401
     ),
402 402
     'flag_short' => 'Flag as other',
403 403
     'flag_long' => 'Flag this content - other reason.',
@@ -408,12 +408,12 @@  discard block
 block discarded – undo
408 408
     'unflag_denied_text' => '',
409 409
     'link_type' => 'toggle',
410 410
     'roles' => array(
411
-      'flag' => array(
411
+        'flag' => array(
412 412
         '0' => 2,
413
-      ),
414
-      'unflag' => array(
413
+        ),
414
+        'unflag' => array(
415 415
         '0' => 2,
416
-      ),
416
+        ),
417 417
     ),
418 418
     'weight' => 0,
419 419
     'show_on_page' => 0,
@@ -423,19 +423,19 @@  discard block
 block discarded – undo
423 423
     'i18n' => '0',
424 424
     'module' => 'boinc_standard',
425 425
     'locked' => array(
426
-      '0' => 'name',
426
+        '0' => 'name',
427 427
     ),
428 428
     'api_version' => 2,
429
-  );
430
-  // Exported flag: "Node Abuse meta".
431
-  $flags['abuse_node_meta'] = array(
429
+    );
430
+    // Exported flag: "Node Abuse meta".
431
+    $flags['abuse_node_meta'] = array(
432 432
     'content_type' => 'node',
433 433
     'title' => 'Node Abuse meta',
434 434
     'global' => FALSE,
435 435
     'types' => array(
436
-      '0' => 'forum',
437
-      '1' => 'news',
438
-      '2' => 'team_forum',
436
+        '0' => 'forum',
437
+        '1' => 'news',
438
+        '2' => 'team_forum',
439 439
     ),
440 440
     'flag_short' => 'Report',
441 441
     'flag_long' => 'Report content',
@@ -446,12 +446,12 @@  discard block
 block discarded – undo
446 446
     'unflag_denied_text' => '',
447 447
     'link_type' => 'toggle',
448 448
     'roles' => array(
449
-      'flag' => array(
449
+        'flag' => array(
450 450
         '0' => 2,
451
-      ),
452
-      'unflag' => array(
451
+        ),
452
+        'unflag' => array(
453 453
         '0' => 2,
454
-      ),
454
+        ),
455 455
     ),
456 456
     'weight' => 0,
457 457
     'show_on_page' => 1,
@@ -461,12 +461,12 @@  discard block
 block discarded – undo
461 461
     'i18n' => '0',
462 462
     'module' => 'boinc_standard',
463 463
     'locked' => array(
464
-      '0' => 'name',
464
+        '0' => 'name',
465 465
     ),
466 466
     'api_version' => 2,
467
-  );
468
-  // Exported flag: "User Abuse 1 SPAM".
469
-  $flags['abuse_user_1'] = array(
467
+    );
468
+    // Exported flag: "User Abuse 1 SPAM".
469
+    $flags['abuse_user_1'] = array(
470 470
     'content_type' => 'user',
471 471
     'title' => 'User Abuse 1 SPAM',
472 472
     'global' => FALSE,
@@ -480,24 +480,24 @@  discard block
 block discarded – undo
480 480
     'unflag_denied_text' => '',
481 481
     'link_type' => 'toggle',
482 482
     'roles' => array(
483
-      'flag' => array(
483
+        'flag' => array(
484 484
         '0' => 2,
485
-      ),
486
-      'unflag' => array(
485
+        ),
486
+        'unflag' => array(
487 487
         '0' => 2,
488
-      ),
488
+        ),
489 489
     ),
490 490
     'weight' => 0,
491 491
     'show_on_profile' => 0,
492 492
     'access_uid' => '',
493 493
     'module' => 'boinc_standard',
494 494
     'locked' => array(
495
-      '0' => 'name',
495
+        '0' => 'name',
496 496
     ),
497 497
     'api_version' => 2,
498
-  );
499
-  // Exported flag: "User Abuse 2 Link".
500
-  $flags['abuse_user_2'] = array(
498
+    );
499
+    // Exported flag: "User Abuse 2 Link".
500
+    $flags['abuse_user_2'] = array(
501 501
     'content_type' => 'user',
502 502
     'title' => 'User Abuse 2 Link',
503 503
     'global' => FALSE,
@@ -511,24 +511,24 @@  discard block
 block discarded – undo
511 511
     'unflag_denied_text' => '',
512 512
     'link_type' => 'toggle',
513 513
     'roles' => array(
514
-      'flag' => array(
514
+        'flag' => array(
515 515
         '0' => 2,
516
-      ),
517
-      'unflag' => array(
516
+        ),
517
+        'unflag' => array(
518 518
         '0' => 2,
519
-      ),
519
+        ),
520 520
     ),
521 521
     'weight' => 0,
522 522
     'show_on_profile' => 0,
523 523
     'access_uid' => '',
524 524
     'module' => 'boinc_standard',
525 525
     'locked' => array(
526
-      '0' => 'name',
526
+        '0' => 'name',
527 527
     ),
528 528
     'api_version' => 2,
529
-  );
530
-  // Exported flag: "User Abuse 3 Not Kid Friendly".
531
-  $flags['abuse_user_3'] = array(
529
+    );
530
+    // Exported flag: "User Abuse 3 Not Kid Friendly".
531
+    $flags['abuse_user_3'] = array(
532 532
     'content_type' => 'user',
533 533
     'title' => 'User Abuse 3 Not Kid Friendly',
534 534
     'global' => FALSE,
@@ -542,24 +542,24 @@  discard block
 block discarded – undo
542 542
     'unflag_denied_text' => '',
543 543
     'link_type' => 'toggle',
544 544
     'roles' => array(
545
-      'flag' => array(
545
+        'flag' => array(
546 546
         '0' => 2,
547
-      ),
548
-      'unflag' => array(
547
+        ),
548
+        'unflag' => array(
549 549
         '0' => 2,
550
-      ),
550
+        ),
551 551
     ),
552 552
     'weight' => 0,
553 553
     'show_on_profile' => 0,
554 554
     'access_uid' => '',
555 555
     'module' => 'boinc_standard',
556 556
     'locked' => array(
557
-      '0' => 'name',
557
+        '0' => 'name',
558 558
     ),
559 559
     'api_version' => 2,
560
-  );
561
-  // Exported flag: "User Abuse 4 Other".
562
-  $flags['abuse_user_4'] = array(
560
+    );
561
+    // Exported flag: "User Abuse 4 Other".
562
+    $flags['abuse_user_4'] = array(
563 563
     'content_type' => 'user',
564 564
     'title' => 'User Abuse 4 Other',
565 565
     'global' => FALSE,
@@ -573,24 +573,24 @@  discard block
 block discarded – undo
573 573
     'unflag_denied_text' => '',
574 574
     'link_type' => 'toggle',
575 575
     'roles' => array(
576
-      'flag' => array(
576
+        'flag' => array(
577 577
         '0' => 2,
578
-      ),
579
-      'unflag' => array(
578
+        ),
579
+        'unflag' => array(
580 580
         '0' => 2,
581
-      ),
581
+        ),
582 582
     ),
583 583
     'weight' => 0,
584 584
     'show_on_profile' => 0,
585 585
     'access_uid' => '',
586 586
     'module' => 'boinc_standard',
587 587
     'locked' => array(
588
-      '0' => 'name',
588
+        '0' => 'name',
589 589
     ),
590 590
     'api_version' => 2,
591
-  );
592
-  // Exported flag: "User Abuse Meta".
593
-  $flags['abuse_user_meta'] = array(
591
+    );
592
+    // Exported flag: "User Abuse Meta".
593
+    $flags['abuse_user_meta'] = array(
594 594
     'content_type' => 'user',
595 595
     'title' => 'User Abuse Meta',
596 596
     'global' => FALSE,
@@ -604,31 +604,31 @@  discard block
 block discarded – undo
604 604
     'unflag_denied_text' => '',
605 605
     'link_type' => 'toggle',
606 606
     'roles' => array(
607
-      'flag' => array(
607
+        'flag' => array(
608 608
         '0' => 2,
609
-      ),
610
-      'unflag' => array(
609
+        ),
610
+        'unflag' => array(
611 611
         '0' => 2,
612
-      ),
612
+        ),
613 613
     ),
614 614
     'weight' => 0,
615 615
     'show_on_profile' => 1,
616 616
     'access_uid' => '',
617 617
     'module' => 'boinc_standard',
618 618
     'locked' => array(
619
-      '0' => 'name',
619
+        '0' => 'name',
620 620
     ),
621 621
     'api_version' => 2,
622
-  );
623
-  // Exported flag: "Subscriptions".
624
-  $flags['subscriptions'] = array(
622
+    );
623
+    // Exported flag: "Subscriptions".
624
+    $flags['subscriptions'] = array(
625 625
     'content_type' => 'node',
626 626
     'title' => 'Subscriptions',
627 627
     'global' => '0',
628 628
     'types' => array(
629
-      '0' => 'forum',
630
-      '1' => 'news',
631
-      '2' => 'team_forum',
629
+        '0' => 'forum',
630
+        '1' => 'news',
631
+        '2' => 'team_forum',
632 632
     ),
633 633
     'flag_short' => 'subscribe',
634 634
     'flag_long' => 'Subscribe to this topic',
@@ -639,12 +639,12 @@  discard block
 block discarded – undo
639 639
     'unflag_denied_text' => '',
640 640
     'link_type' => 'toggle',
641 641
     'roles' => array(
642
-      'flag' => array(
642
+        'flag' => array(
643 643
         '0' => 2,
644
-      ),
645
-      'unflag' => array(
644
+        ),
645
+        'unflag' => array(
646 646
         '0' => 2,
647
-      ),
647
+        ),
648 648
     ),
649 649
     'weight' => 0,
650 650
     'show_on_page' => 1,
@@ -654,11 +654,11 @@  discard block
 block discarded – undo
654 654
     'i18n' => '0',
655 655
     'module' => 'boinc_standard',
656 656
     'locked' => array(
657
-      '0' => 'name',
657
+        '0' => 'name',
658 658
     ),
659 659
     'api_version' => 2,
660
-  );
661
-  return $flags;
660
+    );
661
+    return $flags;
662 662
 
663 663
 }
664 664
 
@@ -666,47 +666,47 @@  discard block
 block discarded – undo
666 666
  * Implementation of hook_node_info().
667 667
  */
668 668
 function boinc_standard_node_info() {
669
-  $items = array(
669
+    $items = array(
670 670
     'page' => array(
671
-      'name' => t('Page'),
672
-      'module' => 'features',
673
-      'description' => t('A <em>page</em>, similar in form to a <em>story</em>, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a <em>page</em> entry does not allow visitor comments and is not featured on the site\'s initial home page.'),
674
-      'has_title' => '1',
675
-      'title_label' => t('Title'),
676
-      'has_body' => '1',
677
-      'body_label' => t('Body'),
678
-      'min_word_count' => '0',
679
-      'help' => '',
671
+        'name' => t('Page'),
672
+        'module' => 'features',
673
+        'description' => t('A <em>page</em>, similar in form to a <em>story</em>, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a <em>page</em> entry does not allow visitor comments and is not featured on the site\'s initial home page.'),
674
+        'has_title' => '1',
675
+        'title_label' => t('Title'),
676
+        'has_body' => '1',
677
+        'body_label' => t('Body'),
678
+        'min_word_count' => '0',
679
+        'help' => '',
680 680
     ),
681
-  );
682
-  return $items;
681
+    );
682
+    return $items;
683 683
 }
684 684
 
685 685
 /**
686 686
  * Implementation of hook_rules_defaults().
687 687
  */
688 688
 function boinc_standard_rules_defaults() {
689
-  return array(
689
+    return array(
690 690
     'rules' => array(
691
-      'rules_notify_admins_about_circular_merge_error' => array(
691
+        'rules_notify_admins_about_circular_merge_error' => array(
692 692
         '#type' => 'rule',
693 693
         '#set' => 'event_boincwork_circular_merge_error',
694 694
         '#label' => 'Notify admins about circular merge error',
695 695
         '#active' => 1,
696 696
         '#weight' => '0',
697 697
         '#categories' => array(
698
-          '0' => 'boinc_standard',
699
-          '1' => 'admin notification',
698
+            '0' => 'boinc_standard',
699
+            '1' => 'admin notification',
700 700
         ),
701 701
         '#status' => 'default',
702 702
         '#conditions' => array(),
703 703
         '#actions' => array(
704
-          '0' => array(
704
+            '0' => array(
705 705
             '#type' => 'action',
706 706
             '#settings' => array(
707
-              'from' => '',
708
-              'subject' => '[subject_tag:string] Circular host merging error',
709
-              'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s rpc_seqno is equal to the old_host\'s id. 
707
+                'from' => '',
708
+                'subject' => '[subject_tag:string] Circular host merging error',
709
+                'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s rpc_seqno is equal to the old_host\'s id. 
710 710
 
711 711
 Information about this host merge attempt:
712 712
 <?php
@@ -717,62 +717,62 @@  discard block
 block discarded – undo
717 717
 print "BOINC id: " . $account->boincuser_id . "\\n";
718 718
 print "Drupal UID: " . $user->uid . "\\n";
719 719
 ?>',
720
-              '#eval input' => array(
720
+                '#eval input' => array(
721 721
                 'token_rules_input_evaluator' => array(
722
-                  'subject' => array(
722
+                    'subject' => array(
723 723
                     '0' => 'subject_tag',
724 724
                     '1' => ':global',
725
-                  ),
726
-                  'message' => array(
725
+                    ),
726
+                    'message' => array(
727 727
                     '0' => ':global',
728
-                  ),
729
-                  'from' => array(
728
+                    ),
729
+                    'from' => array(
730 730
                     '0' => ':global',
731
-                  ),
731
+                    ),
732 732
                 ),
733 733
                 'rules_input_evaluator_php' => array(
734
-                  'message' => array(
734
+                    'message' => array(
735 735
                     '0' => 'oldhost_id',
736 736
                     '1' => 'targethost_id',
737 737
                     '2' => 'user',
738
-                  ),
738
+                    ),
739
+                ),
739 740
                 ),
740
-              ),
741 741
             ),
742 742
             '#name' => 'boinccore_rules_action_mail_to_admins',
743 743
             '#info' => array(
744
-              'label' => 'Notify admins via email',
745
-              'module' => 'BOINC core',
746
-              'eval input' => array(
744
+                'label' => 'Notify admins via email',
745
+                'module' => 'BOINC core',
746
+                'eval input' => array(
747 747
                 '0' => 'subject',
748 748
                 '1' => 'message',
749 749
                 '2' => 'from',
750
-              ),
750
+                ),
751 751
             ),
752 752
             '#weight' => 0.0,
753
-          ),
753
+            ),
754 754
         ),
755 755
         '#version' => 6003,
756
-      ),
757
-      'rules_notify_admins_about_zombie_merge_attempt' => array(
756
+        ),
757
+        'rules_notify_admins_about_zombie_merge_attempt' => array(
758 758
         '#type' => 'rule',
759 759
         '#set' => 'event_boincwork_zombie_merge_error',
760 760
         '#label' => 'Notify admins about zombie merge attempt',
761 761
         '#active' => 1,
762 762
         '#weight' => '0',
763 763
         '#categories' => array(
764
-          '0' => 'boinc_standard',
765
-          '1' => 'admin notification',
764
+            '0' => 'boinc_standard',
765
+            '1' => 'admin notification',
766 766
         ),
767 767
         '#status' => 'default',
768 768
         '#conditions' => array(),
769 769
         '#actions' => array(
770
-          '0' => array(
770
+            '0' => array(
771 771
             '#type' => 'action',
772 772
             '#settings' => array(
773
-              'from' => '',
774
-              'subject' => '[subject_tag:string] Zombie host merging error',
775
-              'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s userid is equal to 0, a zombie host. 
773
+                'from' => '',
774
+                'subject' => '[subject_tag:string] Zombie host merging error',
775
+                'message' => 'User tried to merge a host (old_host) into a target host where the target host\'s userid is equal to 0, a zombie host. 
776 776
 I.e., $target_host->userid == 0
777 777
 
778 778
 Information about this host merge attempt:
@@ -784,3303 +784,3303 @@  discard block
 block discarded – undo
784 784
 print "BOINC id: " . $account->boincuser_id . "\\n";
785 785
 print "Drupal UID: " . $user->uid . "\\n";
786 786
 ?>',
787
-              '#eval input' => array(
787
+                '#eval input' => array(
788 788
                 'token_rules_input_evaluator' => array(
789
-                  'subject' => array(
789
+                    'subject' => array(
790 790
                     '0' => 'subject_tag',
791 791
                     '1' => ':global',
792
-                  ),
793
-                  'message' => array(
792
+                    ),
793
+                    'message' => array(
794 794
                     '0' => ':global',
795
-                  ),
796
-                  'from' => array(
795
+                    ),
796
+                    'from' => array(
797 797
                     '0' => ':global',
798
-                  ),
798
+                    ),
799 799
                 ),
800 800
                 'rules_input_evaluator_php' => array(
801
-                  'message' => array(
801
+                    'message' => array(
802 802
                     '0' => 'oldhost_id',
803 803
                     '1' => 'targethost_id',
804 804
                     '2' => 'user',
805
-                  ),
805
+                    ),
806
+                ),
806 807
                 ),
807
-              ),
808 808
             ),
809 809
             '#name' => 'boinccore_rules_action_mail_to_admins',
810 810
             '#info' => array(
811
-              'label' => 'Notify admins via email',
812
-              'module' => 'BOINC core',
813
-              'eval input' => array(
811
+                'label' => 'Notify admins via email',
812
+                'module' => 'BOINC core',
813
+                'eval input' => array(
814 814
                 '0' => 'subject',
815 815
                 '1' => 'message',
816 816
                 '2' => 'from',
817
-              ),
817
+                ),
818 818
             ),
819 819
             '#weight' => 0.0,
820
-          ),
820
+            ),
821 821
         ),
822 822
         '#version' => 6003,
823
-      ),
824
-      'rules_notify_admins_error_when_user_consenting_with_missing_consent_type' => array(
823
+        ),
824
+        'rules_notify_admins_error_when_user_consenting_with_missing_consent_type' => array(
825 825
         '#type' => 'rule',
826 826
         '#set' => 'event_boincuser_general_consent_type_error',
827 827
         '#label' => 'Notify admins error when user consenting with missing consent type',
828 828
         '#active' => 1,
829 829
         '#weight' => '0',
830 830
         '#categories' => array(
831
-          '0' => 'boinc_standard',
832
-          '1' => 'admin notification',
831
+            '0' => 'boinc_standard',
832
+            '1' => 'admin notification',
833 833
         ),
834 834
         '#status' => 'default',
835 835
         '#conditions' => array(),
836 836
         '#actions' => array(
837
-          '0' => array(
837
+            '0' => array(
838 838
             '#type' => 'action',
839 839
             '#settings' => array(
840
-              'from' => '',
841
-              'subject' => '[subject_tag:string] Error from user consenting to terms of use, missing consent type',
842
-              'message' => '[user:display-name], [user:mail], attempted to consent to terms-of-use form and the function \'check_consent_type\' returned an error. Consent type [consent_type:string] seems to be generating an error.',
843
-              '#eval input' => array(
840
+                'from' => '',
841
+                'subject' => '[subject_tag:string] Error from user consenting to terms of use, missing consent type',
842
+                'message' => '[user:display-name], [user:mail], attempted to consent to terms-of-use form and the function \'check_consent_type\' returned an error. Consent type [consent_type:string] seems to be generating an error.',
843
+                '#eval input' => array(
844 844
                 'token_rules_input_evaluator' => array(
845
-                  'subject' => array(
845
+                    'subject' => array(
846 846
                     '0' => 'subject_tag',
847 847
                     '1' => ':global',
848
-                  ),
849
-                  'message' => array(
848
+                    ),
849
+                    'message' => array(
850 850
                     '0' => 'consent_type',
851 851
                     '1' => 'user',
852 852
                     '2' => ':global',
853
-                  ),
854
-                  'from' => array(
853
+                    ),
854
+                    'from' => array(
855 855
                     '0' => ':global',
856
-                  ),
856
+                    ),
857
+                ),
857 858
                 ),
858
-              ),
859 859
             ),
860 860
             '#name' => 'boinccore_rules_action_mail_to_admins',
861 861
             '#info' => array(
862
-              'label' => 'Notify admins via email',
863
-              'module' => 'BOINC core',
864
-              'eval input' => array(
862
+                'label' => 'Notify admins via email',
863
+                'module' => 'BOINC core',
864
+                'eval input' => array(
865 865
                 '0' => 'subject',
866 866
                 '1' => 'message',
867 867
                 '2' => 'from',
868
-              ),
868
+                ),
869 869
             ),
870 870
             '#weight' => 0.0,
871
-          ),
871
+            ),
872 872
         ),
873 873
         '#version' => 6003,
874
-      ),
875
-      'rules_notify_admins_user_changing_email_address_to_existing_user' => array(
874
+        ),
875
+        'rules_notify_admins_user_changing_email_address_to_existing_user' => array(
876 876
         '#type' => 'rule',
877 877
         '#set' => 'event_boincuser_change_email_error',
878 878
         '#label' => 'Notify admins user changing email address to existing user',
879 879
         '#active' => 1,
880 880
         '#weight' => '0',
881 881
         '#categories' => array(
882
-          '0' => 'boinc_standard',
883
-          '1' => 'admin notification',
882
+            '0' => 'boinc_standard',
883
+            '1' => 'admin notification',
884 884
         ),
885 885
         '#status' => 'default',
886 886
         '#conditions' => array(),
887 887
         '#actions' => array(
888
-          '0' => array(
888
+            '0' => array(
889 889
             '#type' => 'action',
890 890
             '#settings' => array(
891
-              'from' => '',
892
-              'subject' => '[subject_tag:string] User attempted to change email address to one used by existing user.',
893
-              'message' => '[user:display-name]	with email [user:mail] attempted to change their email to [new_email_addr:string], which is already in use by another user.',
894
-              '#eval input' => array(
891
+                'from' => '',
892
+                'subject' => '[subject_tag:string] User attempted to change email address to one used by existing user.',
893
+                'message' => '[user:display-name]	with email [user:mail] attempted to change their email to [new_email_addr:string], which is already in use by another user.',
894
+                '#eval input' => array(
895 895
                 'token_rules_input_evaluator' => array(
896
-                  'subject' => array(
896
+                    'subject' => array(
897 897
                     '0' => 'subject_tag',
898 898
                     '1' => ':global',
899
-                  ),
900
-                  'message' => array(
899
+                    ),
900
+                    'message' => array(
901 901
                     '0' => 'new_email_addr',
902 902
                     '1' => 'user',
903 903
                     '2' => ':global',
904
-                  ),
905
-                  'from' => array(
904
+                    ),
905
+                    'from' => array(
906 906
                     '0' => ':global',
907
-                  ),
907
+                    ),
908
+                ),
908 909
                 ),
909
-              ),
910 910
             ),
911 911
             '#name' => 'boinccore_rules_action_mail_to_admins',
912 912
             '#info' => array(
913
-              'label' => 'Notify admins via email',
914
-              'module' => 'BOINC core',
915
-              'eval input' => array(
913
+                'label' => 'Notify admins via email',
914
+                'module' => 'BOINC core',
915
+                'eval input' => array(
916 916
                 '0' => 'subject',
917 917
                 '1' => 'message',
918 918
                 '2' => 'from',
919
-              ),
919
+                ),
920 920
             ),
921 921
             '#weight' => 0.0,
922
-          ),
922
+            ),
923 923
         ),
924 924
         '#version' => 6003,
925
-      ),
926
-      'rules_notify_admins_user_reverting_to_previous_email_address_that_is_now_used_by_another_user' => array(
925
+        ),
926
+        'rules_notify_admins_user_reverting_to_previous_email_address_that_is_now_used_by_another_user' => array(
927 927
         '#type' => 'rule',
928 928
         '#set' => 'event_boincuser_revert_email_error',
929 929
         '#label' => 'Notify admins user reverting to previous email address that is now used by another user',
930 930
         '#active' => 1,
931 931
         '#weight' => '0',
932 932
         '#categories' => array(
933
-          '0' => 'boinc_standard',
934
-          '1' => 'admin notification',
933
+            '0' => 'boinc_standard',
934
+            '1' => 'admin notification',
935 935
         ),
936 936
         '#status' => 'default',
937 937
         '#conditions' => array(),
938 938
         '#actions' => array(
939
-          '0' => array(
939
+            '0' => array(
940 940
             '#type' => 'action',
941 941
             '#settings' => array(
942
-              'from' => '',
943
-              'subject' => '[subject_tag:string] User attempted to revert to previous email address to one used by existing user.',
944
-              'message' => '[user:display-name]	with email [user:mail] attempted to revert their email to their previous email address, [new_email_addr:string], which is already in use by another user.',
945
-              '#eval input' => array(
942
+                'from' => '',
943
+                'subject' => '[subject_tag:string] User attempted to revert to previous email address to one used by existing user.',
944
+                'message' => '[user:display-name]	with email [user:mail] attempted to revert their email to their previous email address, [new_email_addr:string], which is already in use by another user.',
945
+                '#eval input' => array(
946 946
                 'token_rules_input_evaluator' => array(
947
-                  'subject' => array(
947
+                    'subject' => array(
948 948
                     '0' => 'subject_tag',
949 949
                     '1' => ':global',
950
-                  ),
951
-                  'message' => array(
950
+                    ),
951
+                    'message' => array(
952 952
                     '0' => 'new_email_addr',
953 953
                     '1' => 'user',
954 954
                     '2' => ':global',
955
-                  ),
956
-                  'from' => array(
955
+                    ),
956
+                    'from' => array(
957 957
                     '0' => ':global',
958
-                  ),
958
+                    ),
959
+                ),
959 960
                 ),
960
-              ),
961 961
             ),
962 962
             '#name' => 'boinccore_rules_action_mail_to_admins',
963 963
             '#info' => array(
964
-              'label' => 'Notify admins via email',
965
-              'module' => 'BOINC core',
966
-              'eval input' => array(
964
+                'label' => 'Notify admins via email',
965
+                'module' => 'BOINC core',
966
+                'eval input' => array(
967 967
                 '0' => 'subject',
968 968
                 '1' => 'message',
969 969
                 '2' => 'from',
970
-              ),
970
+                ),
971 971
             ),
972 972
             '#weight' => 0.0,
973
-          ),
973
+            ),
974 974
         ),
975 975
         '#version' => 6003,
976
-      ),
977
-      'rules_notify_admins_when_user_fails_to_delete_their_own_account' => array(
976
+        ),
977
+        'rules_notify_admins_when_user_fails_to_delete_their_own_account' => array(
978 978
         '#type' => 'rule',
979 979
         '#set' => 'event_boincuser_delete_general_error',
980 980
         '#label' => 'Notify admins when user fails to delete their own account',
981 981
         '#active' => 1,
982 982
         '#weight' => '0',
983 983
         '#categories' => array(
984
-          '0' => 'boinc_standard',
985
-          '1' => 'admin notification',
984
+            '0' => 'boinc_standard',
985
+            '1' => 'admin notification',
986 986
         ),
987 987
         '#status' => 'default',
988 988
         '#conditions' => array(),
989 989
         '#actions' => array(
990
-          '0' => array(
990
+            '0' => array(
991 991
             '#type' => 'action',
992 992
             '#settings' => array(
993
-              'from' => '',
994
-              'subject' => '[subject_tag:string] Error when user trying to delete their account',
995
-              'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error from \'boincuser_load\'.',
996
-              '#eval input' => array(
993
+                'from' => '',
994
+                'subject' => '[subject_tag:string] Error when user trying to delete their account',
995
+                'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error from \'boincuser_load\'.',
996
+                '#eval input' => array(
997 997
                 'token_rules_input_evaluator' => array(
998
-                  'subject' => array(
998
+                    'subject' => array(
999 999
                     '0' => 'subject_tag',
1000 1000
                     '1' => ':global',
1001
-                  ),
1002
-                  'message' => array(
1001
+                    ),
1002
+                    'message' => array(
1003 1003
                     '0' => 'user',
1004 1004
                     '1' => ':global',
1005
-                  ),
1006
-                  'from' => array(
1005
+                    ),
1006
+                    'from' => array(
1007 1007
                     '0' => ':global',
1008
-                  ),
1008
+                    ),
1009
+                ),
1009 1010
                 ),
1010
-              ),
1011 1011
             ),
1012 1012
             '#name' => 'boinccore_rules_action_mail_to_admins',
1013 1013
             '#info' => array(
1014
-              'label' => 'Notify admins via email',
1015
-              'module' => 'BOINC core',
1016
-              'eval input' => array(
1014
+                'label' => 'Notify admins via email',
1015
+                'module' => 'BOINC core',
1016
+                'eval input' => array(
1017 1017
                 '0' => 'subject',
1018 1018
                 '1' => 'message',
1019 1019
                 '2' => 'from',
1020
-              ),
1020
+                ),
1021 1021
             ),
1022 1022
             '#weight' => 0.0,
1023
-          ),
1023
+            ),
1024 1024
         ),
1025 1025
         '#version' => 6003,
1026
-      ),
1027
-      'rules_notify_admins_when_user_tries_to_delete_account_with_invalid_uid' => array(
1026
+        ),
1027
+        'rules_notify_admins_when_user_tries_to_delete_account_with_invalid_uid' => array(
1028 1028
         '#type' => 'rule',
1029 1029
         '#set' => 'event_boincuser_delete_uid_invalid_error',
1030 1030
         '#label' => 'Notify admins when user tries to delete account with invalid uid',
1031 1031
         '#active' => 1,
1032 1032
         '#weight' => '0',
1033 1033
         '#categories' => array(
1034
-          '0' => 'boinc_standard',
1035
-          '1' => 'admin notification',
1034
+            '0' => 'boinc_standard',
1035
+            '1' => 'admin notification',
1036 1036
         ),
1037 1037
         '#status' => 'default',
1038 1038
         '#conditions' => array(),
1039 1039
         '#actions' => array(
1040
-          '0' => array(
1040
+            '0' => array(
1041 1041
             '#type' => 'action',
1042 1042
             '#settings' => array(
1043
-              'from' => '',
1044
-              'subject' => '[subject_tag:string] invalid uid when user trying to delete their account',
1045
-              'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error is Drupal UID=[user:uid] cannot be located.',
1046
-              '#eval input' => array(
1043
+                'from' => '',
1044
+                'subject' => '[subject_tag:string] invalid uid when user trying to delete their account',
1045
+                'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error is Drupal UID=[user:uid] cannot be located.',
1046
+                '#eval input' => array(
1047 1047
                 'token_rules_input_evaluator' => array(
1048
-                  'subject' => array(
1048
+                    'subject' => array(
1049 1049
                     '0' => 'subject_tag',
1050 1050
                     '1' => ':global',
1051
-                  ),
1052
-                  'message' => array(
1051
+                    ),
1052
+                    'message' => array(
1053 1053
                     '0' => 'user',
1054 1054
                     '1' => ':global',
1055
-                  ),
1056
-                  'from' => array(
1055
+                    ),
1056
+                    'from' => array(
1057 1057
                     '0' => ':global',
1058
-                  ),
1058
+                    ),
1059
+                ),
1059 1060
                 ),
1060
-              ),
1061 1061
             ),
1062 1062
             '#name' => 'boinccore_rules_action_mail_to_admins',
1063 1063
             '#info' => array(
1064
-              'label' => 'Notify admins via email',
1065
-              'module' => 'BOINC core',
1066
-              'eval input' => array(
1064
+                'label' => 'Notify admins via email',
1065
+                'module' => 'BOINC core',
1066
+                'eval input' => array(
1067 1067
                 '0' => 'subject',
1068 1068
                 '1' => 'message',
1069 1069
                 '2' => 'from',
1070
-              ),
1070
+                ),
1071 1071
             ),
1072 1072
             '#weight' => 0.0,
1073
-          ),
1073
+            ),
1074 1074
         ),
1075 1075
         '#version' => 6003,
1076
-      ),
1077
-      'rules_notify_admin_error_when_user_consenting_to_terms_of_use' => array(
1076
+        ),
1077
+        'rules_notify_admin_error_when_user_consenting_to_terms_of_use' => array(
1078 1078
         '#type' => 'rule',
1079 1079
         '#set' => 'event_boincuser_general_consent_error',
1080 1080
         '#label' => 'Notify admins error when user consenting to terms of use',
1081 1081
         '#active' => 1,
1082 1082
         '#weight' => '0',
1083 1083
         '#categories' => array(
1084
-          '0' => 'boinc_standard',
1085
-          '1' => 'admin notification',
1084
+            '0' => 'boinc_standard',
1085
+            '1' => 'admin notification',
1086 1086
         ),
1087 1087
         '#status' => 'default',
1088 1088
         '#conditions' => array(),
1089 1089
         '#actions' => array(
1090
-          '0' => array(
1090
+            '0' => array(
1091 1091
             '#type' => 'action',
1092 1092
             '#settings' => array(
1093
-              'from' => '',
1094
-              'subject' => '[subject_tag:string] Error when user attempted to consent to terms of use',
1095
-              'message' => '[user:display-name], [user:mail], attempted to consent to terms-of-use form and an error was generated from function \'consent_to_a_policy\'.
1093
+                'from' => '',
1094
+                'subject' => '[subject_tag:string] Error when user attempted to consent to terms of use',
1095
+                'message' => '[user:display-name], [user:mail], attempted to consent to terms-of-use form and an error was generated from function \'consent_to_a_policy\'.
1096 1096
 
1097 1097
 asdf jkl;',
1098
-              '#eval input' => array(
1098
+                '#eval input' => array(
1099 1099
                 'token_rules_input_evaluator' => array(
1100
-                  'subject' => array(
1100
+                    'subject' => array(
1101 1101
                     '0' => 'subject_tag',
1102 1102
                     '1' => ':global',
1103
-                  ),
1104
-                  'message' => array(
1103
+                    ),
1104
+                    'message' => array(
1105 1105
                     '0' => 'user',
1106 1106
                     '1' => ':global',
1107
-                  ),
1108
-                  'from' => array(
1107
+                    ),
1108
+                    'from' => array(
1109 1109
                     '0' => ':global',
1110
-                  ),
1110
+                    ),
1111
+                ),
1111 1112
                 ),
1112
-              ),
1113 1113
             ),
1114 1114
             '#name' => 'boinccore_rules_action_mail_to_admins',
1115 1115
             '#info' => array(
1116
-              'label' => 'Notify admins via email',
1117
-              'module' => 'BOINC core',
1118
-              'eval input' => array(
1116
+                'label' => 'Notify admins via email',
1117
+                'module' => 'BOINC core',
1118
+                'eval input' => array(
1119 1119
                 '0' => 'subject',
1120 1120
                 '1' => 'message',
1121 1121
                 '2' => 'from',
1122
-              ),
1122
+                ),
1123 1123
             ),
1124 1124
             '#weight' => 0.0,
1125
-          ),
1125
+            ),
1126 1126
         ),
1127 1127
         '#version' => 6003,
1128
-      ),
1129
-      'rules_offensive_comment_reported_hostile' => array(
1128
+        ),
1129
+        'rules_offensive_comment_reported_hostile' => array(
1130 1130
         '#type' => 'rule',
1131 1131
         '#set' => 'event_flag_flagged_abuse_comment_3',
1132 1132
         '#label' => 'Offensive comment reported - Hostile',
1133 1133
         '#active' => 1,
1134 1134
         '#weight' => '0',
1135 1135
         '#categories' => array(
1136
-          '0' => 'boinc_standard',
1137
-          '1' => 'moderator notification',
1136
+            '0' => 'boinc_standard',
1137
+            '1' => 'moderator notification',
1138 1138
         ),
1139 1139
         '#status' => 'default',
1140 1140
         '#conditions' => array(),
1141 1141
         '#actions' => array(
1142
-          '0' => array(
1142
+            '0' => array(
1143 1143
             '#type' => 'action',
1144 1144
             '#settings' => array(
1145
-              'from' => '',
1146
-              'subject' => 'Report of hostile language in [node:type] comment at [:global:site-name]',
1147
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1145
+                'from' => '',
1146
+                'subject' => 'Report of hostile language in [node:type] comment at [:global:site-name]',
1147
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1148 1148
 containing hostile language for the [:global:site-name] site:
1149 1149
 
1150 1150
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1151 1151
 
1152 1152
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1153
-              '#eval input' => array(
1153
+                '#eval input' => array(
1154 1154
                 'token_rules_input_evaluator' => array(
1155
-                  'subject' => array(
1155
+                    'subject' => array(
1156 1156
                     '0' => 'node',
1157 1157
                     '1' => ':global',
1158
-                  ),
1159
-                  'message' => array(
1158
+                    ),
1159
+                    'message' => array(
1160 1160
                     '0' => 'flagging_user',
1161 1161
                     '1' => 'comment',
1162 1162
                     '2' => 'node',
1163 1163
                     '3' => ':global',
1164
-                  ),
1165
-                  'from' => array(
1164
+                    ),
1165
+                    'from' => array(
1166 1166
                     '0' => ':global',
1167
-                  ),
1167
+                    ),
1168 1168
                 ),
1169 1169
                 'rules_input_evaluator_php' => array(
1170
-                  'message' => array(),
1170
+                    'message' => array(),
1171
+                ),
1171 1172
                 ),
1172
-              ),
1173 1173
             ),
1174 1174
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1175 1175
             '#info' => array(
1176
-              'label' => 'Notify moderators via email',
1177
-              'module' => 'BOINC core',
1178
-              'eval input' => array(
1176
+                'label' => 'Notify moderators via email',
1177
+                'module' => 'BOINC core',
1178
+                'eval input' => array(
1179 1179
                 '0' => 'subject',
1180 1180
                 '1' => 'message',
1181 1181
                 '2' => 'from',
1182
-              ),
1182
+                ),
1183 1183
             ),
1184 1184
             '#weight' => 0.0,
1185
-          ),
1185
+            ),
1186 1186
         ),
1187 1187
         '#version' => 6003,
1188
-      ),
1189
-      'rules_offensive_comment_reported_link' => array(
1188
+        ),
1189
+        'rules_offensive_comment_reported_link' => array(
1190 1190
         '#type' => 'rule',
1191 1191
         '#set' => 'event_flag_flagged_abuse_comment_2',
1192 1192
         '#label' => 'Offensive comment reported - Link',
1193 1193
         '#active' => 1,
1194 1194
         '#weight' => '0',
1195 1195
         '#categories' => array(
1196
-          '0' => 'boinc_standard',
1197
-          '1' => 'moderator notification',
1196
+            '0' => 'boinc_standard',
1197
+            '1' => 'moderator notification',
1198 1198
         ),
1199 1199
         '#status' => 'default',
1200 1200
         '#conditions' => array(),
1201 1201
         '#actions' => array(
1202
-          '0' => array(
1202
+            '0' => array(
1203 1203
             '#type' => 'action',
1204 1204
             '#settings' => array(
1205
-              'from' => '',
1206
-              'subject' => 'Report of inappropriate link in  [node:type] comment at [:global:site-name]',
1207
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1205
+                'from' => '',
1206
+                'subject' => 'Report of inappropriate link in  [node:type] comment at [:global:site-name]',
1207
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1208 1208
 containing an offensive or inappropriate link for the [:global:site-name] site:
1209 1209
 
1210 1210
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1211 1211
 
1212 1212
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1213
-              '#eval input' => array(
1213
+                '#eval input' => array(
1214 1214
                 'token_rules_input_evaluator' => array(
1215
-                  'subject' => array(
1215
+                    'subject' => array(
1216 1216
                     '0' => 'node',
1217 1217
                     '1' => ':global',
1218
-                  ),
1219
-                  'message' => array(
1218
+                    ),
1219
+                    'message' => array(
1220 1220
                     '0' => 'flagging_user',
1221 1221
                     '1' => 'comment',
1222 1222
                     '2' => 'node',
1223 1223
                     '3' => ':global',
1224
-                  ),
1225
-                  'from' => array(
1224
+                    ),
1225
+                    'from' => array(
1226 1226
                     '0' => ':global',
1227
-                  ),
1227
+                    ),
1228 1228
                 ),
1229 1229
                 'rules_input_evaluator_php' => array(
1230
-                  'message' => array(),
1230
+                    'message' => array(),
1231
+                ),
1231 1232
                 ),
1232
-              ),
1233 1233
             ),
1234 1234
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1235 1235
             '#info' => array(
1236
-              'label' => 'Notify moderators via email',
1237
-              'module' => 'BOINC core',
1238
-              'eval input' => array(
1236
+                'label' => 'Notify moderators via email',
1237
+                'module' => 'BOINC core',
1238
+                'eval input' => array(
1239 1239
                 '0' => 'subject',
1240 1240
                 '1' => 'message',
1241 1241
                 '2' => 'from',
1242
-              ),
1242
+                ),
1243 1243
             ),
1244 1244
             '#weight' => 0.0,
1245
-          ),
1245
+            ),
1246 1246
         ),
1247 1247
         '#version' => 6003,
1248
-      ),
1249
-      'rules_offensive_comment_reported_not_kid_friendly' => array(
1248
+        ),
1249
+        'rules_offensive_comment_reported_not_kid_friendly' => array(
1250 1250
         '#type' => 'rule',
1251 1251
         '#set' => 'event_flag_flagged_abuse_comment_4',
1252 1252
         '#label' => 'Offensive comment reported - Not Kid Friendly',
1253 1253
         '#active' => 1,
1254 1254
         '#weight' => '0',
1255 1255
         '#categories' => array(
1256
-          '0' => 'boinc_standard',
1257
-          '1' => 'moderator notification',
1256
+            '0' => 'boinc_standard',
1257
+            '1' => 'moderator notification',
1258 1258
         ),
1259 1259
         '#status' => 'default',
1260 1260
         '#conditions' => array(),
1261 1261
         '#actions' => array(
1262
-          '0' => array(
1262
+            '0' => array(
1263 1263
             '#type' => 'action',
1264 1264
             '#settings' => array(
1265
-              'from' => '',
1266
-              'subject' => 'Report of non Kid-friendly language in [node:type] comment at [:global:site-name]',
1267
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1265
+                'from' => '',
1266
+                'subject' => 'Report of non Kid-friendly language in [node:type] comment at [:global:site-name]',
1267
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1268 1268
 containing non Kid-friendly language for the [:global:site-name] site:
1269 1269
 
1270 1270
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1271 1271
 
1272 1272
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1273
-              '#eval input' => array(
1273
+                '#eval input' => array(
1274 1274
                 'token_rules_input_evaluator' => array(
1275
-                  'subject' => array(
1275
+                    'subject' => array(
1276 1276
                     '0' => 'node',
1277 1277
                     '1' => ':global',
1278
-                  ),
1279
-                  'message' => array(
1278
+                    ),
1279
+                    'message' => array(
1280 1280
                     '0' => 'flagging_user',
1281 1281
                     '1' => 'comment',
1282 1282
                     '2' => 'node',
1283 1283
                     '3' => ':global',
1284
-                  ),
1285
-                  'from' => array(
1284
+                    ),
1285
+                    'from' => array(
1286 1286
                     '0' => ':global',
1287
-                  ),
1287
+                    ),
1288 1288
                 ),
1289 1289
                 'rules_input_evaluator_php' => array(
1290
-                  'message' => array(),
1290
+                    'message' => array(),
1291
+                ),
1291 1292
                 ),
1292
-              ),
1293 1293
             ),
1294 1294
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1295 1295
             '#info' => array(
1296
-              'label' => 'Notify moderators via email',
1297
-              'module' => 'BOINC core',
1298
-              'eval input' => array(
1296
+                'label' => 'Notify moderators via email',
1297
+                'module' => 'BOINC core',
1298
+                'eval input' => array(
1299 1299
                 '0' => 'subject',
1300 1300
                 '1' => 'message',
1301 1301
                 '2' => 'from',
1302
-              ),
1302
+                ),
1303 1303
             ),
1304 1304
             '#weight' => 0.0,
1305
-          ),
1305
+            ),
1306 1306
         ),
1307 1307
         '#version' => 6003,
1308
-      ),
1309
-      'rules_offensive_comment_reported_other' => array(
1308
+        ),
1309
+        'rules_offensive_comment_reported_other' => array(
1310 1310
         '#type' => 'rule',
1311 1311
         '#set' => 'event_flag_flagged_abuse_comment_5',
1312 1312
         '#label' => 'Offensive comment reported - Other',
1313 1313
         '#active' => 1,
1314 1314
         '#weight' => '0',
1315 1315
         '#categories' => array(
1316
-          '0' => 'boinc_standard',
1317
-          '1' => 'moderator notification',
1316
+            '0' => 'boinc_standard',
1317
+            '1' => 'moderator notification',
1318 1318
         ),
1319 1319
         '#status' => 'default',
1320 1320
         '#conditions' => array(),
1321 1321
         '#actions' => array(
1322
-          '0' => array(
1322
+            '0' => array(
1323 1323
             '#type' => 'action',
1324 1324
             '#settings' => array(
1325
-              'from' => '',
1326
-              'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
1327
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1325
+                'from' => '',
1326
+                'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
1327
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as 
1328 1328
 being offensive or inappropriate for the [:global:site-name] site, with reason \'Other\':
1329 1329
 
1330 1330
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1331 1331
 
1332 1332
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1333
-              '#eval input' => array(
1333
+                '#eval input' => array(
1334 1334
                 'token_rules_input_evaluator' => array(
1335
-                  'subject' => array(
1335
+                    'subject' => array(
1336 1336
                     '0' => 'node',
1337 1337
                     '1' => ':global',
1338
-                  ),
1339
-                  'message' => array(
1338
+                    ),
1339
+                    'message' => array(
1340 1340
                     '0' => 'flagging_user',
1341 1341
                     '1' => 'comment',
1342 1342
                     '2' => 'node',
1343 1343
                     '3' => ':global',
1344
-                  ),
1345
-                  'from' => array(
1344
+                    ),
1345
+                    'from' => array(
1346 1346
                     '0' => ':global',
1347
-                  ),
1347
+                    ),
1348 1348
                 ),
1349 1349
                 'rules_input_evaluator_php' => array(
1350
-                  'message' => array(),
1350
+                    'message' => array(),
1351
+                ),
1351 1352
                 ),
1352
-              ),
1353 1353
             ),
1354 1354
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1355 1355
             '#info' => array(
1356
-              'label' => 'Notify moderators via email',
1357
-              'module' => 'BOINC core',
1358
-              'eval input' => array(
1356
+                'label' => 'Notify moderators via email',
1357
+                'module' => 'BOINC core',
1358
+                'eval input' => array(
1359 1359
                 '0' => 'subject',
1360 1360
                 '1' => 'message',
1361 1361
                 '2' => 'from',
1362
-              ),
1362
+                ),
1363 1363
             ),
1364 1364
             '#weight' => 0.0,
1365
-          ),
1365
+            ),
1366 1366
         ),
1367 1367
         '#version' => 6003,
1368
-      ),
1369
-      'rules_offensive_comment_reported_spam' => array(
1368
+        ),
1369
+        'rules_offensive_comment_reported_spam' => array(
1370 1370
         '#type' => 'rule',
1371 1371
         '#set' => 'event_flag_flagged_abuse_comment_1',
1372 1372
         '#label' => 'Offensive comment reported - SPAM',
1373 1373
         '#active' => 1,
1374 1374
         '#weight' => '0',
1375 1375
         '#categories' => array(
1376
-          '0' => 'boinc_standard',
1377
-          '1' => 'moderator notification',
1376
+            '0' => 'boinc_standard',
1377
+            '1' => 'moderator notification',
1378 1378
         ),
1379 1379
         '#status' => 'default',
1380 1380
         '#conditions' => array(),
1381 1381
         '#actions' => array(
1382
-          '0' => array(
1382
+            '0' => array(
1383 1383
             '#type' => 'action',
1384 1384
             '#settings' => array(
1385
-              'from' => '',
1386
-              'subject' => 'Report of SPAM [node:type] comment at [:global:site-name]',
1387
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content 
1385
+                'from' => '',
1386
+                'subject' => 'Report of SPAM [node:type] comment at [:global:site-name]',
1387
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content 
1388 1388
 as being SPAM for the [:global:site-name] site:
1389 1389
 
1390 1390
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1391 1391
 
1392 1392
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1393
-              '#eval input' => array(
1393
+                '#eval input' => array(
1394 1394
                 'token_rules_input_evaluator' => array(
1395
-                  'subject' => array(
1395
+                    'subject' => array(
1396 1396
                     '0' => 'node',
1397 1397
                     '1' => ':global',
1398
-                  ),
1399
-                  'message' => array(
1398
+                    ),
1399
+                    'message' => array(
1400 1400
                     '0' => 'flagging_user',
1401 1401
                     '1' => 'comment',
1402 1402
                     '2' => 'node',
1403 1403
                     '3' => ':global',
1404
-                  ),
1405
-                  'from' => array(
1404
+                    ),
1405
+                    'from' => array(
1406 1406
                     '0' => ':global',
1407
-                  ),
1407
+                    ),
1408 1408
                 ),
1409 1409
                 'rules_input_evaluator_php' => array(
1410
-                  'message' => array(),
1410
+                    'message' => array(),
1411
+                ),
1411 1412
                 ),
1412
-              ),
1413 1413
             ),
1414 1414
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1415 1415
             '#info' => array(
1416
-              'label' => 'Notify moderators via email',
1417
-              'module' => 'BOINC core',
1418
-              'eval input' => array(
1416
+                'label' => 'Notify moderators via email',
1417
+                'module' => 'BOINC core',
1418
+                'eval input' => array(
1419 1419
                 '0' => 'subject',
1420 1420
                 '1' => 'message',
1421 1421
                 '2' => 'from',
1422
-              ),
1422
+                ),
1423 1423
             ),
1424 1424
             '#weight' => 0.0,
1425
-          ),
1425
+            ),
1426 1426
         ),
1427 1427
         '#version' => 6003,
1428
-      ),
1429
-      'rules_offensive_content_reported_hostile' => array(
1428
+        ),
1429
+        'rules_offensive_content_reported_hostile' => array(
1430 1430
         '#type' => 'rule',
1431 1431
         '#set' => 'event_flag_flagged_abuse_node_3',
1432 1432
         '#label' => 'Offensive content reported - Hostile',
1433 1433
         '#active' => 1,
1434 1434
         '#weight' => '0',
1435 1435
         '#categories' => array(
1436
-          '0' => 'boinc_standard',
1437
-          '1' => 'moderator notification',
1436
+            '0' => 'boinc_standard',
1437
+            '1' => 'moderator notification',
1438 1438
         ),
1439 1439
         '#status' => 'default',
1440 1440
         '#conditions' => array(),
1441 1441
         '#actions' => array(
1442
-          '0' => array(
1442
+            '0' => array(
1443 1443
             '#type' => 'action',
1444 1444
             '#settings' => array(
1445
-              'from' => '',
1446
-              'subject' => 'Report of hostile language in [node:type] content at [:global:site-name]',
1447
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1445
+                'from' => '',
1446
+                'subject' => 'Report of hostile language in [node:type] content at [:global:site-name]',
1447
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1448 1448
 as hostile language for the [:global:site-name] site:
1449 1449
 
1450 1450
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1451 1451
 
1452 1452
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1453
-              '#eval input' => array(
1453
+                '#eval input' => array(
1454 1454
                 'token_rules_input_evaluator' => array(
1455
-                  'subject' => array(
1455
+                    'subject' => array(
1456 1456
                     '0' => 'node',
1457 1457
                     '1' => ':global',
1458
-                  ),
1459
-                  'message' => array(
1458
+                    ),
1459
+                    'message' => array(
1460 1460
                     '0' => 'flagging_user',
1461 1461
                     '1' => 'node',
1462 1462
                     '2' => ':global',
1463
-                  ),
1464
-                  'from' => array(
1463
+                    ),
1464
+                    'from' => array(
1465 1465
                     '0' => ':global',
1466
-                  ),
1466
+                    ),
1467 1467
                 ),
1468 1468
                 'rules_input_evaluator_php' => array(
1469
-                  'message' => array(
1469
+                    'message' => array(
1470 1470
                     '0' => 'node',
1471
-                  ),
1471
+                    ),
1472
+                ),
1472 1473
                 ),
1473
-              ),
1474 1474
             ),
1475 1475
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1476 1476
             '#info' => array(
1477
-              'label' => 'Notify moderators via email',
1478
-              'module' => 'BOINC core',
1479
-              'eval input' => array(
1477
+                'label' => 'Notify moderators via email',
1478
+                'module' => 'BOINC core',
1479
+                'eval input' => array(
1480 1480
                 '0' => 'subject',
1481 1481
                 '1' => 'message',
1482 1482
                 '2' => 'from',
1483
-              ),
1483
+                ),
1484 1484
             ),
1485 1485
             '#weight' => 0.0,
1486
-          ),
1486
+            ),
1487 1487
         ),
1488 1488
         '#version' => 6003,
1489
-      ),
1490
-      'rules_offensive_content_reported_link' => array(
1489
+        ),
1490
+        'rules_offensive_content_reported_link' => array(
1491 1491
         '#type' => 'rule',
1492 1492
         '#set' => 'event_flag_flagged_abuse_node_2',
1493 1493
         '#label' => 'Offensive content reported - Link',
1494 1494
         '#active' => 1,
1495 1495
         '#weight' => '0',
1496 1496
         '#categories' => array(
1497
-          '0' => 'boinc_standard',
1498
-          '1' => 'moderator notification',
1497
+            '0' => 'boinc_standard',
1498
+            '1' => 'moderator notification',
1499 1499
         ),
1500 1500
         '#status' => 'default',
1501 1501
         '#conditions' => array(),
1502 1502
         '#actions' => array(
1503
-          '0' => array(
1503
+            '0' => array(
1504 1504
             '#type' => 'action',
1505 1505
             '#settings' => array(
1506
-              'from' => '',
1507
-              'subject' => 'Report of inappropriate link in [node:type] content at [:global:site-name]',
1508
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1506
+                'from' => '',
1507
+                'subject' => 'Report of inappropriate link in [node:type] content at [:global:site-name]',
1508
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1509 1509
 as containing an offensive or inappropriate link for the [:global:site-name] site:
1510 1510
 
1511 1511
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1512 1512
 
1513 1513
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1514
-              '#eval input' => array(
1514
+                '#eval input' => array(
1515 1515
                 'token_rules_input_evaluator' => array(
1516
-                  'subject' => array(
1516
+                    'subject' => array(
1517 1517
                     '0' => 'node',
1518 1518
                     '1' => ':global',
1519
-                  ),
1520
-                  'message' => array(
1519
+                    ),
1520
+                    'message' => array(
1521 1521
                     '0' => 'flagging_user',
1522 1522
                     '1' => 'node',
1523 1523
                     '2' => ':global',
1524
-                  ),
1525
-                  'from' => array(
1524
+                    ),
1525
+                    'from' => array(
1526 1526
                     '0' => ':global',
1527
-                  ),
1527
+                    ),
1528 1528
                 ),
1529 1529
                 'rules_input_evaluator_php' => array(
1530
-                  'message' => array(
1530
+                    'message' => array(
1531 1531
                     '0' => 'node',
1532
-                  ),
1532
+                    ),
1533
+                ),
1533 1534
                 ),
1534
-              ),
1535 1535
             ),
1536 1536
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1537 1537
             '#info' => array(
1538
-              'label' => 'Notify moderators via email',
1539
-              'module' => 'BOINC core',
1540
-              'eval input' => array(
1538
+                'label' => 'Notify moderators via email',
1539
+                'module' => 'BOINC core',
1540
+                'eval input' => array(
1541 1541
                 '0' => 'subject',
1542 1542
                 '1' => 'message',
1543 1543
                 '2' => 'from',
1544
-              ),
1544
+                ),
1545 1545
             ),
1546 1546
             '#weight' => 0.0,
1547
-          ),
1547
+            ),
1548 1548
         ),
1549 1549
         '#version' => 6003,
1550
-      ),
1551
-      'rules_offensive_content_reported_not_kid_friendly' => array(
1550
+        ),
1551
+        'rules_offensive_content_reported_not_kid_friendly' => array(
1552 1552
         '#type' => 'rule',
1553 1553
         '#set' => 'event_flag_flagged_abuse_node_4',
1554 1554
         '#label' => 'Offensive content reported - Not Kid Friendly',
1555 1555
         '#active' => 1,
1556 1556
         '#weight' => '0',
1557 1557
         '#categories' => array(
1558
-          '0' => 'boinc_standard',
1559
-          '1' => 'moderator notification',
1558
+            '0' => 'boinc_standard',
1559
+            '1' => 'moderator notification',
1560 1560
         ),
1561 1561
         '#status' => 'default',
1562 1562
         '#conditions' => array(),
1563 1563
         '#actions' => array(
1564
-          '0' => array(
1564
+            '0' => array(
1565 1565
             '#type' => 'action',
1566 1566
             '#settings' => array(
1567
-              'from' => '',
1568
-              'subject' => 'Report of non Kid-friendly language in [node:type] content at [:global:site-name]',
1569
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1567
+                'from' => '',
1568
+                'subject' => 'Report of non Kid-friendly language in [node:type] content at [:global:site-name]',
1569
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1570 1570
 as containing non Kid-friendly language for the [:global:site-name] site:
1571 1571
 
1572 1572
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1573 1573
 
1574 1574
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1575
-              '#eval input' => array(
1575
+                '#eval input' => array(
1576 1576
                 'token_rules_input_evaluator' => array(
1577
-                  'subject' => array(
1577
+                    'subject' => array(
1578 1578
                     '0' => 'node',
1579 1579
                     '1' => ':global',
1580
-                  ),
1581
-                  'message' => array(
1580
+                    ),
1581
+                    'message' => array(
1582 1582
                     '0' => 'flagging_user',
1583 1583
                     '1' => 'node',
1584 1584
                     '2' => ':global',
1585
-                  ),
1586
-                  'from' => array(
1585
+                    ),
1586
+                    'from' => array(
1587 1587
                     '0' => ':global',
1588
-                  ),
1588
+                    ),
1589 1589
                 ),
1590 1590
                 'rules_input_evaluator_php' => array(
1591
-                  'message' => array(
1591
+                    'message' => array(
1592 1592
                     '0' => 'node',
1593
-                  ),
1593
+                    ),
1594
+                ),
1594 1595
                 ),
1595
-              ),
1596 1596
             ),
1597 1597
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1598 1598
             '#info' => array(
1599
-              'label' => 'Notify moderators via email',
1600
-              'module' => 'BOINC core',
1601
-              'eval input' => array(
1599
+                'label' => 'Notify moderators via email',
1600
+                'module' => 'BOINC core',
1601
+                'eval input' => array(
1602 1602
                 '0' => 'subject',
1603 1603
                 '1' => 'message',
1604 1604
                 '2' => 'from',
1605
-              ),
1605
+                ),
1606 1606
             ),
1607 1607
             '#weight' => 0.0,
1608
-          ),
1608
+            ),
1609 1609
         ),
1610 1610
         '#version' => 6003,
1611
-      ),
1612
-      'rules_offensive_content_reported_other' => array(
1611
+        ),
1612
+        'rules_offensive_content_reported_other' => array(
1613 1613
         '#type' => 'rule',
1614 1614
         '#set' => 'event_flag_flagged_abuse_node_4',
1615 1615
         '#label' => 'Offensive content reported - Other',
1616 1616
         '#active' => 1,
1617 1617
         '#weight' => '0',
1618 1618
         '#categories' => array(
1619
-          '0' => 'boinc_standard',
1620
-          '1' => 'moderator notification',
1619
+            '0' => 'boinc_standard',
1620
+            '1' => 'moderator notification',
1621 1621
         ),
1622 1622
         '#status' => 'default',
1623 1623
         '#conditions' => array(),
1624 1624
         '#actions' => array(
1625
-          '0' => array(
1625
+            '0' => array(
1626 1626
             '#type' => 'action',
1627 1627
             '#settings' => array(
1628
-              'from' => '',
1629
-              'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
1630
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1628
+                'from' => '',
1629
+                'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
1630
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1631 1631
 as being offensive or inappropriate for the [:global:site-name] site:
1632 1632
 
1633 1633
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1634 1634
 
1635 1635
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1636
-              '#eval input' => array(
1636
+                '#eval input' => array(
1637 1637
                 'token_rules_input_evaluator' => array(
1638
-                  'subject' => array(
1638
+                    'subject' => array(
1639 1639
                     '0' => 'node',
1640 1640
                     '1' => ':global',
1641
-                  ),
1642
-                  'message' => array(
1641
+                    ),
1642
+                    'message' => array(
1643 1643
                     '0' => 'flagging_user',
1644 1644
                     '1' => 'node',
1645 1645
                     '2' => ':global',
1646
-                  ),
1647
-                  'from' => array(
1646
+                    ),
1647
+                    'from' => array(
1648 1648
                     '0' => ':global',
1649
-                  ),
1649
+                    ),
1650 1650
                 ),
1651 1651
                 'rules_input_evaluator_php' => array(
1652
-                  'message' => array(
1652
+                    'message' => array(
1653 1653
                     '0' => 'node',
1654
-                  ),
1654
+                    ),
1655
+                ),
1655 1656
                 ),
1656
-              ),
1657 1657
             ),
1658 1658
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1659 1659
             '#info' => array(
1660
-              'label' => 'Notify moderators via email',
1661
-              'module' => 'BOINC core',
1662
-              'eval input' => array(
1660
+                'label' => 'Notify moderators via email',
1661
+                'module' => 'BOINC core',
1662
+                'eval input' => array(
1663 1663
                 '0' => 'subject',
1664 1664
                 '1' => 'message',
1665 1665
                 '2' => 'from',
1666
-              ),
1666
+                ),
1667 1667
             ),
1668 1668
             '#weight' => 0.0,
1669
-          ),
1669
+            ),
1670 1670
         ),
1671 1671
         '#version' => 6003,
1672
-      ),
1673
-      'rules_offensive_content_reported_spam' => array(
1672
+        ),
1673
+        'rules_offensive_content_reported_spam' => array(
1674 1674
         '#type' => 'rule',
1675 1675
         '#set' => 'event_flag_flagged_abuse_node_1',
1676 1676
         '#label' => 'Offensive content reported - SPAM',
1677 1677
         '#active' => 1,
1678 1678
         '#weight' => '0',
1679 1679
         '#categories' => array(
1680
-          '0' => 'boinc_standard',
1681
-          '1' => 'moderator notification',
1680
+            '0' => 'boinc_standard',
1681
+            '1' => 'moderator notification',
1682 1682
         ),
1683 1683
         '#status' => 'default',
1684 1684
         '#conditions' => array(),
1685 1685
         '#actions' => array(
1686
-          '0' => array(
1686
+            '0' => array(
1687 1687
             '#type' => 'action',
1688 1688
             '#settings' => array(
1689
-              'from' => '',
1690
-              'subject' => 'Report of SPAM [node:type] content at [:global:site-name]',
1691
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1689
+                'from' => '',
1690
+                'subject' => 'Report of SPAM [node:type] content at [:global:site-name]',
1691
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content 
1692 1692
 as being SPAM for the [:global:site-name] site:
1693 1693
 
1694 1694
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1695 1695
 
1696 1696
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1697
-              '#eval input' => array(
1697
+                '#eval input' => array(
1698 1698
                 'token_rules_input_evaluator' => array(
1699
-                  'subject' => array(
1699
+                    'subject' => array(
1700 1700
                     '0' => 'node',
1701 1701
                     '1' => ':global',
1702
-                  ),
1703
-                  'message' => array(
1702
+                    ),
1703
+                    'message' => array(
1704 1704
                     '0' => 'flagging_user',
1705 1705
                     '1' => 'node',
1706 1706
                     '2' => ':global',
1707
-                  ),
1708
-                  'from' => array(
1707
+                    ),
1708
+                    'from' => array(
1709 1709
                     '0' => ':global',
1710
-                  ),
1710
+                    ),
1711 1711
                 ),
1712 1712
                 'rules_input_evaluator_php' => array(
1713
-                  'message' => array(
1713
+                    'message' => array(
1714 1714
                     '0' => 'node',
1715
-                  ),
1715
+                    ),
1716
+                ),
1716 1717
                 ),
1717
-              ),
1718 1718
             ),
1719 1719
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1720 1720
             '#info' => array(
1721
-              'label' => 'Notify moderators via email',
1722
-              'module' => 'BOINC core',
1723
-              'eval input' => array(
1721
+                'label' => 'Notify moderators via email',
1722
+                'module' => 'BOINC core',
1723
+                'eval input' => array(
1724 1724
                 '0' => 'subject',
1725 1725
                 '1' => 'message',
1726 1726
                 '2' => 'from',
1727
-              ),
1727
+                ),
1728 1728
             ),
1729 1729
             '#weight' => 0.0,
1730
-          ),
1730
+            ),
1731 1731
         ),
1732 1732
         '#version' => 6003,
1733
-      ),
1734
-      'rules_offensive_user_reported_link' => array(
1733
+        ),
1734
+        'rules_offensive_user_reported_link' => array(
1735 1735
         '#type' => 'rule',
1736 1736
         '#set' => 'event_flag_flagged_abuse_user_2',
1737 1737
         '#label' => 'Offensive user reported - Link',
1738 1738
         '#active' => 1,
1739 1739
         '#weight' => '0',
1740 1740
         '#categories' => array(
1741
-          '0' => 'boinc_standard',
1742
-          '1' => 'moderator notification',
1741
+            '0' => 'boinc_standard',
1742
+            '1' => 'moderator notification',
1743 1743
         ),
1744 1744
         '#status' => 'default',
1745 1745
         '#conditions' => array(),
1746 1746
         '#actions' => array(
1747
-          '0' => array(
1747
+            '0' => array(
1748 1748
             '#type' => 'action',
1749 1749
             '#settings' => array(
1750
-              'from' => '',
1751
-              'subject' => 'Report of inappropriate link in user profile at [:global:site-name]',
1752
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1750
+                'from' => '',
1751
+                'subject' => 'Report of inappropriate link in user profile at [:global:site-name]',
1752
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1753 1753
 inappropriate link in a user profile:
1754 1754
 
1755 1755
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1756 1756
 
1757 1757
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1758
-              '#eval input' => array(
1758
+                '#eval input' => array(
1759 1759
                 'token_rules_input_evaluator' => array(
1760
-                  'subject' => array(
1760
+                    'subject' => array(
1761 1761
                     '0' => ':global',
1762
-                  ),
1763
-                  'message' => array(
1762
+                    ),
1763
+                    'message' => array(
1764 1764
                     '0' => 'flagging_user',
1765 1765
                     '1' => 'account',
1766 1766
                     '2' => ':global',
1767
-                  ),
1768
-                  'from' => array(
1767
+                    ),
1768
+                    'from' => array(
1769 1769
                     '0' => ':global',
1770
-                  ),
1770
+                    ),
1771 1771
                 ),
1772 1772
                 'rules_input_evaluator_php' => array(
1773
-                  'message' => array(),
1773
+                    'message' => array(),
1774
+                ),
1774 1775
                 ),
1775
-              ),
1776 1776
             ),
1777 1777
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1778 1778
             '#info' => array(
1779
-              'label' => 'Notify moderators via email',
1780
-              'module' => 'BOINC core',
1781
-              'eval input' => array(
1779
+                'label' => 'Notify moderators via email',
1780
+                'module' => 'BOINC core',
1781
+                'eval input' => array(
1782 1782
                 '0' => 'subject',
1783 1783
                 '1' => 'message',
1784 1784
                 '2' => 'from',
1785
-              ),
1785
+                ),
1786 1786
             ),
1787 1787
             '#weight' => 0.0,
1788
-          ),
1788
+            ),
1789 1789
         ),
1790 1790
         '#version' => 6003,
1791
-      ),
1792
-      'rules_offensive_user_reported_not_kid_friendly' => array(
1791
+        ),
1792
+        'rules_offensive_user_reported_not_kid_friendly' => array(
1793 1793
         '#type' => 'rule',
1794 1794
         '#set' => 'event_flag_flagged_abuse_user_3',
1795 1795
         '#label' => 'Offensive user reported - Not Kid Friendly',
1796 1796
         '#active' => 1,
1797 1797
         '#weight' => '0',
1798 1798
         '#categories' => array(
1799
-          '0' => 'boinc_standard',
1800
-          '1' => 'moderator notification',
1799
+            '0' => 'boinc_standard',
1800
+            '1' => 'moderator notification',
1801 1801
         ),
1802 1802
         '#status' => 'default',
1803 1803
         '#conditions' => array(),
1804 1804
         '#actions' => array(
1805
-          '0' => array(
1805
+            '0' => array(
1806 1806
             '#type' => 'action',
1807 1807
             '#settings' => array(
1808
-              'from' => '',
1809
-              'subject' => 'Report of hostile language in user profile at [:global:site-name]',
1810
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1808
+                'from' => '',
1809
+                'subject' => 'Report of hostile language in user profile at [:global:site-name]',
1810
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1811 1811
 hostile language in a user profile:
1812 1812
 
1813 1813
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1814 1814
 
1815 1815
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1816
-              '#eval input' => array(
1816
+                '#eval input' => array(
1817 1817
                 'token_rules_input_evaluator' => array(
1818
-                  'subject' => array(
1818
+                    'subject' => array(
1819 1819
                     '0' => ':global',
1820
-                  ),
1821
-                  'message' => array(
1820
+                    ),
1821
+                    'message' => array(
1822 1822
                     '0' => 'flagging_user',
1823 1823
                     '1' => 'account',
1824 1824
                     '2' => ':global',
1825
-                  ),
1826
-                  'from' => array(
1825
+                    ),
1826
+                    'from' => array(
1827 1827
                     '0' => ':global',
1828
-                  ),
1828
+                    ),
1829 1829
                 ),
1830 1830
                 'rules_input_evaluator_php' => array(
1831
-                  'message' => array(),
1831
+                    'message' => array(),
1832
+                ),
1832 1833
                 ),
1833
-              ),
1834 1834
             ),
1835 1835
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1836 1836
             '#info' => array(
1837
-              'label' => 'Notify moderators via email',
1838
-              'module' => 'BOINC core',
1839
-              'eval input' => array(
1837
+                'label' => 'Notify moderators via email',
1838
+                'module' => 'BOINC core',
1839
+                'eval input' => array(
1840 1840
                 '0' => 'subject',
1841 1841
                 '1' => 'message',
1842 1842
                 '2' => 'from',
1843
-              ),
1843
+                ),
1844 1844
             ),
1845 1845
             '#weight' => 0.0,
1846
-          ),
1846
+            ),
1847 1847
         ),
1848 1848
         '#version' => 6003,
1849
-      ),
1850
-      'rules_offensive_user_reported_other' => array(
1849
+        ),
1850
+        'rules_offensive_user_reported_other' => array(
1851 1851
         '#type' => 'rule',
1852 1852
         '#set' => 'event_flag_flagged_abuse_user_4',
1853 1853
         '#label' => 'Offensive user reported - Other',
1854 1854
         '#active' => 1,
1855 1855
         '#weight' => '0',
1856 1856
         '#categories' => array(
1857
-          '0' => 'boinc_standard',
1858
-          '1' => 'moderator notification',
1857
+            '0' => 'boinc_standard',
1858
+            '1' => 'moderator notification',
1859 1859
         ),
1860 1860
         '#status' => 'default',
1861 1861
         '#conditions' => array(),
1862 1862
         '#actions' => array(
1863
-          '0' => array(
1863
+            '0' => array(
1864 1864
             '#type' => 'action',
1865 1865
             '#settings' => array(
1866
-              'from' => '',
1867
-              'subject' => 'Report of offensive user at [:global:site-name]',
1868
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1866
+                'from' => '',
1867
+                'subject' => 'Report of offensive user at [:global:site-name]',
1868
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1869 1869
 inappropriate behavior:
1870 1870
 
1871 1871
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1872 1872
 
1873 1873
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1874
-              '#eval input' => array(
1874
+                '#eval input' => array(
1875 1875
                 'token_rules_input_evaluator' => array(
1876
-                  'subject' => array(
1876
+                    'subject' => array(
1877 1877
                     '0' => ':global',
1878
-                  ),
1879
-                  'message' => array(
1878
+                    ),
1879
+                    'message' => array(
1880 1880
                     '0' => 'flagging_user',
1881 1881
                     '1' => 'account',
1882 1882
                     '2' => ':global',
1883
-                  ),
1884
-                  'from' => array(
1883
+                    ),
1884
+                    'from' => array(
1885 1885
                     '0' => ':global',
1886
-                  ),
1886
+                    ),
1887 1887
                 ),
1888 1888
                 'rules_input_evaluator_php' => array(
1889
-                  'message' => array(),
1889
+                    'message' => array(),
1890
+                ),
1890 1891
                 ),
1891
-              ),
1892 1892
             ),
1893 1893
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1894 1894
             '#info' => array(
1895
-              'label' => 'Notify moderators via email',
1896
-              'module' => 'BOINC core',
1897
-              'eval input' => array(
1895
+                'label' => 'Notify moderators via email',
1896
+                'module' => 'BOINC core',
1897
+                'eval input' => array(
1898 1898
                 '0' => 'subject',
1899 1899
                 '1' => 'message',
1900 1900
                 '2' => 'from',
1901
-              ),
1901
+                ),
1902 1902
             ),
1903 1903
             '#weight' => 0.0,
1904
-          ),
1904
+            ),
1905 1905
         ),
1906 1906
         '#version' => 6003,
1907
-      ),
1908
-      'rules_offensive_user_reported_spam' => array(
1907
+        ),
1908
+        'rules_offensive_user_reported_spam' => array(
1909 1909
         '#type' => 'rule',
1910 1910
         '#set' => 'event_flag_flagged_abuse_user_1',
1911 1911
         '#label' => 'Offensive user reported - SPAM',
1912 1912
         '#active' => 1,
1913 1913
         '#weight' => '0',
1914 1914
         '#categories' => array(
1915
-          '0' => 'boinc_standard',
1916
-          '1' => 'moderator notification',
1915
+            '0' => 'boinc_standard',
1916
+            '1' => 'moderator notification',
1917 1917
         ),
1918 1918
         '#status' => 'default',
1919 1919
         '#conditions' => array(),
1920 1920
         '#actions' => array(
1921
-          '0' => array(
1921
+            '0' => array(
1922 1922
             '#type' => 'action',
1923 1923
             '#settings' => array(
1924
-              'from' => '',
1925
-              'subject' => 'Report of SPAM user at [:global:site-name]',
1926
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1924
+                'from' => '',
1925
+                'subject' => 'Report of SPAM user at [:global:site-name]',
1926
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for 
1927 1927
 a SPAM user profile:
1928 1928
 
1929 1929
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1930 1930
 
1931 1931
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1932
-              '#eval input' => array(
1932
+                '#eval input' => array(
1933 1933
                 'token_rules_input_evaluator' => array(
1934
-                  'subject' => array(
1934
+                    'subject' => array(
1935 1935
                     '0' => ':global',
1936
-                  ),
1937
-                  'message' => array(
1936
+                    ),
1937
+                    'message' => array(
1938 1938
                     '0' => 'flagging_user',
1939 1939
                     '1' => 'account',
1940 1940
                     '2' => ':global',
1941
-                  ),
1942
-                  'from' => array(
1941
+                    ),
1942
+                    'from' => array(
1943 1943
                     '0' => ':global',
1944
-                  ),
1944
+                    ),
1945 1945
                 ),
1946 1946
                 'rules_input_evaluator_php' => array(
1947
-                  'message' => array(),
1947
+                    'message' => array(),
1948
+                ),
1948 1949
                 ),
1949
-              ),
1950 1950
             ),
1951 1951
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1952 1952
             '#info' => array(
1953
-              'label' => 'Notify moderators via email',
1954
-              'module' => 'BOINC core',
1955
-              'eval input' => array(
1953
+                'label' => 'Notify moderators via email',
1954
+                'module' => 'BOINC core',
1955
+                'eval input' => array(
1956 1956
                 '0' => 'subject',
1957 1957
                 '1' => 'message',
1958 1958
                 '2' => 'from',
1959
-              ),
1959
+                ),
1960 1960
             ),
1961 1961
             '#weight' => 0.0,
1962
-          ),
1962
+            ),
1963 1963
         ),
1964 1964
         '#version' => 6003,
1965
-      ),
1966
-      'rules_comment_converted_to_new_forum_topic_by_moderator_or_admin' => array(
1965
+        ),
1966
+        'rules_comment_converted_to_new_forum_topic_by_moderator_or_admin' => array(
1967 1967
         '#type' => 'rule',
1968 1968
         '#set' => 'event_boinccore_comment_convert',
1969 1969
         '#label' => 'Comment is converted to new forum topic by moderator or admin',
1970 1970
         '#active' => 1,
1971 1971
         '#weight' => '0',
1972 1972
         '#categories' => array(
1973
-          '0' => 'boinc_standard',
1974
-          '1' => 'moderator notification',
1973
+            '0' => 'boinc_standard',
1974
+            '1' => 'moderator notification',
1975 1975
         ),
1976 1976
         '#status' => 'default',
1977 1977
         '#conditions' => array(),
1978 1978
         '#actions' => array(
1979
-          '0' => array(
1979
+            '0' => array(
1980 1980
             '#info' => array(
1981
-              'label' => 'Notify moderators via email',
1982
-              'module' => 'BOINC core',
1983
-              'eval input' => array(
1981
+                'label' => 'Notify moderators via email',
1982
+                'module' => 'BOINC core',
1983
+                'eval input' => array(
1984 1984
                 '0' => 'subject',
1985 1985
                 '1' => 'message',
1986 1986
                 '2' => 'from',
1987
-              ),
1987
+                ),
1988 1988
             ),
1989 1989
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1990 1990
             '#settings' => array(
1991
-              'from' => '',
1992
-              'subject' => 'Comment at [:global:site-name] converted to new forum topic',
1993
-              'message' => "Comment has been converted to new forum topic by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
1994
-              '#eval input' => array(
1991
+                'from' => '',
1992
+                'subject' => 'Comment at [:global:site-name] converted to new forum topic',
1993
+                'message' => "Comment has been converted to new forum topic by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
1994
+                '#eval input' => array(
1995 1995
                 'token_rules_input_evaluator' => array(
1996
-                  'subject' => array(
1996
+                    'subject' => array(
1997 1997
                     '0' => ':global',
1998
-                  ),
1999
-                  'message' => array(
1998
+                    ),
1999
+                    'message' => array(
2000 2000
                     '0' => 'user',
2001 2001
                     '1' => ':global',
2002
-                  ),
2003
-                  'from' => array(
2002
+                    ),
2003
+                    'from' => array(
2004 2004
                     '0' => ':global',
2005
-                  ),
2005
+                    ),
2006 2006
                 ),
2007 2007
                 'rules_input_evaluator_php' => array(
2008
-                  'message' => array(
2008
+                    'message' => array(
2009 2009
                     '0' => 'node',
2010
-                  ),
2010
+                    ),
2011
+                ),
2011 2012
                 ),
2012
-              ),
2013 2013
             ),
2014 2014
             '#type' => 'action',
2015 2015
             '#weight' => 0.0,
2016
-          ),
2016
+            ),
2017 2017
         ),
2018 2018
         '#version' => 6003,
2019
-      ),
2020
-      'rules_comment_deleted_by_admin' => array(
2019
+        ),
2020
+        'rules_comment_deleted_by_admin' => array(
2021 2021
         '#type' => 'rule',
2022 2022
         '#set' => 'event_comment_delete',
2023 2023
         '#label' => 'Comment deleted by admin',
2024 2024
         '#active' => 1,
2025 2025
         '#weight' => '0',
2026 2026
         '#categories' => array(
2027
-          '0' => 'moderator notification',
2028
-          '1' => 'boinc_standard',
2027
+            '0' => 'moderator notification',
2028
+            '1' => 'boinc_standard',
2029 2029
         ),
2030 2030
         '#status' => 'default',
2031 2031
         '#conditions' => array(),
2032 2032
         '#actions' => array(
2033
-          '0' => array(
2033
+            '0' => array(
2034 2034
             '#type' => 'action',
2035 2035
             '#settings' => array(
2036
-              'from' => '',
2037
-              'subject' => 'Comment deleted at [:global:site-name] by admin',
2038
-              'message' => "Comment to [node:type] topic '[node:title]' deleted by admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2039
-              '#eval input' => array(
2036
+                'from' => '',
2037
+                'subject' => 'Comment deleted at [:global:site-name] by admin',
2038
+                'message' => "Comment to [node:type] topic '[node:title]' deleted by admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2039
+                '#eval input' => array(
2040 2040
                 'token_rules_input_evaluator' => array(
2041
-                  'subject' => array(
2041
+                    'subject' => array(
2042 2042
                     '0' => ':global',
2043
-                  ),
2044
-                  'message' => array(
2043
+                    ),
2044
+                    'message' => array(
2045 2045
                     '0' => 'node',
2046 2046
                     '1' => 'user',
2047 2047
                     '2' => ':global',
2048
-                  ),
2049
-                  'from' => array(
2048
+                    ),
2049
+                    'from' => array(
2050 2050
                     '0' => ':global',
2051
-                  ),
2051
+                    ),
2052 2052
                 ),
2053 2053
                 'rules_input_evaluator_php' => array(
2054
-                  'message' => array(
2054
+                    'message' => array(
2055 2055
                     '0' => 'node',
2056
-                  ),
2056
+                    ),
2057
+                ),
2057 2058
                 ),
2058
-              ),
2059 2059
             ),
2060 2060
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2061 2061
             '#info' => array(
2062
-              'label' => 'Notify moderators via email',
2063
-              'module' => 'BOINC core',
2064
-              'eval input' => array(
2062
+                'label' => 'Notify moderators via email',
2063
+                'module' => 'BOINC core',
2064
+                'eval input' => array(
2065 2065
                 '0' => 'subject',
2066 2066
                 '1' => 'message',
2067 2067
                 '2' => 'from',
2068
-              ),
2068
+                ),
2069 2069
             ),
2070 2070
             '#weight' => 0.0,
2071
-          ),
2071
+            ),
2072 2072
         ),
2073 2073
         '#version' => 6003,
2074
-      ),
2075
-      'rules_comment_edited_by_moderator_or_admin' => array(
2074
+        ),
2075
+        'rules_comment_edited_by_moderator_or_admin' => array(
2076 2076
         '#type' => 'rule',
2077 2077
         '#set' => 'event_comment_update',
2078 2078
         '#label' => 'Comment is edited by moderator or admin',
2079 2079
         '#active' => 1,
2080 2080
         '#weight' => '0',
2081 2081
         '#categories' => array(
2082
-          '0' => 'boinc_standard',
2083
-          '1' => 'moderator notification',
2082
+            '0' => 'boinc_standard',
2083
+            '1' => 'moderator notification',
2084 2084
         ),
2085 2085
         '#status' => 'default',
2086 2086
         '#conditions' => array(
2087
-          '0' => array(
2087
+            '0' => array(
2088 2088
             '#negate' => 1,
2089 2089
             '#weight' => 0.0,
2090 2090
             '#info' => array(
2091
-              'label' => 'Compare two users: acting user (who edited the comment) is NOT the comment author',
2092
-              'label callback' => FALSE,
2093
-              'arguments' => array(
2091
+                'label' => 'Compare two users: acting user (who edited the comment) is NOT the comment author',
2092
+                'label callback' => FALSE,
2093
+                'arguments' => array(
2094 2094
                 'user1' => array(
2095
-                  'type' => 'user',
2096
-                  'label' => 'User account 1',
2095
+                    'type' => 'user',
2096
+                    'label' => 'User account 1',
2097 2097
                 ),
2098 2098
                 'user2' => array(
2099
-                  'type' => 'user',
2100
-                  'label' => 'User account 2',
2099
+                    'type' => 'user',
2100
+                    'label' => 'User account 2',
2101
+                ),
2101 2102
                 ),
2102
-              ),
2103
-              'module' => 'User',
2103
+                'module' => 'User',
2104 2104
             ),
2105 2105
             '#name' => 'rules_condition_user_comparison',
2106 2106
             '#settings' => array(
2107
-              '#argument map' => array(
2107
+                '#argument map' => array(
2108 2108
                 'user1' => 'user',
2109 2109
                 'user2' => 'comment_author',
2110
-              ),
2110
+                ),
2111 2111
             ),
2112 2112
             '#type' => 'condition',
2113
-          ),
2113
+            ),
2114 2114
         ),
2115 2115
         '#actions' => array(
2116
-          '0' => array(
2116
+            '0' => array(
2117 2117
             '#type' => 'action',
2118 2118
             '#settings' => array(
2119
-              'from' => '',
2120
-              'subject' => 'Comment edited at [:global:site-name] by moderator or admin',
2121
-              'message' => "Comment has been edited by moderator/admin [user:display-name]\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2122
-              '#eval input' => array(
2119
+                'from' => '',
2120
+                'subject' => 'Comment edited at [:global:site-name] by moderator or admin',
2121
+                'message' => "Comment has been edited by moderator/admin [user:display-name]\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2122
+                '#eval input' => array(
2123 2123
                 'token_rules_input_evaluator' => array(
2124
-                  'subject' => array(
2124
+                    'subject' => array(
2125 2125
                     '0' => ':global',
2126
-                  ),
2127
-                  'message' => array(
2126
+                    ),
2127
+                    'message' => array(
2128 2128
                     '0' => 'comment',
2129 2129
                     '1' => 'user',
2130 2130
                     '2' => ':global',
2131
-                  ),
2132
-                  'from' => array(
2131
+                    ),
2132
+                    'from' => array(
2133 2133
                     '0' => ':global',
2134
-                  ),
2134
+                    ),
2135 2135
                 ),
2136 2136
                 'rules_input_evaluator_php' => array(
2137
-                  'message' => array(),
2137
+                    'message' => array(),
2138
+                ),
2138 2139
                 ),
2139
-              ),
2140 2140
             ),
2141 2141
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2142 2142
             '#info' => array(
2143
-              'label' => 'Notify moderators via email',
2144
-              'module' => 'BOINC core',
2145
-              'eval input' => array(
2143
+                'label' => 'Notify moderators via email',
2144
+                'module' => 'BOINC core',
2145
+                'eval input' => array(
2146 2146
                 '0' => 'subject',
2147 2147
                 '1' => 'message',
2148 2148
                 '2' => 'from',
2149
-              ),
2149
+                ),
2150 2150
             ),
2151 2151
             '#weight' => 0.0,
2152
-          ),
2152
+            ),
2153 2153
         ),
2154 2154
         '#version' => 6003,
2155
-      ),
2156
-      'rules_comment_is_published_unhidden_by_moderator_or_admin' => array(
2155
+        ),
2156
+        'rules_comment_is_published_unhidden_by_moderator_or_admin' => array(
2157 2157
         '#type' => 'rule',
2158 2158
         '#set' => 'event_boinccore_comment_unhidden',
2159 2159
         '#label' => 'Comment is unhidden by moderator or admin',
2160 2160
         '#active' => 1,
2161 2161
         '#weight' => '0',
2162 2162
         '#categories' => array(
2163
-          '0' => 'boinc_standard',
2164
-          '1' => 'moderator notification',
2163
+            '0' => 'boinc_standard',
2164
+            '1' => 'moderator notification',
2165 2165
         ),
2166 2166
         '#status' => 'default',
2167 2167
         '#conditions' => array(
2168
-          '0' => array(
2168
+            '0' => array(
2169 2169
             '#type' => 'condition',
2170 2170
             '#settings' => array(
2171
-              '#argument map' => array(
2171
+                '#argument map' => array(
2172 2172
                 'user1' => 'user',
2173 2173
                 'user2' => 'comment_author',
2174
-              ),
2174
+                ),
2175 2175
             ),
2176 2176
             '#name' => 'rules_condition_user_comparison',
2177 2177
             '#info' => array(
2178
-              'label' => 'Compare two users: acting user (who unhid the comment) is NOT the comment author',
2179
-              'label callback' => FALSE,
2180
-              'arguments' => array(
2178
+                'label' => 'Compare two users: acting user (who unhid the comment) is NOT the comment author',
2179
+                'label callback' => FALSE,
2180
+                'arguments' => array(
2181 2181
                 'user1' => array(
2182
-                  'type' => 'user',
2183
-                  'label' => 'User account 1',
2182
+                    'type' => 'user',
2183
+                    'label' => 'User account 1',
2184 2184
                 ),
2185 2185
                 'user2' => array(
2186
-                  'type' => 'user',
2187
-                  'label' => 'User account 2',
2186
+                    'type' => 'user',
2187
+                    'label' => 'User account 2',
2188 2188
                 ),
2189
-              ),
2190
-              'module' => 'User',
2189
+                ),
2190
+                'module' => 'User',
2191 2191
             ),
2192 2192
             '#negate' => 1,
2193 2193
             '#weight' => 0.0,
2194
-          ),
2194
+            ),
2195 2195
         ),
2196 2196
         '#actions' => array(
2197
-          '0' => array(
2197
+            '0' => array(
2198 2198
             '#info' => array(
2199
-              'label' => 'Notify moderators via email',
2200
-              'module' => 'BOINC core',
2201
-              'eval input' => array(
2199
+                'label' => 'Notify moderators via email',
2200
+                'module' => 'BOINC core',
2201
+                'eval input' => array(
2202 2202
                 '0' => 'subject',
2203 2203
                 '1' => 'message',
2204 2204
                 '2' => 'from',
2205
-              ),
2205
+                ),
2206 2206
             ),
2207 2207
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2208 2208
             '#settings' => array(
2209
-              'from' => '',
2210
-              'subject' => 'Comment at [:global:site-name] unhidden by moderator or admin',
2211
-              'message' => "Comment has been unhidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2212
-              '#eval input' => array(
2209
+                'from' => '',
2210
+                'subject' => 'Comment at [:global:site-name] unhidden by moderator or admin',
2211
+                'message' => "Comment has been unhidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2212
+                '#eval input' => array(
2213 2213
                 'token_rules_input_evaluator' => array(
2214
-                  'subject' => array(
2214
+                    'subject' => array(
2215 2215
                     '0' => ':global',
2216
-                  ),
2217
-                  'message' => array(
2216
+                    ),
2217
+                    'message' => array(
2218 2218
                     '0' => 'comment',
2219 2219
                     '1' => 'user',
2220 2220
                     '2' => ':global',
2221
-                  ),
2222
-                  'from' => array(
2221
+                    ),
2222
+                    'from' => array(
2223 2223
                     '0' => ':global',
2224
-                  ),
2224
+                    ),
2225 2225
                 ),
2226 2226
                 'rules_input_evaluator_php' => array(
2227
-                  'message' => array(),
2227
+                    'message' => array(),
2228
+                ),
2228 2229
                 ),
2229
-              ),
2230 2230
             ),
2231 2231
             '#type' => 'action',
2232 2232
             '#weight' => 0.0,
2233
-          ),
2233
+            ),
2234 2234
         ),
2235 2235
         '#version' => 6003,
2236
-      ),
2237
-      'rules_comment_is_unpublished_hidden_by_moderator_or_admin' => array(
2236
+        ),
2237
+        'rules_comment_is_unpublished_hidden_by_moderator_or_admin' => array(
2238 2238
         '#type' => 'rule',
2239 2239
         '#set' => 'event_comment_unpublish',
2240 2240
         '#label' => 'Comment is hidden by moderator or admin',
2241 2241
         '#active' => 1,
2242 2242
         '#weight' => '0',
2243 2243
         '#categories' => array(
2244
-          '0' => 'boinc_standard',
2245
-          '1' => 'moderator notification',
2244
+            '0' => 'boinc_standard',
2245
+            '1' => 'moderator notification',
2246 2246
         ),
2247 2247
         '#status' => 'default',
2248 2248
         '#conditions' => array(
2249
-          '0' => array(
2249
+            '0' => array(
2250 2250
             '#weight' => 0.0,
2251 2251
             '#negate' => 1,
2252 2252
             '#info' => array(
2253
-              'label' => 'Compare two users: acting user (who hid the comment) is NOT the comment author',
2254
-              'label callback' => FALSE,
2255
-              'arguments' => array(
2253
+                'label' => 'Compare two users: acting user (who hid the comment) is NOT the comment author',
2254
+                'label callback' => FALSE,
2255
+                'arguments' => array(
2256 2256
                 'user1' => array(
2257
-                  'type' => 'user',
2258
-                  'label' => 'User account 1',
2257
+                    'type' => 'user',
2258
+                    'label' => 'User account 1',
2259 2259
                 ),
2260 2260
                 'user2' => array(
2261
-                  'type' => 'user',
2262
-                  'label' => 'User account 2',
2261
+                    'type' => 'user',
2262
+                    'label' => 'User account 2',
2263
+                ),
2263 2264
                 ),
2264
-              ),
2265
-              'module' => 'User',
2265
+                'module' => 'User',
2266 2266
             ),
2267 2267
             '#name' => 'rules_condition_user_comparison',
2268 2268
             '#type' => 'condition',
2269 2269
             '#settings' => array(
2270
-              '#argument map' => array(
2270
+                '#argument map' => array(
2271 2271
                 'user1' => 'user',
2272 2272
                 'user2' => 'comment_author',
2273
-              ),
2273
+                ),
2274
+            ),
2274 2275
             ),
2275
-          ),
2276 2276
         ),
2277 2277
         '#actions' => array(
2278
-          '0' => array(
2278
+            '0' => array(
2279 2279
             '#type' => 'action',
2280 2280
             '#settings' => array(
2281
-              'from' => '',
2282
-              'subject' => 'Comment at [:global:site-name] hidden by moderator or admin',
2283
-              'message' => "Comment has been hidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2284
-              '#eval input' => array(
2281
+                'from' => '',
2282
+                'subject' => 'Comment at [:global:site-name] hidden by moderator or admin',
2283
+                'message' => "Comment has been hidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]",
2284
+                '#eval input' => array(
2285 2285
                 'token_rules_input_evaluator' => array(
2286
-                  'subject' => array(
2286
+                    'subject' => array(
2287 2287
                     '0' => ':global',
2288
-                  ),
2289
-                  'message' => array(
2288
+                    ),
2289
+                    'message' => array(
2290 2290
                     '0' => 'comment',
2291 2291
                     '1' => 'user',
2292 2292
                     '2' => ':global',
2293
-                  ),
2294
-                  'from' => array(
2293
+                    ),
2294
+                    'from' => array(
2295 2295
                     '0' => ':global',
2296
-                  ),
2296
+                    ),
2297 2297
                 ),
2298 2298
                 'rules_input_evaluator_php' => array(
2299
-                  'message' => array(),
2299
+                    'message' => array(),
2300
+                ),
2300 2301
                 ),
2301
-              ),
2302 2302
             ),
2303 2303
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2304 2304
             '#info' => array(
2305
-              'label' => 'Notify moderators via email',
2306
-              'module' => 'BOINC core',
2307
-              'eval input' => array(
2305
+                'label' => 'Notify moderators via email',
2306
+                'module' => 'BOINC core',
2307
+                'eval input' => array(
2308 2308
                 '0' => 'subject',
2309 2309
                 '1' => 'message',
2310 2310
                 '2' => 'from',
2311
-              ),
2311
+                ),
2312 2312
             ),
2313 2313
             '#weight' => 0.0,
2314
-          ),
2314
+            ),
2315 2315
         ),
2316 2316
         '#version' => 6003,
2317
-      ),
2318
-      'rules_forum_topic_is_edited_by_moderator_or_admin' => array(
2317
+        ),
2318
+        'rules_forum_topic_is_edited_by_moderator_or_admin' => array(
2319 2319
         '#type' => 'rule',
2320 2320
         '#set' => 'event_node_update',
2321 2321
         '#label' => 'Forum topic is edited by moderator or admin',
2322 2322
         '#active' => 1,
2323 2323
         '#weight' => '0',
2324 2324
         '#categories' => array(
2325
-          '0' => 'boinc_standard',
2326
-          '1' => 'moderator notification',
2325
+            '0' => 'boinc_standard',
2326
+            '1' => 'moderator notification',
2327 2327
         ),
2328 2328
         '#status' => 'default',
2329 2329
         '#conditions' => array(
2330
-          '0' => array(
2330
+            '0' => array(
2331 2331
             '#weight' => 0.0,
2332 2332
             '#type' => 'condition',
2333 2333
             '#settings' => array(
2334
-              'roles' => array(
2334
+                'roles' => array(
2335 2335
                 '0' => 3519698132,
2336 2336
                 '1' => 1271379760,
2337
-              ),
2338
-              'operation' => 'OR',
2339
-              '#argument map' => array(
2337
+                ),
2338
+                'operation' => 'OR',
2339
+                '#argument map' => array(
2340 2340
                 'user' => 'user',
2341
-              ),
2341
+                ),
2342 2342
             ),
2343 2343
             '#name' => 'rules_condition_user_hasrole',
2344 2344
             '#info' => array(
2345
-              'label' => 'User has role(s): administrator or moderator',
2346
-              'label callback' => FALSE,
2347
-              'arguments' => array(
2345
+                'label' => 'User has role(s): administrator or moderator',
2346
+                'label callback' => FALSE,
2347
+                'arguments' => array(
2348 2348
                 'user' => array(
2349
-                  'type' => 'user',
2350
-                  'label' => 'User',
2349
+                    'type' => 'user',
2350
+                    'label' => 'User',
2351 2351
                 ),
2352
-              ),
2353
-              'module' => 'User',
2352
+                ),
2353
+                'module' => 'User',
2354
+            ),
2354 2355
             ),
2355
-          ),
2356
-          '1' => array(
2356
+            '1' => array(
2357 2357
             '#weight' => 0.0,
2358 2358
             '0' => array(
2359
-              '#weight' => 0.0,
2360
-              '#info' => array(
2359
+                '#weight' => 0.0,
2360
+                '#info' => array(
2361 2361
                 'label' => 'Updated content is Forum topic',
2362 2362
                 'arguments' => array(
2363
-                  'node' => array(
2363
+                    'node' => array(
2364 2364
                     'type' => 'node',
2365 2365
                     'label' => 'Content',
2366
-                  ),
2366
+                    ),
2367 2367
                 ),
2368 2368
                 'module' => 'Node',
2369
-              ),
2370
-              '#name' => 'rules_condition_content_is_type',
2371
-              '#settings' => array(
2369
+                ),
2370
+                '#name' => 'rules_condition_content_is_type',
2371
+                '#settings' => array(
2372 2372
                 'type' => array(
2373
-                  'forum' => 'forum',
2373
+                    'forum' => 'forum',
2374 2374
                 ),
2375 2375
                 '#argument map' => array(
2376
-                  'node' => 'node',
2376
+                    'node' => 'node',
2377
+                ),
2377 2378
                 ),
2378
-              ),
2379
-              '#type' => 'condition',
2379
+                '#type' => 'condition',
2380 2380
             ),
2381 2381
             '#type' => 'OR',
2382 2382
             '1' => array(
2383
-              '#type' => 'condition',
2384
-              '#settings' => array(
2383
+                '#type' => 'condition',
2384
+                '#settings' => array(
2385 2385
                 'type' => array(
2386
-                  'team_forum' => 'team_forum',
2386
+                    'team_forum' => 'team_forum',
2387 2387
                 ),
2388 2388
                 '#argument map' => array(
2389
-                  'node' => 'node',
2389
+                    'node' => 'node',
2390
+                ),
2390 2391
                 ),
2391
-              ),
2392
-              '#name' => 'rules_condition_content_is_type',
2393
-              '#info' => array(
2392
+                '#name' => 'rules_condition_content_is_type',
2393
+                '#info' => array(
2394 2394
                 'label' => 'Updated content is Team forum topic',
2395 2395
                 'arguments' => array(
2396
-                  'node' => array(
2396
+                    'node' => array(
2397 2397
                     'type' => 'node',
2398 2398
                     'label' => 'Content',
2399
-                  ),
2399
+                    ),
2400 2400
                 ),
2401 2401
                 'module' => 'Node',
2402
-              ),
2403
-              '#weight' => 0.0,
2402
+                ),
2403
+                '#weight' => 0.0,
2404
+            ),
2404 2405
             ),
2405
-          ),
2406
-          '2' => array(
2406
+            '2' => array(
2407 2407
             '#weight' => 0.0,
2408 2408
             '#info' => array(
2409
-              'label' => 'PHP code: content changed',
2410
-              'label callback' => FALSE,
2411
-              'module' => 'PHP',
2412
-              'eval input' => array(
2409
+                'label' => 'PHP code: content changed',
2410
+                'label callback' => FALSE,
2411
+                'module' => 'PHP',
2412
+                'eval input' => array(
2413 2413
                 '0' => 'code',
2414
-              ),
2414
+                ),
2415 2415
             ),
2416 2416
             '#name' => 'rules_condition_custom_php',
2417 2417
             '#settings' => array(
2418
-              'code' => 'return ($node->body != $node_unchanged->body);',
2419
-              'vars' => array(
2418
+                'code' => 'return ($node->body != $node_unchanged->body);',
2419
+                'vars' => array(
2420 2420
                 '0' => 'node',
2421 2421
                 '1' => 'node_unchanged',
2422
-              ),
2423
-              '#eval input' => array(
2422
+                ),
2423
+                '#eval input' => array(
2424 2424
                 'token_rules_input_evaluator' => array(
2425
-                  'code' => array(
2425
+                    'code' => array(
2426 2426
                     '0' => ':global',
2427
-                  ),
2427
+                    ),
2428
+                ),
2428 2429
                 ),
2429
-              ),
2430 2430
             ),
2431 2431
             '#type' => 'condition',
2432
-          ),
2432
+            ),
2433 2433
         ),
2434 2434
         '#actions' => array(
2435
-          '0' => array(
2435
+            '0' => array(
2436 2436
             '#type' => 'action',
2437 2437
             '#settings' => array(
2438
-              'from' => '',
2439
-              'subject' => 'Forum topic at [:global:site-name] edited by moderator/admin',
2440
-              'message' => "[node:type] topic '[node:title]' has been edited by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2441
-              '#eval input' => array(
2438
+                'from' => '',
2439
+                'subject' => 'Forum topic at [:global:site-name] edited by moderator/admin',
2440
+                'message' => "[node:type] topic '[node:title]' has been edited by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2441
+                '#eval input' => array(
2442 2442
                 'token_rules_input_evaluator' => array(
2443
-                  'subject' => array(
2443
+                    'subject' => array(
2444 2444
                     '0' => ':global',
2445
-                  ),
2446
-                  'message' => array(
2445
+                    ),
2446
+                    'message' => array(
2447 2447
                     '0' => 'node',
2448 2448
                     '1' => 'user',
2449 2449
                     '2' => ':global',
2450
-                  ),
2451
-                  'from' => array(
2450
+                    ),
2451
+                    'from' => array(
2452 2452
                     '0' => ':global',
2453
-                  ),
2453
+                    ),
2454 2454
                 ),
2455 2455
                 'rules_input_evaluator_php' => array(
2456
-                  'message' => array(
2456
+                    'message' => array(
2457 2457
                     '0' => 'node',
2458
-                  ),
2458
+                    ),
2459
+                ),
2459 2460
                 ),
2460
-              ),
2461 2461
             ),
2462 2462
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2463 2463
             '#info' => array(
2464
-              'label' => 'Notify moderators via email',
2465
-              'module' => 'BOINC core',
2466
-              'eval input' => array(
2464
+                'label' => 'Notify moderators via email',
2465
+                'module' => 'BOINC core',
2466
+                'eval input' => array(
2467 2467
                 '0' => 'subject',
2468 2468
                 '1' => 'message',
2469 2469
                 '2' => 'from',
2470
-              ),
2470
+                ),
2471 2471
             ),
2472 2472
             '#weight' => 0.0,
2473
-          ),
2473
+            ),
2474 2474
         ),
2475 2475
         '#version' => 6003,
2476
-      ),
2477
-      'rules_forum_topic_is_hidden_by_moderator_admin' => array(
2476
+        ),
2477
+        'rules_forum_topic_is_hidden_by_moderator_admin' => array(
2478 2478
         '#type' => 'rule',
2479 2479
         '#set' => 'event_node_update',
2480 2480
         '#label' => 'Forum topic is hidden by moderator/admin',
2481 2481
         '#active' => 1,
2482 2482
         '#weight' => '0',
2483 2483
         '#categories' => array(
2484
-          '0' => 'boinc_standard',
2485
-          '1' => 'moderator notification',
2484
+            '0' => 'boinc_standard',
2485
+            '1' => 'moderator notification',
2486 2486
         ),
2487 2487
         '#status' => 'default',
2488 2488
         '#conditions' => array(
2489
-          '0' => array(
2489
+            '0' => array(
2490 2490
             '#type' => 'condition',
2491 2491
             '#settings' => array(
2492
-              'roles' => array(
2492
+                'roles' => array(
2493 2493
                 '0' => 3519698132,
2494 2494
                 '1' => 1271379760,
2495
-              ),
2496
-              'operation' => 'OR',
2497
-              '#argument map' => array(
2495
+                ),
2496
+                'operation' => 'OR',
2497
+                '#argument map' => array(
2498 2498
                 'user' => 'user',
2499
-              ),
2499
+                ),
2500 2500
             ),
2501 2501
             '#name' => 'rules_condition_user_hasrole',
2502 2502
             '#info' => array(
2503
-              'label' => 'User has role(s): administrator or moderator',
2504
-              'label callback' => FALSE,
2505
-              'arguments' => array(
2503
+                'label' => 'User has role(s): administrator or moderator',
2504
+                'label callback' => FALSE,
2505
+                'arguments' => array(
2506 2506
                 'user' => array(
2507
-                  'type' => 'user',
2508
-                  'label' => 'User',
2507
+                    'type' => 'user',
2508
+                    'label' => 'User',
2509
+                ),
2509 2510
                 ),
2510
-              ),
2511
-              'module' => 'User',
2511
+                'module' => 'User',
2512 2512
             ),
2513 2513
             '#weight' => 0.0,
2514
-          ),
2515
-          '1' => array(
2514
+            ),
2515
+            '1' => array(
2516 2516
             '#weight' => 0.0,
2517 2517
             '0' => array(
2518
-              '#weight' => 0.0,
2519
-              '#type' => 'condition',
2520
-              '#settings' => array(
2518
+                '#weight' => 0.0,
2519
+                '#type' => 'condition',
2520
+                '#settings' => array(
2521 2521
                 'type' => array(
2522
-                  'forum' => 'forum',
2522
+                    'forum' => 'forum',
2523 2523
                 ),
2524 2524
                 '#argument map' => array(
2525
-                  'node' => 'node',
2525
+                    'node' => 'node',
2526
+                ),
2526 2527
                 ),
2527
-              ),
2528
-              '#name' => 'rules_condition_content_is_type',
2529
-              '#info' => array(
2528
+                '#name' => 'rules_condition_content_is_type',
2529
+                '#info' => array(
2530 2530
                 'label' => 'Updated content is Forum topic',
2531 2531
                 'arguments' => array(
2532
-                  'node' => array(
2532
+                    'node' => array(
2533 2533
                     'type' => 'node',
2534 2534
                     'label' => 'Content',
2535
-                  ),
2535
+                    ),
2536 2536
                 ),
2537 2537
                 'module' => 'Node',
2538
-              ),
2538
+                ),
2539 2539
             ),
2540 2540
             '#type' => 'OR',
2541 2541
             '1' => array(
2542
-              '#type' => 'condition',
2543
-              '#settings' => array(
2542
+                '#type' => 'condition',
2543
+                '#settings' => array(
2544 2544
                 'type' => array(
2545
-                  'team_forum' => 'team_forum',
2545
+                    'team_forum' => 'team_forum',
2546 2546
                 ),
2547 2547
                 '#argument map' => array(
2548
-                  'node' => 'node',
2548
+                    'node' => 'node',
2549
+                ),
2549 2550
                 ),
2550
-              ),
2551
-              '#name' => 'rules_condition_content_is_type',
2552
-              '#info' => array(
2551
+                '#name' => 'rules_condition_content_is_type',
2552
+                '#info' => array(
2553 2553
                 'label' => 'Updated content is Team forum topic',
2554 2554
                 'arguments' => array(
2555
-                  'node' => array(
2555
+                    'node' => array(
2556 2556
                     'type' => 'node',
2557 2557
                     'label' => 'Content',
2558
-                  ),
2558
+                    ),
2559 2559
                 ),
2560 2560
                 'module' => 'Node',
2561
-              ),
2562
-              '#weight' => 0.0,
2561
+                ),
2562
+                '#weight' => 0.0,
2563
+            ),
2563 2564
             ),
2564
-          ),
2565
-          '3' => array(
2565
+            '3' => array(
2566 2566
             '#weight' => 0.0,
2567 2567
             '#info' => array(
2568
-              'label' => 'PHP code: node content unchanged',
2569
-              'label callback' => FALSE,
2570
-              'module' => 'PHP',
2571
-              'eval input' => array(
2568
+                'label' => 'PHP code: node content unchanged',
2569
+                'label callback' => FALSE,
2570
+                'module' => 'PHP',
2571
+                'eval input' => array(
2572 2572
                 '0' => 'code',
2573
-              ),
2573
+                ),
2574 2574
             ),
2575 2575
             '#name' => 'rules_condition_custom_php',
2576 2576
             '#settings' => array(
2577
-              'code' => 'return $node->body == $node_unchanged->body;',
2578
-              'vars' => array(
2577
+                'code' => 'return $node->body == $node_unchanged->body;',
2578
+                'vars' => array(
2579 2579
                 '0' => 'node',
2580 2580
                 '1' => 'node_unchanged',
2581
-              ),
2582
-              '#eval input' => array(
2581
+                ),
2582
+                '#eval input' => array(
2583 2583
                 'token_rules_input_evaluator' => array(
2584
-                  'code' => array(
2584
+                    'code' => array(
2585 2585
                     '0' => ':global',
2586
-                  ),
2586
+                    ),
2587
+                ),
2587 2588
                 ),
2588
-              ),
2589 2589
             ),
2590 2590
             '#type' => 'condition',
2591
-          ),
2592
-          '4' => array(
2591
+            ),
2592
+            '4' => array(
2593 2593
             '#weight' => 0.0,
2594 2594
             '#info' => array(
2595
-              'label' => 'PHP code: node status changed to hidden',
2596
-              'label callback' => FALSE,
2597
-              'module' => 'PHP',
2598
-              'eval input' => array(
2595
+                'label' => 'PHP code: node status changed to hidden',
2596
+                'label callback' => FALSE,
2597
+                'module' => 'PHP',
2598
+                'eval input' => array(
2599 2599
                 '0' => 'code',
2600
-              ),
2600
+                ),
2601 2601
             ),
2602 2602
             '#name' => 'rules_condition_custom_php',
2603 2603
             '#type' => 'condition',
2604 2604
             '#settings' => array(
2605
-              'code' => 'return $node_unchanged->status == 1 && $node->status == 0;',
2606
-              'vars' => array(
2605
+                'code' => 'return $node_unchanged->status == 1 && $node->status == 0;',
2606
+                'vars' => array(
2607 2607
                 '0' => 'node',
2608 2608
                 '1' => 'node_unchanged',
2609
-              ),
2610
-              '#eval input' => array(
2609
+                ),
2610
+                '#eval input' => array(
2611 2611
                 'token_rules_input_evaluator' => array(
2612
-                  'code' => array(
2612
+                    'code' => array(
2613 2613
                     '0' => ':global',
2614
-                  ),
2614
+                    ),
2615
+                ),
2615 2616
                 ),
2616
-              ),
2617 2617
             ),
2618
-          ),
2618
+            ),
2619 2619
         ),
2620 2620
         '#actions' => array(
2621
-          '0' => array(
2621
+            '0' => array(
2622 2622
             '#info' => array(
2623
-              'label' => 'Notify moderators via email',
2624
-              'module' => 'BOINC core',
2625
-              'eval input' => array(
2623
+                'label' => 'Notify moderators via email',
2624
+                'module' => 'BOINC core',
2625
+                'eval input' => array(
2626 2626
                 '0' => 'subject',
2627 2627
                 '1' => 'message',
2628 2628
                 '2' => 'from',
2629
-              ),
2629
+                ),
2630 2630
             ),
2631 2631
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2632 2632
             '#settings' => array(
2633
-              'from' => '',
2634
-              'subject' => 'Forum topic at [:global:site-name] hidden by moderator/admin',
2635
-              'message' => "[node:type] topic '[node:title]' has been hidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2636
-              '#eval input' => array(
2633
+                'from' => '',
2634
+                'subject' => 'Forum topic at [:global:site-name] hidden by moderator/admin',
2635
+                'message' => "[node:type] topic '[node:title]' has been hidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2636
+                '#eval input' => array(
2637 2637
                 'token_rules_input_evaluator' => array(
2638
-                  'subject' => array(
2638
+                    'subject' => array(
2639 2639
                     '0' => ':global',
2640
-                  ),
2641
-                  'message' => array(
2640
+                    ),
2641
+                    'message' => array(
2642 2642
                     '0' => 'node',
2643 2643
                     '1' => 'user',
2644 2644
                     '2' => ':global',
2645
-                  ),
2646
-                  'from' => array(
2645
+                    ),
2646
+                    'from' => array(
2647 2647
                     '0' => ':global',
2648
-                  ),
2648
+                    ),
2649 2649
                 ),
2650 2650
                 'rules_input_evaluator_php' => array(
2651
-                  'message' => array(
2651
+                    'message' => array(
2652 2652
                     '0' => 'node',
2653
-                  ),
2653
+                    ),
2654
+                ),
2654 2655
                 ),
2655
-              ),
2656 2656
             ),
2657 2657
             '#type' => 'action',
2658 2658
             '#weight' => 0.0,
2659
-          ),
2659
+            ),
2660 2660
         ),
2661 2661
         '#version' => 6003,
2662
-      ),
2663
-      'rules_forum_topic_is_moved_to_a_different_forum_by_moderator_or_admin' => array(
2662
+        ),
2663
+        'rules_forum_topic_is_moved_to_a_different_forum_by_moderator_or_admin' => array(
2664 2664
         '#type' => 'rule',
2665 2665
         '#set' => 'event_node_update',
2666 2666
         '#label' => 'Forum topic is moved to a different forum by moderator or admin',
2667 2667
         '#active' => 1,
2668 2668
         '#weight' => '0',
2669 2669
         '#categories' => array(
2670
-          '0' => 'boinc_standard',
2671
-          '1' => 'moderator notification',
2670
+            '0' => 'boinc_standard',
2671
+            '1' => 'moderator notification',
2672 2672
         ),
2673 2673
         '#status' => 'default',
2674 2674
         '#conditions' => array(
2675
-          '0' => array(
2675
+            '0' => array(
2676 2676
             '#weight' => 0.0,
2677 2677
             '#type' => 'condition',
2678 2678
             '#settings' => array(
2679
-              'roles' => array(
2679
+                'roles' => array(
2680 2680
                 '0' => 3519698132,
2681 2681
                 '1' => 1271379760,
2682
-              ),
2683
-              'operation' => 'OR',
2684
-              '#argument map' => array(
2682
+                ),
2683
+                'operation' => 'OR',
2684
+                '#argument map' => array(
2685 2685
                 'user' => 'user',
2686
-              ),
2686
+                ),
2687 2687
             ),
2688 2688
             '#name' => 'rules_condition_user_hasrole',
2689 2689
             '#info' => array(
2690
-              'label' => 'User has role(s): administrator or moderator',
2691
-              'label callback' => FALSE,
2692
-              'arguments' => array(
2690
+                'label' => 'User has role(s): administrator or moderator',
2691
+                'label callback' => FALSE,
2692
+                'arguments' => array(
2693 2693
                 'user' => array(
2694
-                  'type' => 'user',
2695
-                  'label' => 'User',
2694
+                    'type' => 'user',
2695
+                    'label' => 'User',
2696 2696
                 ),
2697
-              ),
2698
-              'module' => 'User',
2697
+                ),
2698
+                'module' => 'User',
2699
+            ),
2699 2700
             ),
2700
-          ),
2701
-          '1' => array(
2701
+            '1' => array(
2702 2702
             '#weight' => 0.0,
2703 2703
             '0' => array(
2704
-              '#weight' => 0.0,
2705
-              '#info' => array(
2704
+                '#weight' => 0.0,
2705
+                '#info' => array(
2706 2706
                 'label' => 'Updated content is Forum topic',
2707 2707
                 'arguments' => array(
2708
-                  'node' => array(
2708
+                    'node' => array(
2709 2709
                     'type' => 'node',
2710 2710
                     'label' => 'Content',
2711
-                  ),
2711
+                    ),
2712 2712
                 ),
2713 2713
                 'module' => 'Node',
2714
-              ),
2715
-              '#name' => 'rules_condition_content_is_type',
2716
-              '#settings' => array(
2714
+                ),
2715
+                '#name' => 'rules_condition_content_is_type',
2716
+                '#settings' => array(
2717 2717
                 'type' => array(
2718
-                  'forum' => 'forum',
2718
+                    'forum' => 'forum',
2719 2719
                 ),
2720 2720
                 '#argument map' => array(
2721
-                  'node' => 'node',
2721
+                    'node' => 'node',
2722
+                ),
2722 2723
                 ),
2723
-              ),
2724
-              '#type' => 'condition',
2724
+                '#type' => 'condition',
2725 2725
             ),
2726 2726
             '#type' => 'OR',
2727 2727
             '1' => array(
2728
-              '#type' => 'condition',
2729
-              '#settings' => array(
2728
+                '#type' => 'condition',
2729
+                '#settings' => array(
2730 2730
                 'type' => array(
2731
-                  'team_forum' => 'team_forum',
2731
+                    'team_forum' => 'team_forum',
2732 2732
                 ),
2733 2733
                 '#argument map' => array(
2734
-                  'node' => 'node',
2734
+                    'node' => 'node',
2735 2735
                 ),
2736
-              ),
2737
-              '#name' => 'rules_condition_content_is_type',
2738
-              '#info' => array(
2736
+                ),
2737
+                '#name' => 'rules_condition_content_is_type',
2738
+                '#info' => array(
2739 2739
                 'label' => 'Updated content is Team forum topic',
2740 2740
                 'arguments' => array(
2741
-                  'node' => array(
2741
+                    'node' => array(
2742 2742
                     'type' => 'node',
2743 2743
                     'label' => 'Content',
2744
-                  ),
2744
+                    ),
2745 2745
                 ),
2746 2746
                 'module' => 'Node',
2747
-              ),
2748
-              '#weight' => 0.0,
2747
+                ),
2748
+                '#weight' => 0.0,
2749 2749
             ),
2750
-          ),
2751
-          '2' => array(
2750
+            ),
2751
+            '2' => array(
2752 2752
             '#weight' => 0.0,
2753 2753
             '#info' => array(
2754
-              'label' => 'PHP code: node moved to new forum parent',
2755
-              'label callback' => FALSE,
2756
-              'module' => 'PHP',
2757
-              'eval input' => array(
2754
+                'label' => 'PHP code: node moved to new forum parent',
2755
+                'label callback' => FALSE,
2756
+                'module' => 'PHP',
2757
+                'eval input' => array(
2758 2758
                 '0' => 'code',
2759
-              ),
2759
+                ),
2760 2760
             ),
2761 2761
             '#name' => 'rules_condition_custom_php',
2762 2762
             '#settings' => array(
2763
-              'code' => 'return ($node->tid != $node_unchanged->tid);',
2764
-              'vars' => array(
2763
+                'code' => 'return ($node->tid != $node_unchanged->tid);',
2764
+                'vars' => array(
2765 2765
                 '0' => 'node',
2766 2766
                 '1' => 'node_unchanged',
2767
-              ),
2768
-              '#eval input' => array(
2767
+                ),
2768
+                '#eval input' => array(
2769 2769
                 'token_rules_input_evaluator' => array(
2770
-                  'code' => array(
2770
+                    'code' => array(
2771 2771
                     '0' => ':global',
2772
-                  ),
2772
+                    ),
2773
+                ),
2773 2774
                 ),
2774
-              ),
2775 2775
             ),
2776 2776
             '#type' => 'condition',
2777
-          ),
2777
+            ),
2778 2778
         ),
2779 2779
         '#actions' => array(
2780
-          '0' => array(
2780
+            '0' => array(
2781 2781
             '#type' => 'action',
2782 2782
             '#settings' => array(
2783
-              'from' => '',
2784
-              'subject' => 'Forum topic at [:global:site-name] moved by moderator/admin',
2785
-              'message' => "[node:type] topic '[node:title]' has been moved by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2786
-              '#eval input' => array(
2783
+                'from' => '',
2784
+                'subject' => 'Forum topic at [:global:site-name] moved by moderator/admin',
2785
+                'message' => "[node:type] topic '[node:title]' has been moved by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2786
+                '#eval input' => array(
2787 2787
                 'token_rules_input_evaluator' => array(
2788
-                  'subject' => array(
2788
+                    'subject' => array(
2789 2789
                     '0' => ':global',
2790
-                  ),
2791
-                  'message' => array(
2790
+                    ),
2791
+                    'message' => array(
2792 2792
                     '0' => 'node',
2793 2793
                     '1' => 'user',
2794 2794
                     '2' => ':global',
2795
-                  ),
2796
-                  'from' => array(
2795
+                    ),
2796
+                    'from' => array(
2797 2797
                     '0' => ':global',
2798
-                  ),
2798
+                    ),
2799 2799
                 ),
2800 2800
                 'rules_input_evaluator_php' => array(
2801
-                  'message' => array(
2801
+                    'message' => array(
2802 2802
                     '0' => 'node',
2803
-                  ),
2803
+                    ),
2804
+                ),
2804 2805
                 ),
2805
-              ),
2806 2806
             ),
2807 2807
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2808 2808
             '#info' => array(
2809
-              'label' => 'Notify moderators via email',
2810
-              'module' => 'BOINC core',
2811
-              'eval input' => array(
2809
+                'label' => 'Notify moderators via email',
2810
+                'module' => 'BOINC core',
2811
+                'eval input' => array(
2812 2812
                 '0' => 'subject',
2813 2813
                 '1' => 'message',
2814 2814
                 '2' => 'from',
2815
-              ),
2815
+                ),
2816 2816
             ),
2817 2817
             '#weight' => 0.0,
2818
-          ),
2818
+            ),
2819 2819
         ),
2820 2820
         '#version' => 6003,
2821
-      ),
2822
-      'rules_forum_topic_is_unhidden_by_moderator_admin' => array(
2821
+        ),
2822
+        'rules_forum_topic_is_unhidden_by_moderator_admin' => array(
2823 2823
         '#type' => 'rule',
2824 2824
         '#set' => 'event_node_update',
2825 2825
         '#label' => 'Forum topic is unhidden by moderator/admin',
2826 2826
         '#active' => 1,
2827 2827
         '#weight' => '0',
2828 2828
         '#categories' => array(
2829
-          '0' => 'boinc_standard',
2830
-          '1' => 'moderator notification',
2829
+            '0' => 'boinc_standard',
2830
+            '1' => 'moderator notification',
2831 2831
         ),
2832 2832
         '#status' => 'default',
2833 2833
         '#conditions' => array(
2834
-          '0' => array(
2834
+            '0' => array(
2835 2835
             '#type' => 'condition',
2836 2836
             '#settings' => array(
2837
-              'roles' => array(
2837
+                'roles' => array(
2838 2838
                 '0' => 3519698132,
2839 2839
                 '1' => 1271379760,
2840
-              ),
2841
-              'operation' => 'OR',
2842
-              '#argument map' => array(
2840
+                ),
2841
+                'operation' => 'OR',
2842
+                '#argument map' => array(
2843 2843
                 'user' => 'user',
2844
-              ),
2844
+                ),
2845 2845
             ),
2846 2846
             '#name' => 'rules_condition_user_hasrole',
2847 2847
             '#info' => array(
2848
-              'label' => 'User has role(s): administrator or moderator',
2849
-              'label callback' => FALSE,
2850
-              'arguments' => array(
2848
+                'label' => 'User has role(s): administrator or moderator',
2849
+                'label callback' => FALSE,
2850
+                'arguments' => array(
2851 2851
                 'user' => array(
2852
-                  'type' => 'user',
2853
-                  'label' => 'User',
2852
+                    'type' => 'user',
2853
+                    'label' => 'User',
2854 2854
                 ),
2855
-              ),
2856
-              'module' => 'User',
2855
+                ),
2856
+                'module' => 'User',
2857 2857
             ),
2858 2858
             '#weight' => 0.0,
2859
-          ),
2860
-          '1' => array(
2859
+            ),
2860
+            '1' => array(
2861 2861
             '#type' => 'OR',
2862 2862
             '0' => array(
2863
-              '#info' => array(
2863
+                '#info' => array(
2864 2864
                 'label' => 'Updated content is Forum topic',
2865 2865
                 'arguments' => array(
2866
-                  'node' => array(
2866
+                    'node' => array(
2867 2867
                     'type' => 'node',
2868 2868
                     'label' => 'Content',
2869
-                  ),
2869
+                    ),
2870 2870
                 ),
2871 2871
                 'module' => 'Node',
2872
-              ),
2873
-              '#name' => 'rules_condition_content_is_type',
2874
-              '#settings' => array(
2872
+                ),
2873
+                '#name' => 'rules_condition_content_is_type',
2874
+                '#settings' => array(
2875 2875
                 'type' => array(
2876
-                  'forum' => 'forum',
2876
+                    'forum' => 'forum',
2877 2877
                 ),
2878 2878
                 '#argument map' => array(
2879
-                  'node' => 'node',
2879
+                    'node' => 'node',
2880
+                ),
2880 2881
                 ),
2881
-              ),
2882
-              '#type' => 'condition',
2883
-              '#weight' => 0.0,
2882
+                '#type' => 'condition',
2883
+                '#weight' => 0.0,
2884 2884
             ),
2885 2885
             '#weight' => 0.0,
2886 2886
             '1' => array(
2887
-              '#weight' => 0.0,
2888
-              '#info' => array(
2887
+                '#weight' => 0.0,
2888
+                '#info' => array(
2889 2889
                 'label' => 'Updated content is Team forum topic',
2890 2890
                 'arguments' => array(
2891
-                  'node' => array(
2891
+                    'node' => array(
2892 2892
                     'type' => 'node',
2893 2893
                     'label' => 'Content',
2894
-                  ),
2894
+                    ),
2895 2895
                 ),
2896 2896
                 'module' => 'Node',
2897
-              ),
2898
-              '#name' => 'rules_condition_content_is_type',
2899
-              '#settings' => array(
2897
+                ),
2898
+                '#name' => 'rules_condition_content_is_type',
2899
+                '#settings' => array(
2900 2900
                 'type' => array(
2901
-                  'team_forum' => 'team_forum',
2901
+                    'team_forum' => 'team_forum',
2902 2902
                 ),
2903 2903
                 '#argument map' => array(
2904
-                  'node' => 'node',
2904
+                    'node' => 'node',
2905
+                ),
2905 2906
                 ),
2906
-              ),
2907
-              '#type' => 'condition',
2907
+                '#type' => 'condition',
2908 2908
             ),
2909
-          ),
2910
-          '3' => array(
2909
+            ),
2910
+            '3' => array(
2911 2911
             '#type' => 'condition',
2912 2912
             '#settings' => array(
2913
-              'code' => 'return $node->body == $node_unchanged->body;',
2914
-              'vars' => array(
2913
+                'code' => 'return $node->body == $node_unchanged->body;',
2914
+                'vars' => array(
2915 2915
                 '0' => 'node',
2916 2916
                 '1' => 'node_unchanged',
2917
-              ),
2918
-              '#eval input' => array(
2917
+                ),
2918
+                '#eval input' => array(
2919 2919
                 'token_rules_input_evaluator' => array(
2920
-                  'code' => array(
2920
+                    'code' => array(
2921 2921
                     '0' => ':global',
2922
-                  ),
2922
+                    ),
2923
+                ),
2923 2924
                 ),
2924
-              ),
2925 2925
             ),
2926 2926
             '#name' => 'rules_condition_custom_php',
2927 2927
             '#info' => array(
2928
-              'label' => 'PHP code: node content is unchanged',
2929
-              'label callback' => FALSE,
2930
-              'module' => 'PHP',
2931
-              'eval input' => array(
2928
+                'label' => 'PHP code: node content is unchanged',
2929
+                'label callback' => FALSE,
2930
+                'module' => 'PHP',
2931
+                'eval input' => array(
2932 2932
                 '0' => 'code',
2933
-              ),
2933
+                ),
2934 2934
             ),
2935 2935
             '#weight' => 0.0,
2936
-          ),
2937
-          '4' => array(
2936
+            ),
2937
+            '4' => array(
2938 2938
             '#type' => 'condition',
2939 2939
             '#settings' => array(
2940
-              'code' => 'return $node_unchanged->status == 0 && $node->status == 1;',
2941
-              'vars' => array(
2940
+                'code' => 'return $node_unchanged->status == 0 && $node->status == 1;',
2941
+                'vars' => array(
2942 2942
                 '0' => 'node',
2943 2943
                 '1' => 'node_unchanged',
2944
-              ),
2945
-              '#eval input' => array(
2944
+                ),
2945
+                '#eval input' => array(
2946 2946
                 'token_rules_input_evaluator' => array(
2947
-                  'code' => array(
2947
+                    'code' => array(
2948 2948
                     '0' => ':global',
2949
-                  ),
2949
+                    ),
2950
+                ),
2950 2951
                 ),
2951
-              ),
2952 2952
             ),
2953 2953
             '#name' => 'rules_condition_custom_php',
2954 2954
             '#info' => array(
2955
-              'label' => 'PHP code: node status changed to unhidden',
2956
-              'label callback' => FALSE,
2957
-              'module' => 'PHP',
2958
-              'eval input' => array(
2955
+                'label' => 'PHP code: node status changed to unhidden',
2956
+                'label callback' => FALSE,
2957
+                'module' => 'PHP',
2958
+                'eval input' => array(
2959 2959
                 '0' => 'code',
2960
-              ),
2960
+                ),
2961 2961
             ),
2962 2962
             '#weight' => 0.0,
2963
-          ),
2963
+            ),
2964 2964
         ),
2965 2965
         '#actions' => array(
2966
-          '0' => array(
2966
+            '0' => array(
2967 2967
             '#info' => array(
2968
-              'label' => 'Notify moderators via email',
2969
-              'module' => 'BOINC core',
2970
-              'eval input' => array(
2968
+                'label' => 'Notify moderators via email',
2969
+                'module' => 'BOINC core',
2970
+                'eval input' => array(
2971 2971
                 '0' => 'subject',
2972 2972
                 '1' => 'message',
2973 2973
                 '2' => 'from',
2974
-              ),
2974
+                ),
2975 2975
             ),
2976 2976
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2977 2977
             '#settings' => array(
2978
-              'from' => '',
2979
-              'subject' => 'Forum topic at [:global:site-name] unhidden by moderator/admin',
2980
-              'message' => "[node:type] topic '[node:title]' has been unhidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2981
-              '#eval input' => array(
2978
+                'from' => '',
2979
+                'subject' => 'Forum topic at [:global:site-name] unhidden by moderator/admin',
2980
+                'message' => "[node:type] topic '[node:title]' has been unhidden by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
2981
+                '#eval input' => array(
2982 2982
                 'token_rules_input_evaluator' => array(
2983
-                  'subject' => array(
2983
+                    'subject' => array(
2984 2984
                     '0' => ':global',
2985
-                  ),
2986
-                  'message' => array(
2985
+                    ),
2986
+                    'message' => array(
2987 2987
                     '0' => 'node',
2988 2988
                     '1' => 'user',
2989 2989
                     '2' => ':global',
2990
-                  ),
2991
-                  'from' => array(
2990
+                    ),
2991
+                    'from' => array(
2992 2992
                     '0' => ':global',
2993
-                  ),
2993
+                    ),
2994 2994
                 ),
2995 2995
                 'rules_input_evaluator_php' => array(
2996
-                  'message' => array(
2996
+                    'message' => array(
2997 2997
                     '0' => 'node',
2998
-                  ),
2998
+                    ),
2999
+                ),
2999 3000
                 ),
3000
-              ),
3001 3001
             ),
3002 3002
             '#type' => 'action',
3003 3003
             '#weight' => 0.0,
3004
-          ),
3004
+            ),
3005 3005
         ),
3006 3006
         '#version' => 6003,
3007
-      ),
3008
-      'rules_forum_topic_locked_by_moderator_admin' => array(
3007
+        ),
3008
+        'rules_forum_topic_locked_by_moderator_admin' => array(
3009 3009
         '#type' => 'rule',
3010 3010
         '#set' => 'event_node_update',
3011 3011
         '#label' => 'Forum topic locked by moderator/admin',
3012 3012
         '#active' => 1,
3013 3013
         '#weight' => '0',
3014 3014
         '#categories' => array(
3015
-          '0' => 'boinc_standard',
3016
-          '1' => 'moderator notification',
3015
+            '0' => 'boinc_standard',
3016
+            '1' => 'moderator notification',
3017 3017
         ),
3018 3018
         '#status' => 'default',
3019 3019
         '#conditions' => array(
3020
-          '0' => array(
3020
+            '0' => array(
3021 3021
             '#type' => 'condition',
3022 3022
             '#settings' => array(
3023
-              'roles' => array(
3023
+                'roles' => array(
3024 3024
                 '0' => 3519698132,
3025 3025
                 '1' => 1271379760,
3026
-              ),
3027
-              'operation' => 'OR',
3028
-              '#argument map' => array(
3026
+                ),
3027
+                'operation' => 'OR',
3028
+                '#argument map' => array(
3029 3029
                 'user' => 'user',
3030
-              ),
3030
+                ),
3031 3031
             ),
3032 3032
             '#name' => 'rules_condition_user_hasrole',
3033 3033
             '#info' => array(
3034
-              'label' => 'User has role(s): administrator or moderator',
3035
-              'label callback' => FALSE,
3036
-              'arguments' => array(
3034
+                'label' => 'User has role(s): administrator or moderator',
3035
+                'label callback' => FALSE,
3036
+                'arguments' => array(
3037 3037
                 'user' => array(
3038
-                  'type' => 'user',
3039
-                  'label' => 'User',
3038
+                    'type' => 'user',
3039
+                    'label' => 'User',
3040
+                ),
3040 3041
                 ),
3041
-              ),
3042
-              'module' => 'User',
3042
+                'module' => 'User',
3043 3043
             ),
3044 3044
             '#weight' => 0.0,
3045
-          ),
3046
-          '1' => array(
3045
+            ),
3046
+            '1' => array(
3047 3047
             '#weight' => 0.0,
3048 3048
             '0' => array(
3049
-              '#weight' => 0.0,
3050
-              '#type' => 'condition',
3051
-              '#settings' => array(
3049
+                '#weight' => 0.0,
3050
+                '#type' => 'condition',
3051
+                '#settings' => array(
3052 3052
                 'type' => array(
3053
-                  'forum' => 'forum',
3053
+                    'forum' => 'forum',
3054 3054
                 ),
3055 3055
                 '#argument map' => array(
3056
-                  'node' => 'node',
3056
+                    'node' => 'node',
3057
+                ),
3057 3058
                 ),
3058
-              ),
3059
-              '#name' => 'rules_condition_content_is_type',
3060
-              '#info' => array(
3059
+                '#name' => 'rules_condition_content_is_type',
3060
+                '#info' => array(
3061 3061
                 'label' => 'Updated content is Forum topic',
3062 3062
                 'arguments' => array(
3063
-                  'node' => array(
3063
+                    'node' => array(
3064 3064
                     'type' => 'node',
3065 3065
                     'label' => 'Content',
3066
-                  ),
3066
+                    ),
3067 3067
                 ),
3068 3068
                 'module' => 'Node',
3069
-              ),
3069
+                ),
3070 3070
             ),
3071 3071
             '#type' => 'OR',
3072 3072
             '1' => array(
3073
-              '#type' => 'condition',
3074
-              '#settings' => array(
3073
+                '#type' => 'condition',
3074
+                '#settings' => array(
3075 3075
                 'type' => array(
3076
-                  'team_forum' => 'team_forum',
3076
+                    'team_forum' => 'team_forum',
3077 3077
                 ),
3078 3078
                 '#argument map' => array(
3079
-                  'node' => 'node',
3079
+                    'node' => 'node',
3080
+                ),
3080 3081
                 ),
3081
-              ),
3082
-              '#name' => 'rules_condition_content_is_type',
3083
-              '#info' => array(
3082
+                '#name' => 'rules_condition_content_is_type',
3083
+                '#info' => array(
3084 3084
                 'label' => 'Updated content is Team forum topic',
3085 3085
                 'arguments' => array(
3086
-                  'node' => array(
3086
+                    'node' => array(
3087 3087
                     'type' => 'node',
3088 3088
                     'label' => 'Content',
3089
-                  ),
3089
+                    ),
3090 3090
                 ),
3091 3091
                 'module' => 'Node',
3092
-              ),
3093
-              '#weight' => 0.0,
3092
+                ),
3093
+                '#weight' => 0.0,
3094
+            ),
3094 3095
             ),
3095
-          ),
3096
-          '3' => array(
3096
+            '3' => array(
3097 3097
             '#weight' => 0.0,
3098 3098
             '#info' => array(
3099
-              'label' => 'PHP code: node content unchanged',
3100
-              'label callback' => FALSE,
3101
-              'module' => 'PHP',
3102
-              'eval input' => array(
3099
+                'label' => 'PHP code: node content unchanged',
3100
+                'label callback' => FALSE,
3101
+                'module' => 'PHP',
3102
+                'eval input' => array(
3103 3103
                 '0' => 'code',
3104
-              ),
3104
+                ),
3105 3105
             ),
3106 3106
             '#name' => 'rules_condition_custom_php',
3107 3107
             '#settings' => array(
3108
-              'code' => 'return $node->body == $node_unchanged->body;',
3109
-              'vars' => array(
3108
+                'code' => 'return $node->body == $node_unchanged->body;',
3109
+                'vars' => array(
3110 3110
                 '0' => 'node',
3111 3111
                 '1' => 'node_unchanged',
3112
-              ),
3113
-              '#eval input' => array(
3112
+                ),
3113
+                '#eval input' => array(
3114 3114
                 'token_rules_input_evaluator' => array(
3115
-                  'code' => array(
3115
+                    'code' => array(
3116 3116
                     '0' => ':global',
3117
-                  ),
3117
+                    ),
3118
+                ),
3118 3119
                 ),
3119
-              ),
3120 3120
             ),
3121 3121
             '#type' => 'condition',
3122
-          ),
3123
-          '4' => array(
3122
+            ),
3123
+            '4' => array(
3124 3124
             '#weight' => 0.0,
3125 3125
             '#info' => array(
3126
-              'label' => 'PHP code: node locked',
3127
-              'label callback' => FALSE,
3128
-              'module' => 'PHP',
3129
-              'eval input' => array(
3126
+                'label' => 'PHP code: node locked',
3127
+                'label callback' => FALSE,
3128
+                'module' => 'PHP',
3129
+                'eval input' => array(
3130 3130
                 '0' => 'code',
3131
-              ),
3131
+                ),
3132 3132
             ),
3133 3133
             '#name' => 'rules_condition_custom_php',
3134 3134
             '#type' => 'condition',
3135 3135
             '#settings' => array(
3136
-              'code' => 'return $node_unchanged->comment == 2 && $node->comment == 1;',
3137
-              'vars' => array(
3136
+                'code' => 'return $node_unchanged->comment == 2 && $node->comment == 1;',
3137
+                'vars' => array(
3138 3138
                 '0' => 'node',
3139 3139
                 '1' => 'node_unchanged',
3140
-              ),
3141
-              '#eval input' => array(
3140
+                ),
3141
+                '#eval input' => array(
3142 3142
                 'token_rules_input_evaluator' => array(
3143
-                  'code' => array(
3143
+                    'code' => array(
3144 3144
                     '0' => ':global',
3145
-                  ),
3145
+                    ),
3146 3146
                 ),
3147
-              ),
3147
+                ),
3148
+            ),
3148 3149
             ),
3149
-          ),
3150 3150
         ),
3151 3151
         '#actions' => array(
3152
-          '0' => array(
3152
+            '0' => array(
3153 3153
             '#info' => array(
3154
-              'label' => 'Notify moderators via email',
3155
-              'module' => 'BOINC core',
3156
-              'eval input' => array(
3154
+                'label' => 'Notify moderators via email',
3155
+                'module' => 'BOINC core',
3156
+                'eval input' => array(
3157 3157
                 '0' => 'subject',
3158 3158
                 '1' => 'message',
3159 3159
                 '2' => 'from',
3160
-              ),
3160
+                ),
3161 3161
             ),
3162 3162
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3163 3163
             '#settings' => array(
3164
-              'from' => '',
3165
-              'subject' => 'Forum topic at [:global:site-name] locked by moderator/admin',
3166
-              'message' => "[node:type] topic '[node:title]' has been locked by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3167
-              '#eval input' => array(
3164
+                'from' => '',
3165
+                'subject' => 'Forum topic at [:global:site-name] locked by moderator/admin',
3166
+                'message' => "[node:type] topic '[node:title]' has been locked by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3167
+                '#eval input' => array(
3168 3168
                 'token_rules_input_evaluator' => array(
3169
-                  'subject' => array(
3169
+                    'subject' => array(
3170 3170
                     '0' => ':global',
3171
-                  ),
3172
-                  'message' => array(
3171
+                    ),
3172
+                    'message' => array(
3173 3173
                     '0' => 'node',
3174 3174
                     '1' => 'user',
3175 3175
                     '2' => ':global',
3176
-                  ),
3177
-                  'from' => array(
3176
+                    ),
3177
+                    'from' => array(
3178 3178
                     '0' => ':global',
3179
-                  ),
3179
+                    ),
3180 3180
                 ),
3181 3181
                 'rules_input_evaluator_php' => array(
3182
-                  'message' => array(
3182
+                    'message' => array(
3183 3183
                     '0' => 'node',
3184
-                  ),
3184
+                    ),
3185
+                ),
3185 3186
                 ),
3186
-              ),
3187 3187
             ),
3188 3188
             '#type' => 'action',
3189 3189
             '#weight' => 0.0,
3190
-          ),
3190
+            ),
3191 3191
         ),
3192 3192
         '#version' => 6003,
3193
-      ),
3194
-      'rules_forum_topic_marked_sticky_by_moderator_admin' => array(
3193
+        ),
3194
+        'rules_forum_topic_marked_sticky_by_moderator_admin' => array(
3195 3195
         '#type' => 'rule',
3196 3196
         '#set' => 'event_node_update',
3197 3197
         '#label' => 'Forum topic marked sticky by moderator/admin',
3198 3198
         '#active' => 1,
3199 3199
         '#weight' => '0',
3200 3200
         '#categories' => array(
3201
-          '0' => 'boinc_standard',
3202
-          '1' => 'moderator notification',
3201
+            '0' => 'boinc_standard',
3202
+            '1' => 'moderator notification',
3203 3203
         ),
3204 3204
         '#status' => 'default',
3205 3205
         '#conditions' => array(
3206
-          '0' => array(
3206
+            '0' => array(
3207 3207
             '#type' => 'condition',
3208 3208
             '#settings' => array(
3209
-              'roles' => array(
3209
+                'roles' => array(
3210 3210
                 '0' => 3519698132,
3211 3211
                 '1' => 1271379760,
3212
-              ),
3213
-              'operation' => 'OR',
3214
-              '#argument map' => array(
3212
+                ),
3213
+                'operation' => 'OR',
3214
+                '#argument map' => array(
3215 3215
                 'user' => 'user',
3216
-              ),
3216
+                ),
3217 3217
             ),
3218 3218
             '#name' => 'rules_condition_user_hasrole',
3219 3219
             '#info' => array(
3220
-              'label' => 'User has role(s): administrator or moderator',
3221
-              'label callback' => FALSE,
3222
-              'arguments' => array(
3220
+                'label' => 'User has role(s): administrator or moderator',
3221
+                'label callback' => FALSE,
3222
+                'arguments' => array(
3223 3223
                 'user' => array(
3224
-                  'type' => 'user',
3225
-                  'label' => 'User',
3224
+                    'type' => 'user',
3225
+                    'label' => 'User',
3226
+                ),
3226 3227
                 ),
3227
-              ),
3228
-              'module' => 'User',
3228
+                'module' => 'User',
3229 3229
             ),
3230 3230
             '#weight' => 0.0,
3231
-          ),
3232
-          '1' => array(
3231
+            ),
3232
+            '1' => array(
3233 3233
             '#weight' => 0.0,
3234 3234
             '0' => array(
3235
-              '#weight' => 0.0,
3236
-              '#type' => 'condition',
3237
-              '#settings' => array(
3235
+                '#weight' => 0.0,
3236
+                '#type' => 'condition',
3237
+                '#settings' => array(
3238 3238
                 'type' => array(
3239
-                  'forum' => 'forum',
3239
+                    'forum' => 'forum',
3240 3240
                 ),
3241 3241
                 '#argument map' => array(
3242
-                  'node' => 'node',
3242
+                    'node' => 'node',
3243
+                ),
3243 3244
                 ),
3244
-              ),
3245
-              '#name' => 'rules_condition_content_is_type',
3246
-              '#info' => array(
3245
+                '#name' => 'rules_condition_content_is_type',
3246
+                '#info' => array(
3247 3247
                 'label' => 'Updated content is Forum topic',
3248 3248
                 'arguments' => array(
3249
-                  'node' => array(
3249
+                    'node' => array(
3250 3250
                     'type' => 'node',
3251 3251
                     'label' => 'Content',
3252
-                  ),
3252
+                    ),
3253 3253
                 ),
3254 3254
                 'module' => 'Node',
3255
-              ),
3255
+                ),
3256 3256
             ),
3257 3257
             '#type' => 'OR',
3258 3258
             '1' => array(
3259
-              '#type' => 'condition',
3260
-              '#settings' => array(
3259
+                '#type' => 'condition',
3260
+                '#settings' => array(
3261 3261
                 'type' => array(
3262
-                  'team_forum' => 'team_forum',
3262
+                    'team_forum' => 'team_forum',
3263 3263
                 ),
3264 3264
                 '#argument map' => array(
3265
-                  'node' => 'node',
3265
+                    'node' => 'node',
3266
+                ),
3266 3267
                 ),
3267
-              ),
3268
-              '#name' => 'rules_condition_content_is_type',
3269
-              '#info' => array(
3268
+                '#name' => 'rules_condition_content_is_type',
3269
+                '#info' => array(
3270 3270
                 'label' => 'Updated content is Team forum topic',
3271 3271
                 'arguments' => array(
3272
-                  'node' => array(
3272
+                    'node' => array(
3273 3273
                     'type' => 'node',
3274 3274
                     'label' => 'Content',
3275
-                  ),
3275
+                    ),
3276 3276
                 ),
3277 3277
                 'module' => 'Node',
3278
-              ),
3279
-              '#weight' => 0.0,
3278
+                ),
3279
+                '#weight' => 0.0,
3280
+            ),
3280 3281
             ),
3281
-          ),
3282
-          '3' => array(
3282
+            '3' => array(
3283 3283
             '#weight' => 0.0,
3284 3284
             '#info' => array(
3285
-              'label' => 'PHP code: node content unchanged',
3286
-              'label callback' => FALSE,
3287
-              'module' => 'PHP',
3288
-              'eval input' => array(
3285
+                'label' => 'PHP code: node content unchanged',
3286
+                'label callback' => FALSE,
3287
+                'module' => 'PHP',
3288
+                'eval input' => array(
3289 3289
                 '0' => 'code',
3290
-              ),
3290
+                ),
3291 3291
             ),
3292 3292
             '#name' => 'rules_condition_custom_php',
3293 3293
             '#settings' => array(
3294
-              'code' => 'return $node->body == $node_unchanged->body;',
3295
-              'vars' => array(
3294
+                'code' => 'return $node->body == $node_unchanged->body;',
3295
+                'vars' => array(
3296 3296
                 '0' => 'node',
3297 3297
                 '1' => 'node_unchanged',
3298
-              ),
3299
-              '#eval input' => array(
3298
+                ),
3299
+                '#eval input' => array(
3300 3300
                 'token_rules_input_evaluator' => array(
3301
-                  'code' => array(
3301
+                    'code' => array(
3302 3302
                     '0' => ':global',
3303
-                  ),
3303
+                    ),
3304
+                ),
3304 3305
                 ),
3305
-              ),
3306 3306
             ),
3307 3307
             '#type' => 'condition',
3308
-          ),
3309
-          '4' => array(
3308
+            ),
3309
+            '4' => array(
3310 3310
             '#weight' => 0.0,
3311 3311
             '#info' => array(
3312
-              'label' => 'PHP code: node made sticky',
3313
-              'label callback' => FALSE,
3314
-              'module' => 'PHP',
3315
-              'eval input' => array(
3312
+                'label' => 'PHP code: node made sticky',
3313
+                'label callback' => FALSE,
3314
+                'module' => 'PHP',
3315
+                'eval input' => array(
3316 3316
                 '0' => 'code',
3317
-              ),
3317
+                ),
3318 3318
             ),
3319 3319
             '#name' => 'rules_condition_custom_php',
3320 3320
             '#type' => 'condition',
3321 3321
             '#settings' => array(
3322
-              'code' => 'return $node_unchanged->sticky == 0 && $node->sticky == 1;',
3323
-              'vars' => array(
3322
+                'code' => 'return $node_unchanged->sticky == 0 && $node->sticky == 1;',
3323
+                'vars' => array(
3324 3324
                 '0' => 'node',
3325 3325
                 '1' => 'node_unchanged',
3326
-              ),
3327
-              '#eval input' => array(
3326
+                ),
3327
+                '#eval input' => array(
3328 3328
                 'token_rules_input_evaluator' => array(
3329
-                  'code' => array(
3329
+                    'code' => array(
3330 3330
                     '0' => ':global',
3331
-                  ),
3331
+                    ),
3332
+                ),
3332 3333
                 ),
3333
-              ),
3334 3334
             ),
3335
-          ),
3335
+            ),
3336 3336
         ),
3337 3337
         '#actions' => array(
3338
-          '0' => array(
3338
+            '0' => array(
3339 3339
             '#info' => array(
3340
-              'label' => 'Notify moderators via email',
3341
-              'module' => 'BOINC core',
3342
-              'eval input' => array(
3340
+                'label' => 'Notify moderators via email',
3341
+                'module' => 'BOINC core',
3342
+                'eval input' => array(
3343 3343
                 '0' => 'subject',
3344 3344
                 '1' => 'message',
3345 3345
                 '2' => 'from',
3346
-              ),
3346
+                ),
3347 3347
             ),
3348 3348
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3349 3349
             '#settings' => array(
3350
-              'from' => '',
3351
-              'subject' => 'Forum topic at [:global:site-name] marked sticky by moderator/admin',
3352
-              'message' => "[node:type] topic '[node:title]' has been marked sticky by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3353
-              '#eval input' => array(
3350
+                'from' => '',
3351
+                'subject' => 'Forum topic at [:global:site-name] marked sticky by moderator/admin',
3352
+                'message' => "[node:type] topic '[node:title]' has been marked sticky by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3353
+                '#eval input' => array(
3354 3354
                 'token_rules_input_evaluator' => array(
3355
-                  'subject' => array(
3355
+                    'subject' => array(
3356 3356
                     '0' => ':global',
3357
-                  ),
3358
-                  'message' => array(
3357
+                    ),
3358
+                    'message' => array(
3359 3359
                     '0' => 'node',
3360 3360
                     '1' => 'user',
3361 3361
                     '2' => ':global',
3362
-                  ),
3363
-                  'from' => array(
3362
+                    ),
3363
+                    'from' => array(
3364 3364
                     '0' => ':global',
3365
-                  ),
3365
+                    ),
3366 3366
                 ),
3367 3367
                 'rules_input_evaluator_php' => array(
3368
-                  'message' => array(
3368
+                    'message' => array(
3369 3369
                     '0' => 'node',
3370
-                  ),
3370
+                    ),
3371
+                ),
3371 3372
                 ),
3372
-              ),
3373 3373
             ),
3374 3374
             '#type' => 'action',
3375 3375
             '#weight' => 0.0,
3376
-          ),
3376
+            ),
3377 3377
         ),
3378 3378
         '#version' => 6003,
3379
-      ),
3380
-      'rules_forum_topic_marked_unsticky_by_moderator_admin' => array(
3379
+        ),
3380
+        'rules_forum_topic_marked_unsticky_by_moderator_admin' => array(
3381 3381
         '#type' => 'rule',
3382 3382
         '#set' => 'event_node_update',
3383 3383
         '#label' => 'Forum topic marked unsticky by moderator/admin',
3384 3384
         '#active' => 1,
3385 3385
         '#weight' => '0',
3386 3386
         '#categories' => array(
3387
-          '0' => 'boinc_standard',
3388
-          '1' => 'moderator notification',
3387
+            '0' => 'boinc_standard',
3388
+            '1' => 'moderator notification',
3389 3389
         ),
3390 3390
         '#status' => 'default',
3391 3391
         '#conditions' => array(
3392
-          '0' => array(
3392
+            '0' => array(
3393 3393
             '#type' => 'condition',
3394 3394
             '#settings' => array(
3395
-              'roles' => array(
3395
+                'roles' => array(
3396 3396
                 '0' => 3519698132,
3397 3397
                 '1' => 1271379760,
3398
-              ),
3399
-              'operation' => 'OR',
3400
-              '#argument map' => array(
3398
+                ),
3399
+                'operation' => 'OR',
3400
+                '#argument map' => array(
3401 3401
                 'user' => 'user',
3402
-              ),
3402
+                ),
3403 3403
             ),
3404 3404
             '#name' => 'rules_condition_user_hasrole',
3405 3405
             '#info' => array(
3406
-              'label' => 'User has role(s): administrator or moderator',
3407
-              'label callback' => FALSE,
3408
-              'arguments' => array(
3406
+                'label' => 'User has role(s): administrator or moderator',
3407
+                'label callback' => FALSE,
3408
+                'arguments' => array(
3409 3409
                 'user' => array(
3410
-                  'type' => 'user',
3411
-                  'label' => 'User',
3410
+                    'type' => 'user',
3411
+                    'label' => 'User',
3412
+                ),
3412 3413
                 ),
3413
-              ),
3414
-              'module' => 'User',
3414
+                'module' => 'User',
3415 3415
             ),
3416 3416
             '#weight' => 0.0,
3417
-          ),
3418
-          '1' => array(
3417
+            ),
3418
+            '1' => array(
3419 3419
             '#weight' => 0.0,
3420 3420
             '0' => array(
3421
-              '#weight' => 0.0,
3422
-              '#type' => 'condition',
3423
-              '#settings' => array(
3421
+                '#weight' => 0.0,
3422
+                '#type' => 'condition',
3423
+                '#settings' => array(
3424 3424
                 'type' => array(
3425
-                  'forum' => 'forum',
3425
+                    'forum' => 'forum',
3426 3426
                 ),
3427 3427
                 '#argument map' => array(
3428
-                  'node' => 'node',
3428
+                    'node' => 'node',
3429
+                ),
3429 3430
                 ),
3430
-              ),
3431
-              '#name' => 'rules_condition_content_is_type',
3432
-              '#info' => array(
3431
+                '#name' => 'rules_condition_content_is_type',
3432
+                '#info' => array(
3433 3433
                 'label' => 'Updated content is Forum topic',
3434 3434
                 'arguments' => array(
3435
-                  'node' => array(
3435
+                    'node' => array(
3436 3436
                     'type' => 'node',
3437 3437
                     'label' => 'Content',
3438
-                  ),
3438
+                    ),
3439 3439
                 ),
3440 3440
                 'module' => 'Node',
3441
-              ),
3441
+                ),
3442 3442
             ),
3443 3443
             '#type' => 'OR',
3444 3444
             '1' => array(
3445
-              '#type' => 'condition',
3446
-              '#settings' => array(
3445
+                '#type' => 'condition',
3446
+                '#settings' => array(
3447 3447
                 'type' => array(
3448
-                  'team_forum' => 'team_forum',
3448
+                    'team_forum' => 'team_forum',
3449 3449
                 ),
3450 3450
                 '#argument map' => array(
3451
-                  'node' => 'node',
3451
+                    'node' => 'node',
3452 3452
                 ),
3453
-              ),
3454
-              '#name' => 'rules_condition_content_is_type',
3455
-              '#info' => array(
3453
+                ),
3454
+                '#name' => 'rules_condition_content_is_type',
3455
+                '#info' => array(
3456 3456
                 'label' => 'Updated content is Team forum topic',
3457 3457
                 'arguments' => array(
3458
-                  'node' => array(
3458
+                    'node' => array(
3459 3459
                     'type' => 'node',
3460 3460
                     'label' => 'Content',
3461
-                  ),
3461
+                    ),
3462 3462
                 ),
3463 3463
                 'module' => 'Node',
3464
-              ),
3465
-              '#weight' => 0.0,
3464
+                ),
3465
+                '#weight' => 0.0,
3466 3466
             ),
3467
-          ),
3468
-          '3' => array(
3467
+            ),
3468
+            '3' => array(
3469 3469
             '#weight' => 0.0,
3470 3470
             '#info' => array(
3471
-              'label' => 'PHP code: node content unchanged',
3472
-              'label callback' => FALSE,
3473
-              'module' => 'PHP',
3474
-              'eval input' => array(
3471
+                'label' => 'PHP code: node content unchanged',
3472
+                'label callback' => FALSE,
3473
+                'module' => 'PHP',
3474
+                'eval input' => array(
3475 3475
                 '0' => 'code',
3476
-              ),
3476
+                ),
3477 3477
             ),
3478 3478
             '#name' => 'rules_condition_custom_php',
3479 3479
             '#settings' => array(
3480
-              'code' => 'return $node->body == $node_unchanged->body;',
3481
-              'vars' => array(
3480
+                'code' => 'return $node->body == $node_unchanged->body;',
3481
+                'vars' => array(
3482 3482
                 '0' => 'node',
3483 3483
                 '1' => 'node_unchanged',
3484
-              ),
3485
-              '#eval input' => array(
3484
+                ),
3485
+                '#eval input' => array(
3486 3486
                 'token_rules_input_evaluator' => array(
3487
-                  'code' => array(
3487
+                    'code' => array(
3488 3488
                     '0' => ':global',
3489
-                  ),
3489
+                    ),
3490
+                ),
3490 3491
                 ),
3491
-              ),
3492 3492
             ),
3493 3493
             '#type' => 'condition',
3494
-          ),
3495
-          '4' => array(
3494
+            ),
3495
+            '4' => array(
3496 3496
             '#weight' => 0.0,
3497 3497
             '#info' => array(
3498
-              'label' => 'PHP code: node made sticky',
3499
-              'label callback' => FALSE,
3500
-              'module' => 'PHP',
3501
-              'eval input' => array(
3498
+                'label' => 'PHP code: node made sticky',
3499
+                'label callback' => FALSE,
3500
+                'module' => 'PHP',
3501
+                'eval input' => array(
3502 3502
                 '0' => 'code',
3503
-              ),
3503
+                ),
3504 3504
             ),
3505 3505
             '#name' => 'rules_condition_custom_php',
3506 3506
             '#type' => 'condition',
3507 3507
             '#settings' => array(
3508
-              'code' => 'return $node_unchanged->sticky == 1 && $node->sticky == 0;',
3509
-              'vars' => array(
3508
+                'code' => 'return $node_unchanged->sticky == 1 && $node->sticky == 0;',
3509
+                'vars' => array(
3510 3510
                 '0' => 'node',
3511 3511
                 '1' => 'node_unchanged',
3512
-              ),
3513
-              '#eval input' => array(
3512
+                ),
3513
+                '#eval input' => array(
3514 3514
                 'token_rules_input_evaluator' => array(
3515
-                  'code' => array(
3515
+                    'code' => array(
3516 3516
                     '0' => ':global',
3517
-                  ),
3517
+                    ),
3518
+                ),
3518 3519
                 ),
3519
-              ),
3520 3520
             ),
3521
-          ),
3521
+            ),
3522 3522
         ),
3523 3523
         '#actions' => array(
3524
-          '0' => array(
3524
+            '0' => array(
3525 3525
             '#info' => array(
3526
-              'label' => 'Notify moderators via email',
3527
-              'module' => 'BOINC core',
3528
-              'eval input' => array(
3526
+                'label' => 'Notify moderators via email',
3527
+                'module' => 'BOINC core',
3528
+                'eval input' => array(
3529 3529
                 '0' => 'subject',
3530 3530
                 '1' => 'message',
3531 3531
                 '2' => 'from',
3532
-              ),
3532
+                ),
3533 3533
             ),
3534 3534
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3535 3535
             '#settings' => array(
3536
-              'from' => '',
3537
-              'subject' => 'Forum topic at [:global:site-name] marked unsticky by moderator/admin',
3538
-              'message' => "[node:type] topic '[node:title]' has been marked unsticky by moderator/admin [user:display-name].\r\n\\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3539
-              '#eval input' => array(
3536
+                'from' => '',
3537
+                'subject' => 'Forum topic at [:global:site-name] marked unsticky by moderator/admin',
3538
+                'message' => "[node:type] topic '[node:title]' has been marked unsticky by moderator/admin [user:display-name].\r\n\\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3539
+                '#eval input' => array(
3540 3540
                 'token_rules_input_evaluator' => array(
3541
-                  'subject' => array(
3541
+                    'subject' => array(
3542 3542
                     '0' => ':global',
3543
-                  ),
3544
-                  'message' => array(
3543
+                    ),
3544
+                    'message' => array(
3545 3545
                     '0' => 'node',
3546 3546
                     '1' => 'user',
3547 3547
                     '2' => ':global',
3548
-                  ),
3549
-                  'from' => array(
3548
+                    ),
3549
+                    'from' => array(
3550 3550
                     '0' => ':global',
3551
-                  ),
3551
+                    ),
3552 3552
                 ),
3553 3553
                 'rules_input_evaluator_php' => array(
3554
-                  'message' => array(
3554
+                    'message' => array(
3555 3555
                     '0' => 'node',
3556
-                  ),
3556
+                    ),
3557
+                ),
3557 3558
                 ),
3558
-              ),
3559 3559
             ),
3560 3560
             '#type' => 'action',
3561 3561
             '#weight' => 0.0,
3562
-          ),
3562
+            ),
3563 3563
         ),
3564 3564
         '#version' => 6003,
3565
-      ),
3566
-      'rules_forum_topic_nenamed_title_by_moderator_or_admin' => array(
3565
+        ),
3566
+        'rules_forum_topic_nenamed_title_by_moderator_or_admin' => array(
3567 3567
         '#type' => 'rule',
3568 3568
         '#set' => 'event_node_update',
3569 3569
         '#label' => 'Forum topic renamed title by moderator or admin',
3570 3570
         '#active' => 1,
3571 3571
         '#weight' => '0',
3572 3572
         '#categories' => array(
3573
-          '0' => 'boinc_standard',
3574
-          '1' => 'moderator notification',
3573
+            '0' => 'boinc_standard',
3574
+            '1' => 'moderator notification',
3575 3575
         ),
3576 3576
         '#status' => 'default',
3577 3577
         '#conditions' => array(
3578
-          '0' => array(
3578
+            '0' => array(
3579 3579
             '#weight' => 0.0,
3580 3580
             '#type' => 'condition',
3581 3581
             '#settings' => array(
3582
-              'roles' => array(
3582
+                'roles' => array(
3583 3583
                 '0' => 3519698132,
3584 3584
                 '1' => 1271379760,
3585
-              ),
3586
-              'operation' => 'OR',
3587
-              '#argument map' => array(
3585
+                ),
3586
+                'operation' => 'OR',
3587
+                '#argument map' => array(
3588 3588
                 'user' => 'user',
3589
-              ),
3589
+                ),
3590 3590
             ),
3591 3591
             '#name' => 'rules_condition_user_hasrole',
3592 3592
             '#info' => array(
3593
-              'label' => 'User has role(s): administrator or moderator',
3594
-              'label callback' => FALSE,
3595
-              'arguments' => array(
3593
+                'label' => 'User has role(s): administrator or moderator',
3594
+                'label callback' => FALSE,
3595
+                'arguments' => array(
3596 3596
                 'user' => array(
3597
-                  'type' => 'user',
3598
-                  'label' => 'User',
3597
+                    'type' => 'user',
3598
+                    'label' => 'User',
3599
+                ),
3599 3600
                 ),
3600
-              ),
3601
-              'module' => 'User',
3601
+                'module' => 'User',
3602
+            ),
3602 3603
             ),
3603
-          ),
3604
-          '1' => array(
3604
+            '1' => array(
3605 3605
             '#weight' => 0.0,
3606 3606
             '0' => array(
3607
-              '#weight' => 0.0,
3608
-              '#info' => array(
3607
+                '#weight' => 0.0,
3608
+                '#info' => array(
3609 3609
                 'label' => 'Updated content is Forum topic',
3610 3610
                 'arguments' => array(
3611
-                  'node' => array(
3611
+                    'node' => array(
3612 3612
                     'type' => 'node',
3613 3613
                     'label' => 'Content',
3614
-                  ),
3614
+                    ),
3615 3615
                 ),
3616 3616
                 'module' => 'Node',
3617
-              ),
3618
-              '#name' => 'rules_condition_content_is_type',
3619
-              '#settings' => array(
3617
+                ),
3618
+                '#name' => 'rules_condition_content_is_type',
3619
+                '#settings' => array(
3620 3620
                 'type' => array(
3621
-                  'forum' => 'forum',
3621
+                    'forum' => 'forum',
3622 3622
                 ),
3623 3623
                 '#argument map' => array(
3624
-                  'node' => 'node',
3624
+                    'node' => 'node',
3625
+                ),
3625 3626
                 ),
3626
-              ),
3627
-              '#type' => 'condition',
3627
+                '#type' => 'condition',
3628 3628
             ),
3629 3629
             '#type' => 'OR',
3630 3630
             '1' => array(
3631
-              '#type' => 'condition',
3632
-              '#settings' => array(
3631
+                '#type' => 'condition',
3632
+                '#settings' => array(
3633 3633
                 'type' => array(
3634
-                  'team_forum' => 'team_forum',
3634
+                    'team_forum' => 'team_forum',
3635 3635
                 ),
3636 3636
                 '#argument map' => array(
3637
-                  'node' => 'node',
3637
+                    'node' => 'node',
3638 3638
                 ),
3639
-              ),
3640
-              '#name' => 'rules_condition_content_is_type',
3641
-              '#info' => array(
3639
+                ),
3640
+                '#name' => 'rules_condition_content_is_type',
3641
+                '#info' => array(
3642 3642
                 'label' => 'Updated content is Team forum topic',
3643 3643
                 'arguments' => array(
3644
-                  'node' => array(
3644
+                    'node' => array(
3645 3645
                     'type' => 'node',
3646 3646
                     'label' => 'Content',
3647
-                  ),
3647
+                    ),
3648 3648
                 ),
3649 3649
                 'module' => 'Node',
3650
-              ),
3651
-              '#weight' => 0.0,
3650
+                ),
3651
+                '#weight' => 0.0,
3652 3652
             ),
3653
-          ),
3654
-          '2' => array(
3653
+            ),
3654
+            '2' => array(
3655 3655
             '#weight' => 0.0,
3656 3656
             '#info' => array(
3657
-              'label' => 'PHP code: title changed',
3658
-              'label callback' => FALSE,
3659
-              'module' => 'PHP',
3660
-              'eval input' => array(
3657
+                'label' => 'PHP code: title changed',
3658
+                'label callback' => FALSE,
3659
+                'module' => 'PHP',
3660
+                'eval input' => array(
3661 3661
                 '0' => 'code',
3662
-              ),
3662
+                ),
3663 3663
             ),
3664 3664
             '#name' => 'rules_condition_custom_php',
3665 3665
             '#settings' => array(
3666
-              'code' => 'return ($node->title != $node_unchanged->title);',
3667
-              'vars' => array(
3666
+                'code' => 'return ($node->title != $node_unchanged->title);',
3667
+                'vars' => array(
3668 3668
                 '0' => 'node',
3669 3669
                 '1' => 'node_unchanged',
3670
-              ),
3671
-              '#eval input' => array(
3670
+                ),
3671
+                '#eval input' => array(
3672 3672
                 'token_rules_input_evaluator' => array(
3673
-                  'code' => array(
3673
+                    'code' => array(
3674 3674
                     '0' => ':global',
3675
-                  ),
3675
+                    ),
3676
+                ),
3676 3677
                 ),
3677
-              ),
3678 3678
             ),
3679 3679
             '#type' => 'condition',
3680
-          ),
3680
+            ),
3681 3681
         ),
3682 3682
         '#actions' => array(
3683
-          '0' => array(
3683
+            '0' => array(
3684 3684
             '#type' => 'action',
3685 3685
             '#settings' => array(
3686
-              'from' => '',
3687
-              'subject' => 'Forum topic at [:global:site-name] renamed by moderator/admin',
3688
-              'message' => "[node:type] topic '[node:title]' has its title renamed by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3689
-              '#eval input' => array(
3686
+                'from' => '',
3687
+                'subject' => 'Forum topic at [:global:site-name] renamed by moderator/admin',
3688
+                'message' => "[node:type] topic '[node:title]' has its title renamed by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3689
+                '#eval input' => array(
3690 3690
                 'token_rules_input_evaluator' => array(
3691
-                  'subject' => array(
3691
+                    'subject' => array(
3692 3692
                     '0' => ':global',
3693
-                  ),
3694
-                  'message' => array(
3693
+                    ),
3694
+                    'message' => array(
3695 3695
                     '0' => 'node',
3696 3696
                     '1' => 'user',
3697 3697
                     '2' => ':global',
3698
-                  ),
3699
-                  'from' => array(
3698
+                    ),
3699
+                    'from' => array(
3700 3700
                     '0' => ':global',
3701
-                  ),
3701
+                    ),
3702 3702
                 ),
3703 3703
                 'rules_input_evaluator_php' => array(
3704
-                  'message' => array(
3704
+                    'message' => array(
3705 3705
                     '0' => 'node',
3706
-                  ),
3706
+                    ),
3707
+                ),
3707 3708
                 ),
3708
-              ),
3709 3709
             ),
3710 3710
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3711 3711
             '#info' => array(
3712
-              'label' => 'Notify moderators via email',
3713
-              'module' => 'BOINC core',
3714
-              'eval input' => array(
3712
+                'label' => 'Notify moderators via email',
3713
+                'module' => 'BOINC core',
3714
+                'eval input' => array(
3715 3715
                 '0' => 'subject',
3716 3716
                 '1' => 'message',
3717 3717
                 '2' => 'from',
3718
-              ),
3718
+                ),
3719 3719
             ),
3720 3720
             '#weight' => 0.0,
3721
-          ),
3721
+            ),
3722 3722
         ),
3723 3723
         '#version' => 6003,
3724
-      ),
3725
-      'rules_forum_topic_unlocked_by_moderator_admin' => array(
3724
+        ),
3725
+        'rules_forum_topic_unlocked_by_moderator_admin' => array(
3726 3726
         '#type' => 'rule',
3727 3727
         '#set' => 'event_node_update',
3728 3728
         '#label' => 'Forum topic unlocked by moderator/admin',
3729 3729
         '#active' => 1,
3730 3730
         '#weight' => '0',
3731 3731
         '#categories' => array(
3732
-          '0' => 'boinc_standard',
3733
-          '1' => 'moderator notification',
3732
+            '0' => 'boinc_standard',
3733
+            '1' => 'moderator notification',
3734 3734
         ),
3735 3735
         '#status' => 'default',
3736 3736
         '#conditions' => array(
3737
-          '0' => array(
3737
+            '0' => array(
3738 3738
             '#type' => 'condition',
3739 3739
             '#settings' => array(
3740
-              'roles' => array(
3740
+                'roles' => array(
3741 3741
                 '0' => 3519698132,
3742 3742
                 '1' => 1271379760,
3743
-              ),
3744
-              'operation' => 'OR',
3745
-              '#argument map' => array(
3743
+                ),
3744
+                'operation' => 'OR',
3745
+                '#argument map' => array(
3746 3746
                 'user' => 'user',
3747
-              ),
3747
+                ),
3748 3748
             ),
3749 3749
             '#name' => 'rules_condition_user_hasrole',
3750 3750
             '#info' => array(
3751
-              'label' => 'User has role(s): administrator or moderator',
3752
-              'label callback' => FALSE,
3753
-              'arguments' => array(
3751
+                'label' => 'User has role(s): administrator or moderator',
3752
+                'label callback' => FALSE,
3753
+                'arguments' => array(
3754 3754
                 'user' => array(
3755
-                  'type' => 'user',
3756
-                  'label' => 'User',
3755
+                    'type' => 'user',
3756
+                    'label' => 'User',
3757
+                ),
3757 3758
                 ),
3758
-              ),
3759
-              'module' => 'User',
3759
+                'module' => 'User',
3760 3760
             ),
3761 3761
             '#weight' => 0.0,
3762
-          ),
3763
-          '1' => array(
3762
+            ),
3763
+            '1' => array(
3764 3764
             '#weight' => 0.0,
3765 3765
             '0' => array(
3766
-              '#weight' => 0.0,
3767
-              '#type' => 'condition',
3768
-              '#settings' => array(
3766
+                '#weight' => 0.0,
3767
+                '#type' => 'condition',
3768
+                '#settings' => array(
3769 3769
                 'type' => array(
3770
-                  'forum' => 'forum',
3770
+                    'forum' => 'forum',
3771 3771
                 ),
3772 3772
                 '#argument map' => array(
3773
-                  'node' => 'node',
3773
+                    'node' => 'node',
3774
+                ),
3774 3775
                 ),
3775
-              ),
3776
-              '#name' => 'rules_condition_content_is_type',
3777
-              '#info' => array(
3776
+                '#name' => 'rules_condition_content_is_type',
3777
+                '#info' => array(
3778 3778
                 'label' => 'Updated content is Forum topic',
3779 3779
                 'arguments' => array(
3780
-                  'node' => array(
3780
+                    'node' => array(
3781 3781
                     'type' => 'node',
3782 3782
                     'label' => 'Content',
3783
-                  ),
3783
+                    ),
3784 3784
                 ),
3785 3785
                 'module' => 'Node',
3786
-              ),
3786
+                ),
3787 3787
             ),
3788 3788
             '#type' => 'OR',
3789 3789
             '1' => array(
3790
-              '#type' => 'condition',
3791
-              '#settings' => array(
3790
+                '#type' => 'condition',
3791
+                '#settings' => array(
3792 3792
                 'type' => array(
3793
-                  'team_forum' => 'team_forum',
3793
+                    'team_forum' => 'team_forum',
3794 3794
                 ),
3795 3795
                 '#argument map' => array(
3796
-                  'node' => 'node',
3796
+                    'node' => 'node',
3797
+                ),
3797 3798
                 ),
3798
-              ),
3799
-              '#name' => 'rules_condition_content_is_type',
3800
-              '#info' => array(
3799
+                '#name' => 'rules_condition_content_is_type',
3800
+                '#info' => array(
3801 3801
                 'label' => 'Updated content is Team forum topic',
3802 3802
                 'arguments' => array(
3803
-                  'node' => array(
3803
+                    'node' => array(
3804 3804
                     'type' => 'node',
3805 3805
                     'label' => 'Content',
3806
-                  ),
3806
+                    ),
3807 3807
                 ),
3808 3808
                 'module' => 'Node',
3809
-              ),
3810
-              '#weight' => 0.0,
3809
+                ),
3810
+                '#weight' => 0.0,
3811 3811
             ),
3812
-          ),
3813
-          '3' => array(
3812
+            ),
3813
+            '3' => array(
3814 3814
             '#weight' => 0.0,
3815 3815
             '#info' => array(
3816
-              'label' => 'PHP code: node content unchanged',
3817
-              'label callback' => FALSE,
3818
-              'module' => 'PHP',
3819
-              'eval input' => array(
3816
+                'label' => 'PHP code: node content unchanged',
3817
+                'label callback' => FALSE,
3818
+                'module' => 'PHP',
3819
+                'eval input' => array(
3820 3820
                 '0' => 'code',
3821
-              ),
3821
+                ),
3822 3822
             ),
3823 3823
             '#name' => 'rules_condition_custom_php',
3824 3824
             '#settings' => array(
3825
-              'code' => 'return $node->body == $node_unchanged->body;',
3826
-              'vars' => array(
3825
+                'code' => 'return $node->body == $node_unchanged->body;',
3826
+                'vars' => array(
3827 3827
                 '0' => 'node',
3828 3828
                 '1' => 'node_unchanged',
3829
-              ),
3830
-              '#eval input' => array(
3829
+                ),
3830
+                '#eval input' => array(
3831 3831
                 'token_rules_input_evaluator' => array(
3832
-                  'code' => array(
3832
+                    'code' => array(
3833 3833
                     '0' => ':global',
3834
-                  ),
3834
+                    ),
3835
+                ),
3835 3836
                 ),
3836
-              ),
3837 3837
             ),
3838 3838
             '#type' => 'condition',
3839
-          ),
3840
-          '4' => array(
3839
+            ),
3840
+            '4' => array(
3841 3841
             '#weight' => 0.0,
3842 3842
             '#info' => array(
3843
-              'label' => 'PHP code: node unlocked',
3844
-              'label callback' => FALSE,
3845
-              'module' => 'PHP',
3846
-              'eval input' => array(
3843
+                'label' => 'PHP code: node unlocked',
3844
+                'label callback' => FALSE,
3845
+                'module' => 'PHP',
3846
+                'eval input' => array(
3847 3847
                 '0' => 'code',
3848
-              ),
3848
+                ),
3849 3849
             ),
3850 3850
             '#name' => 'rules_condition_custom_php',
3851 3851
             '#type' => 'condition',
3852 3852
             '#settings' => array(
3853
-              'code' => 'return $node_unchanged->comment == 1 && $node->comment == 2;',
3854
-              'vars' => array(
3853
+                'code' => 'return $node_unchanged->comment == 1 && $node->comment == 2;',
3854
+                'vars' => array(
3855 3855
                 '0' => 'node',
3856 3856
                 '1' => 'node_unchanged',
3857
-              ),
3858
-              '#eval input' => array(
3857
+                ),
3858
+                '#eval input' => array(
3859 3859
                 'token_rules_input_evaluator' => array(
3860
-                  'code' => array(
3860
+                    'code' => array(
3861 3861
                     '0' => ':global',
3862
-                  ),
3862
+                    ),
3863 3863
                 ),
3864
-              ),
3864
+                ),
3865
+            ),
3865 3866
             ),
3866
-          ),
3867 3867
         ),
3868 3868
         '#actions' => array(
3869
-          '0' => array(
3869
+            '0' => array(
3870 3870
             '#info' => array(
3871
-              'label' => 'Notify moderators via email',
3872
-              'module' => 'BOINC core',
3873
-              'eval input' => array(
3871
+                'label' => 'Notify moderators via email',
3872
+                'module' => 'BOINC core',
3873
+                'eval input' => array(
3874 3874
                 '0' => 'subject',
3875 3875
                 '1' => 'message',
3876 3876
                 '2' => 'from',
3877
-              ),
3877
+                ),
3878 3878
             ),
3879 3879
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3880 3880
             '#settings' => array(
3881
-              'from' => '',
3882
-              'subject' => 'Forum topic at [:global:site-name] unlocked by moderator/admin',
3883
-              'message' => "[node:type] topic '[node:title]' has been unlocked by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3884
-              '#eval input' => array(
3881
+                'from' => '',
3882
+                'subject' => 'Forum topic at [:global:site-name] unlocked by moderator/admin',
3883
+                'message' => "[node:type] topic '[node:title]' has been unlocked by moderator/admin [user:display-name].\r\n\r\nLink: <?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>",
3884
+                '#eval input' => array(
3885 3885
                 'token_rules_input_evaluator' => array(
3886
-                  'subject' => array(
3886
+                    'subject' => array(
3887 3887
                     '0' => ':global',
3888
-                  ),
3889
-                  'message' => array(
3888
+                    ),
3889
+                    'message' => array(
3890 3890
                     '0' => 'node',
3891 3891
                     '1' => 'user',
3892 3892
                     '2' => ':global',
3893
-                  ),
3894
-                  'from' => array(
3893
+                    ),
3894
+                    'from' => array(
3895 3895
                     '0' => ':global',
3896
-                  ),
3896
+                    ),
3897 3897
                 ),
3898 3898
                 'rules_input_evaluator_php' => array(
3899
-                  'message' => array(
3899
+                    'message' => array(
3900 3900
                     '0' => 'node',
3901
-                  ),
3901
+                    ),
3902
+                ),
3902 3903
                 ),
3903
-              ),
3904 3904
             ),
3905 3905
             '#type' => 'action',
3906 3906
             '#weight' => 0.0,
3907
-          ),
3907
+            ),
3908 3908
         ),
3909 3909
         '#version' => 6003,
3910
-      ),
3911
-      'rules_offensive_comment_reported' => array(
3910
+        ),
3911
+        'rules_offensive_comment_reported' => array(
3912 3912
         '#type' => 'rule',
3913 3913
         '#set' => 'event_flag_flagged_abuse_comment',
3914 3914
         '#label' => 'Offensive comment reported',
3915 3915
         '#active' => 1,
3916 3916
         '#weight' => '0',
3917 3917
         '#categories' => array(
3918
-          '0' => 'moderator notification',
3919
-          '1' => 'boinc_standard',
3918
+            '0' => 'moderator notification',
3919
+            '1' => 'boinc_standard',
3920 3920
         ),
3921 3921
         '#status' => 'default',
3922 3922
         '#conditions' => array(),
3923 3923
         '#actions' => array(
3924
-          '1' => array(
3924
+            '1' => array(
3925 3925
             '#info' => array(
3926
-              'label' => 'Notify moderators via email',
3927
-              'module' => 'BOINC core',
3928
-              'eval input' => array(
3926
+                'label' => 'Notify moderators via email',
3927
+                'module' => 'BOINC core',
3928
+                'eval input' => array(
3929 3929
                 '0' => 'subject',
3930 3930
                 '1' => 'message',
3931 3931
                 '2' => 'from',
3932
-              ),
3932
+                ),
3933 3933
             ),
3934 3934
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3935 3935
             '#settings' => array(
3936
-              'from' => '',
3937
-              'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
3938
-              'message' => "[flagging_user:display-name] has reported the following comment on [node:type] content as being offensive or inappropriate for the [:global:site-name] site:\r\n\r\n<?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]\r\n\r\nTotal reports of this comment: [comment:flag-abuse-comment-count]",
3939
-              '#eval input' => array(
3936
+                'from' => '',
3937
+                'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
3938
+                'message' => "[flagging_user:display-name] has reported the following comment on [node:type] content as being offensive or inappropriate for the [:global:site-name] site:\r\n\r\n<?php print url('<front>', array('absolute' => TRUE, 'language' => 'en')); ?>/goto/comment/[comment:comment-cid]\r\n\r\nTotal reports of this comment: [comment:flag-abuse-comment-count]",
3939
+                '#eval input' => array(
3940 3940
                 'token_rules_input_evaluator' => array(
3941
-                  'subject' => array(
3941
+                    'subject' => array(
3942 3942
                     '0' => 'node',
3943 3943
                     '1' => ':global',
3944
-                  ),
3945
-                  'message' => array(
3944
+                    ),
3945
+                    'message' => array(
3946 3946
                     '0' => 'flagging_user',
3947 3947
                     '1' => 'comment',
3948 3948
                     '2' => 'node',
3949 3949
                     '3' => ':global',
3950
-                  ),
3951
-                  'from' => array(
3950
+                    ),
3951
+                    'from' => array(
3952 3952
                     '0' => ':global',
3953
-                  ),
3953
+                    ),
3954 3954
                 ),
3955 3955
                 'rules_input_evaluator_php' => array(
3956
-                  'message' => array(),
3956
+                    'message' => array(),
3957
+                ),
3957 3958
                 ),
3958
-              ),
3959 3959
             ),
3960 3960
             '#type' => 'action',
3961 3961
             '#weight' => 0.0,
3962
-          ),
3962
+            ),
3963 3963
         ),
3964 3964
         '#version' => 6003,
3965
-      ),
3966
-      'rules_offensive_content_reported' => array(
3965
+        ),
3966
+        'rules_offensive_content_reported' => array(
3967 3967
         '#type' => 'rule',
3968 3968
         '#set' => 'event_flag_flagged_abuse_node',
3969 3969
         '#label' => 'Offensive content reported',
3970 3970
         '#active' => 1,
3971 3971
         '#weight' => '0',
3972 3972
         '#categories' => array(
3973
-          '0' => 'moderator notification',
3974
-          'boinc_standard' => 'boinc_standard',
3973
+            '0' => 'moderator notification',
3974
+            'boinc_standard' => 'boinc_standard',
3975 3975
         ),
3976 3976
         '#status' => 'default',
3977 3977
         '#conditions' => array(),
3978 3978
         '#actions' => array(
3979
-          '1' => array(
3979
+            '1' => array(
3980 3980
             '#type' => 'action',
3981 3981
             '#settings' => array(
3982
-              'from' => '',
3983
-              'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
3984
-              'message' => "[flagging_user:display-name] has reported the following [node:type] content as being offensive or inappropriate for the [:global:site-name] site:\r\n\r\n<?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>\r\n\r\nTotal reports of this content: [node:flag-abuse-node-count]",
3985
-              '#eval input' => array(
3982
+                'from' => '',
3983
+                'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
3984
+                'message' => "[flagging_user:display-name] has reported the following [node:type] content as being offensive or inappropriate for the [:global:site-name] site:\r\n\r\n<?php print url('node/' . \$node->nid, array('absolute' => TRUE, 'language' => 'en')); ?>\r\n\r\nTotal reports of this content: [node:flag-abuse-node-count]",
3985
+                '#eval input' => array(
3986 3986
                 'token_rules_input_evaluator' => array(
3987
-                  'subject' => array(
3987
+                    'subject' => array(
3988 3988
                     '0' => 'node',
3989 3989
                     '1' => ':global',
3990
-                  ),
3991
-                  'message' => array(
3990
+                    ),
3991
+                    'message' => array(
3992 3992
                     '0' => 'flagging_user',
3993 3993
                     '1' => 'node',
3994 3994
                     '2' => ':global',
3995
-                  ),
3996
-                  'from' => array(
3995
+                    ),
3996
+                    'from' => array(
3997 3997
                     '0' => ':global',
3998
-                  ),
3998
+                    ),
3999 3999
                 ),
4000 4000
                 'rules_input_evaluator_php' => array(
4001
-                  'message' => array(
4001
+                    'message' => array(
4002 4002
                     '0' => 'node',
4003
-                  ),
4003
+                    ),
4004
+                ),
4004 4005
                 ),
4005
-              ),
4006 4006
             ),
4007 4007
             '#name' => 'boinccore_rules_action_mail_to_moderators',
4008 4008
             '#info' => array(
4009
-              'label' => 'Notify moderators via email',
4010
-              'module' => 'BOINC core',
4011
-              'eval input' => array(
4009
+                'label' => 'Notify moderators via email',
4010
+                'module' => 'BOINC core',
4011
+                'eval input' => array(
4012 4012
                 '0' => 'subject',
4013 4013
                 '1' => 'message',
4014 4014
                 '2' => 'from',
4015
-              ),
4015
+                ),
4016 4016
             ),
4017 4017
             '#weight' => 0.0,
4018
-          ),
4018
+            ),
4019 4019
         ),
4020 4020
         '#version' => 6003,
4021
-      ),
4022
-      'rules_offensive_user_reported' => array(
4021
+        ),
4022
+        'rules_offensive_user_reported' => array(
4023 4023
         '#type' => 'rule',
4024 4024
         '#set' => 'event_flag_flagged_abuse_user',
4025 4025
         '#label' => 'Offensive user reported',
4026 4026
         '#active' => 1,
4027 4027
         '#weight' => '0',
4028 4028
         '#categories' => array(
4029
-          '0' => 'moderator notification',
4030
-          'boinc_standard' => 'boinc_standard',
4029
+            '0' => 'moderator notification',
4030
+            'boinc_standard' => 'boinc_standard',
4031 4031
         ),
4032 4032
         '#status' => 'default',
4033 4033
         '#conditions' => array(),
4034 4034
         '#actions' => array(
4035
-          '1' => array(
4035
+            '1' => array(
4036 4036
             '#type' => 'action',
4037 4037
             '#settings' => array(
4038
-              'from' => '',
4039
-              'subject' => 'Report of offensive user at [:global:site-name]',
4040
-              'message' => "[flagging_user:display-name] has reported [account:display-name] for inappropriate behavior:\r\n\r\n<?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/account/[account:uid]\r\n\r\nTotal current reports of this user: [account:flag-abuse-user-count]",
4041
-              '#eval input' => array(
4038
+                'from' => '',
4039
+                'subject' => 'Report of offensive user at [:global:site-name]',
4040
+                'message' => "[flagging_user:display-name] has reported [account:display-name] for inappropriate behavior:\r\n\r\n<?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/account/[account:uid]\r\n\r\nTotal current reports of this user: [account:flag-abuse-user-count]",
4041
+                '#eval input' => array(
4042 4042
                 'token_rules_input_evaluator' => array(
4043
-                  'subject' => array(
4043
+                    'subject' => array(
4044 4044
                     '0' => ':global',
4045
-                  ),
4046
-                  'message' => array(
4045
+                    ),
4046
+                    'message' => array(
4047 4047
                     '0' => 'flagging_user',
4048 4048
                     '1' => 'account',
4049 4049
                     '2' => ':global',
4050
-                  ),
4051
-                  'from' => array(
4050
+                    ),
4051
+                    'from' => array(
4052 4052
                     '0' => ':global',
4053
-                  ),
4053
+                    ),
4054 4054
                 ),
4055 4055
                 'rules_input_evaluator_php' => array(
4056
-                  'message' => array(),
4056
+                    'message' => array(),
4057
+                ),
4057 4058
                 ),
4058
-              ),
4059 4059
             ),
4060 4060
             '#name' => 'boinccore_rules_action_mail_to_moderators',
4061 4061
             '#info' => array(
4062
-              'label' => 'Notify moderators via email',
4063
-              'module' => 'BOINC core',
4064
-              'eval input' => array(
4062
+                'label' => 'Notify moderators via email',
4063
+                'module' => 'BOINC core',
4064
+                'eval input' => array(
4065 4065
                 '0' => 'subject',
4066 4066
                 '1' => 'message',
4067 4067
                 '2' => 'from',
4068
-              ),
4068
+                ),
4069 4069
             ),
4070 4070
             '#weight' => 0.0,
4071
-          ),
4071
+            ),
4072 4072
         ),
4073 4073
         '#version' => 6003,
4074
-      ),
4074
+        ),
4075 4075
     ),
4076
-  );
4076
+    );
4077 4077
 }
4078 4078
 
4079 4079
 /**
4080 4080
  * Implementation of hook_views_api().
4081 4081
  */
4082 4082
 function boinc_standard_views_api() {
4083
-  return array(
4083
+    return array(
4084 4084
     'api' => '2',
4085
-  );
4085
+    );
4086 4086
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
   $flags['abuse_comment_1'] = array(
32 32
     'content_type' => 'comment',
33 33
     'title' => 'Comment Abuse 1 SPAM',
34
-    'global' => FALSE,
34
+    'global' => false,
35 35
     'types' => array(
36 36
       '0' => 'forum',
37 37
       '1' => 'news',
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
   $flags['abuse_comment_2'] = array(
67 67
     'content_type' => 'comment',
68 68
     'title' => 'Comment Abuse 2 LINK',
69
-    'global' => FALSE,
69
+    'global' => false,
70 70
     'types' => array(
71 71
       '0' => 'forum',
72 72
       '1' => 'news',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
   $flags['abuse_comment_3'] = array(
102 102
     'content_type' => 'comment',
103 103
     'title' => 'Comment Abuse 3 Hostile',
104
-    'global' => FALSE,
104
+    'global' => false,
105 105
     'types' => array(
106 106
       '0' => 'forum',
107 107
       '1' => 'news',
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
   $flags['abuse_comment_4'] = array(
137 137
     'content_type' => 'comment',
138 138
     'title' => 'Comment Abuse 4 Not Kid Friendly',
139
-    'global' => FALSE,
139
+    'global' => false,
140 140
     'types' => array(
141 141
       '0' => 'forum',
142 142
       '1' => 'news',
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
   $flags['abuse_comment_5'] = array(
172 172
     'content_type' => 'comment',
173 173
     'title' => 'Comment Abuse 5 Other',
174
-    'global' => FALSE,
174
+    'global' => false,
175 175
     'types' => array(
176 176
       '0' => 'forum',
177 177
       '1' => 'news',
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
   $flags['abuse_node_1'] = array(
242 242
     'content_type' => 'node',
243 243
     'title' => 'Node Abuse 1 SPAM',
244
-    'global' => FALSE,
244
+    'global' => false,
245 245
     'types' => array(
246 246
       '0' => 'forum',
247 247
       '1' => 'news',
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
   $flags['abuse_node_2'] = array(
280 280
     'content_type' => 'node',
281 281
     'title' => 'Node Abuse 2 Link',
282
-    'global' => FALSE,
282
+    'global' => false,
283 283
     'types' => array(
284 284
       '0' => 'forum',
285 285
       '1' => 'news',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
   $flags['abuse_node_3'] = array(
318 318
     'content_type' => 'node',
319 319
     'title' => 'Node Abuse 3 Hostile',
320
-    'global' => FALSE,
320
+    'global' => false,
321 321
     'types' => array(
322 322
       '0' => 'forum',
323 323
       '1' => 'news',
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
   $flags['abuse_node_4'] = array(
356 356
     'content_type' => 'node',
357 357
     'title' => 'Node Abuse 4 Not Kid Friendly',
358
-    'global' => FALSE,
358
+    'global' => false,
359 359
     'types' => array(
360 360
       '0' => 'forum',
361 361
       '1' => 'news',
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
   $flags['abuse_node_5'] = array(
394 394
     'content_type' => 'node',
395 395
     'title' => 'Node Abuse 5 Other',
396
-    'global' => FALSE,
396
+    'global' => false,
397 397
     'types' => array(
398 398
       '0' => 'forum',
399 399
       '1' => 'news',
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
   $flags['abuse_node_meta'] = array(
432 432
     'content_type' => 'node',
433 433
     'title' => 'Node Abuse meta',
434
-    'global' => FALSE,
434
+    'global' => false,
435 435
     'types' => array(
436 436
       '0' => 'forum',
437 437
       '1' => 'news',
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
   $flags['abuse_user_1'] = array(
470 470
     'content_type' => 'user',
471 471
     'title' => 'User Abuse 1 SPAM',
472
-    'global' => FALSE,
472
+    'global' => false,
473 473
     'types' => array(),
474 474
     'flag_short' => 'Report User SPAM',
475 475
     'flag_long' => 'Report this user profile as SPAM.',
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
   $flags['abuse_user_2'] = array(
501 501
     'content_type' => 'user',
502 502
     'title' => 'User Abuse 2 Link',
503
-    'global' => FALSE,
503
+    'global' => false,
504 504
     'types' => array(),
505 505
     'flag_short' => 'Report as abusive link',
506 506
     'flag_long' => 'Report user profile as abusive link.',
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
   $flags['abuse_user_3'] = array(
532 532
     'content_type' => 'user',
533 533
     'title' => 'User Abuse 3 Not Kid Friendly',
534
-    'global' => FALSE,
534
+    'global' => false,
535 535
     'types' => array(),
536 536
     'flag_short' => 'Report as not kid-friendly',
537 537
     'flag_long' => 'Report this user profile as not kid-friendly.',
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
   $flags['abuse_user_4'] = array(
563 563
     'content_type' => 'user',
564 564
     'title' => 'User Abuse 4 Other',
565
-    'global' => FALSE,
565
+    'global' => false,
566 566
     'types' => array(),
567 567
     'flag_short' => 'Other',
568 568
     'flag_long' => 'Report this user profile - other reason.',
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
   $flags['abuse_user_meta'] = array(
594 594
     'content_type' => 'user',
595 595
     'title' => 'User Abuse Meta',
596
-    'global' => FALSE,
596
+    'global' => false,
597 597
     'types' => array(),
598 598
     'flag_short' => 'Report User',
599 599
     'flag_long' => 'Report User',
@@ -2089,7 +2089,7 @@  discard block
 block discarded – undo
2089 2089
             '#weight' => 0.0,
2090 2090
             '#info' => array(
2091 2091
               'label' => 'Compare two users: acting user (who edited the comment) is NOT the comment author',
2092
-              'label callback' => FALSE,
2092
+              'label callback' => false,
2093 2093
               'arguments' => array(
2094 2094
                 'user1' => array(
2095 2095
                   'type' => 'user',
@@ -2176,7 +2176,7 @@  discard block
 block discarded – undo
2176 2176
             '#name' => 'rules_condition_user_comparison',
2177 2177
             '#info' => array(
2178 2178
               'label' => 'Compare two users: acting user (who unhid the comment) is NOT the comment author',
2179
-              'label callback' => FALSE,
2179
+              'label callback' => false,
2180 2180
               'arguments' => array(
2181 2181
                 'user1' => array(
2182 2182
                   'type' => 'user',
@@ -2251,7 +2251,7 @@  discard block
 block discarded – undo
2251 2251
             '#negate' => 1,
2252 2252
             '#info' => array(
2253 2253
               'label' => 'Compare two users: acting user (who hid the comment) is NOT the comment author',
2254
-              'label callback' => FALSE,
2254
+              'label callback' => false,
2255 2255
               'arguments' => array(
2256 2256
                 'user1' => array(
2257 2257
                   'type' => 'user',
@@ -2343,7 +2343,7 @@  discard block
 block discarded – undo
2343 2343
             '#name' => 'rules_condition_user_hasrole',
2344 2344
             '#info' => array(
2345 2345
               'label' => 'User has role(s): administrator or moderator',
2346
-              'label callback' => FALSE,
2346
+              'label callback' => false,
2347 2347
               'arguments' => array(
2348 2348
                 'user' => array(
2349 2349
                   'type' => 'user',
@@ -2407,7 +2407,7 @@  discard block
 block discarded – undo
2407 2407
             '#weight' => 0.0,
2408 2408
             '#info' => array(
2409 2409
               'label' => 'PHP code: content changed',
2410
-              'label callback' => FALSE,
2410
+              'label callback' => false,
2411 2411
               'module' => 'PHP',
2412 2412
               'eval input' => array(
2413 2413
                 '0' => 'code',
@@ -2501,7 +2501,7 @@  discard block
 block discarded – undo
2501 2501
             '#name' => 'rules_condition_user_hasrole',
2502 2502
             '#info' => array(
2503 2503
               'label' => 'User has role(s): administrator or moderator',
2504
-              'label callback' => FALSE,
2504
+              'label callback' => false,
2505 2505
               'arguments' => array(
2506 2506
                 'user' => array(
2507 2507
                   'type' => 'user',
@@ -2566,7 +2566,7 @@  discard block
 block discarded – undo
2566 2566
             '#weight' => 0.0,
2567 2567
             '#info' => array(
2568 2568
               'label' => 'PHP code: node content unchanged',
2569
-              'label callback' => FALSE,
2569
+              'label callback' => false,
2570 2570
               'module' => 'PHP',
2571 2571
               'eval input' => array(
2572 2572
                 '0' => 'code',
@@ -2593,7 +2593,7 @@  discard block
 block discarded – undo
2593 2593
             '#weight' => 0.0,
2594 2594
             '#info' => array(
2595 2595
               'label' => 'PHP code: node status changed to hidden',
2596
-              'label callback' => FALSE,
2596
+              'label callback' => false,
2597 2597
               'module' => 'PHP',
2598 2598
               'eval input' => array(
2599 2599
                 '0' => 'code',
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
             '#name' => 'rules_condition_user_hasrole',
2689 2689
             '#info' => array(
2690 2690
               'label' => 'User has role(s): administrator or moderator',
2691
-              'label callback' => FALSE,
2691
+              'label callback' => false,
2692 2692
               'arguments' => array(
2693 2693
                 'user' => array(
2694 2694
                   'type' => 'user',
@@ -2752,7 +2752,7 @@  discard block
 block discarded – undo
2752 2752
             '#weight' => 0.0,
2753 2753
             '#info' => array(
2754 2754
               'label' => 'PHP code: node moved to new forum parent',
2755
-              'label callback' => FALSE,
2755
+              'label callback' => false,
2756 2756
               'module' => 'PHP',
2757 2757
               'eval input' => array(
2758 2758
                 '0' => 'code',
@@ -2846,7 +2846,7 @@  discard block
 block discarded – undo
2846 2846
             '#name' => 'rules_condition_user_hasrole',
2847 2847
             '#info' => array(
2848 2848
               'label' => 'User has role(s): administrator or moderator',
2849
-              'label callback' => FALSE,
2849
+              'label callback' => false,
2850 2850
               'arguments' => array(
2851 2851
                 'user' => array(
2852 2852
                   'type' => 'user',
@@ -2926,7 +2926,7 @@  discard block
 block discarded – undo
2926 2926
             '#name' => 'rules_condition_custom_php',
2927 2927
             '#info' => array(
2928 2928
               'label' => 'PHP code: node content is unchanged',
2929
-              'label callback' => FALSE,
2929
+              'label callback' => false,
2930 2930
               'module' => 'PHP',
2931 2931
               'eval input' => array(
2932 2932
                 '0' => 'code',
@@ -2953,7 +2953,7 @@  discard block
 block discarded – undo
2953 2953
             '#name' => 'rules_condition_custom_php',
2954 2954
             '#info' => array(
2955 2955
               'label' => 'PHP code: node status changed to unhidden',
2956
-              'label callback' => FALSE,
2956
+              'label callback' => false,
2957 2957
               'module' => 'PHP',
2958 2958
               'eval input' => array(
2959 2959
                 '0' => 'code',
@@ -3032,7 +3032,7 @@  discard block
 block discarded – undo
3032 3032
             '#name' => 'rules_condition_user_hasrole',
3033 3033
             '#info' => array(
3034 3034
               'label' => 'User has role(s): administrator or moderator',
3035
-              'label callback' => FALSE,
3035
+              'label callback' => false,
3036 3036
               'arguments' => array(
3037 3037
                 'user' => array(
3038 3038
                   'type' => 'user',
@@ -3097,7 +3097,7 @@  discard block
 block discarded – undo
3097 3097
             '#weight' => 0.0,
3098 3098
             '#info' => array(
3099 3099
               'label' => 'PHP code: node content unchanged',
3100
-              'label callback' => FALSE,
3100
+              'label callback' => false,
3101 3101
               'module' => 'PHP',
3102 3102
               'eval input' => array(
3103 3103
                 '0' => 'code',
@@ -3124,7 +3124,7 @@  discard block
 block discarded – undo
3124 3124
             '#weight' => 0.0,
3125 3125
             '#info' => array(
3126 3126
               'label' => 'PHP code: node locked',
3127
-              'label callback' => FALSE,
3127
+              'label callback' => false,
3128 3128
               'module' => 'PHP',
3129 3129
               'eval input' => array(
3130 3130
                 '0' => 'code',
@@ -3218,7 +3218,7 @@  discard block
 block discarded – undo
3218 3218
             '#name' => 'rules_condition_user_hasrole',
3219 3219
             '#info' => array(
3220 3220
               'label' => 'User has role(s): administrator or moderator',
3221
-              'label callback' => FALSE,
3221
+              'label callback' => false,
3222 3222
               'arguments' => array(
3223 3223
                 'user' => array(
3224 3224
                   'type' => 'user',
@@ -3283,7 +3283,7 @@  discard block
 block discarded – undo
3283 3283
             '#weight' => 0.0,
3284 3284
             '#info' => array(
3285 3285
               'label' => 'PHP code: node content unchanged',
3286
-              'label callback' => FALSE,
3286
+              'label callback' => false,
3287 3287
               'module' => 'PHP',
3288 3288
               'eval input' => array(
3289 3289
                 '0' => 'code',
@@ -3310,7 +3310,7 @@  discard block
 block discarded – undo
3310 3310
             '#weight' => 0.0,
3311 3311
             '#info' => array(
3312 3312
               'label' => 'PHP code: node made sticky',
3313
-              'label callback' => FALSE,
3313
+              'label callback' => false,
3314 3314
               'module' => 'PHP',
3315 3315
               'eval input' => array(
3316 3316
                 '0' => 'code',
@@ -3404,7 +3404,7 @@  discard block
 block discarded – undo
3404 3404
             '#name' => 'rules_condition_user_hasrole',
3405 3405
             '#info' => array(
3406 3406
               'label' => 'User has role(s): administrator or moderator',
3407
-              'label callback' => FALSE,
3407
+              'label callback' => false,
3408 3408
               'arguments' => array(
3409 3409
                 'user' => array(
3410 3410
                   'type' => 'user',
@@ -3469,7 +3469,7 @@  discard block
 block discarded – undo
3469 3469
             '#weight' => 0.0,
3470 3470
             '#info' => array(
3471 3471
               'label' => 'PHP code: node content unchanged',
3472
-              'label callback' => FALSE,
3472
+              'label callback' => false,
3473 3473
               'module' => 'PHP',
3474 3474
               'eval input' => array(
3475 3475
                 '0' => 'code',
@@ -3496,7 +3496,7 @@  discard block
 block discarded – undo
3496 3496
             '#weight' => 0.0,
3497 3497
             '#info' => array(
3498 3498
               'label' => 'PHP code: node made sticky',
3499
-              'label callback' => FALSE,
3499
+              'label callback' => false,
3500 3500
               'module' => 'PHP',
3501 3501
               'eval input' => array(
3502 3502
                 '0' => 'code',
@@ -3591,7 +3591,7 @@  discard block
 block discarded – undo
3591 3591
             '#name' => 'rules_condition_user_hasrole',
3592 3592
             '#info' => array(
3593 3593
               'label' => 'User has role(s): administrator or moderator',
3594
-              'label callback' => FALSE,
3594
+              'label callback' => false,
3595 3595
               'arguments' => array(
3596 3596
                 'user' => array(
3597 3597
                   'type' => 'user',
@@ -3655,7 +3655,7 @@  discard block
 block discarded – undo
3655 3655
             '#weight' => 0.0,
3656 3656
             '#info' => array(
3657 3657
               'label' => 'PHP code: title changed',
3658
-              'label callback' => FALSE,
3658
+              'label callback' => false,
3659 3659
               'module' => 'PHP',
3660 3660
               'eval input' => array(
3661 3661
                 '0' => 'code',
@@ -3749,7 +3749,7 @@  discard block
 block discarded – undo
3749 3749
             '#name' => 'rules_condition_user_hasrole',
3750 3750
             '#info' => array(
3751 3751
               'label' => 'User has role(s): administrator or moderator',
3752
-              'label callback' => FALSE,
3752
+              'label callback' => false,
3753 3753
               'arguments' => array(
3754 3754
                 'user' => array(
3755 3755
                   'type' => 'user',
@@ -3814,7 +3814,7 @@  discard block
 block discarded – undo
3814 3814
             '#weight' => 0.0,
3815 3815
             '#info' => array(
3816 3816
               'label' => 'PHP code: node content unchanged',
3817
-              'label callback' => FALSE,
3817
+              'label callback' => false,
3818 3818
               'module' => 'PHP',
3819 3819
               'eval input' => array(
3820 3820
                 '0' => 'code',
@@ -3841,7 +3841,7 @@  discard block
 block discarded – undo
3841 3841
             '#weight' => 0.0,
3842 3842
             '#info' => array(
3843 3843
               'label' => 'PHP code: node unlocked',
3844
-              'label callback' => FALSE,
3844
+              'label callback' => false,
3845 3845
               'module' => 'PHP',
3846 3846
               'eval input' => array(
3847 3847
                 '0' => 'code',
Please login to merge, or discard this patch.