Passed
Pull Request — master (#4777)
by David
08:50
created
drupal/sites/all/features/boinc_standard/boinc_standard.views_default.inc 1 patch
Indentation   +210 added lines, -210 removed lines patch added patch discarded remove patch
@@ -4,22 +4,22 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function boinc_standard_views_default_views() {
7
-  $views = array();
7
+    $views = array();
8 8
 
9
-  // Exported view: admin_user_search
10
-  $view = new view;
11
-  $view->name = 'admin_user_search';
12
-  $view->description = 'Administrator User Search';
13
-  $view->tag = '';
14
-  $view->base_table = 'users';
15
-  $view->core = 6;
16
-  $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
-  $handler = $view->new_display('default', 'Defaults', 'default');
19
-  $handler->override_option('fields', array(
9
+    // Exported view: admin_user_search
10
+    $view = new view;
11
+    $view->name = 'admin_user_search';
12
+    $view->description = 'Administrator User Search';
13
+    $view->tag = '';
14
+    $view->base_table = 'users';
15
+    $view->core = 6;
16
+    $view->api_version = '2';
17
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
+    $handler = $view->new_display('default', 'Defaults', 'default');
19
+    $handler->override_option('fields', array(
20 20
     'uid' => array(
21
-      'label' => 'Uid',
22
-      'alter' => array(
21
+        'label' => 'Uid',
22
+        'alter' => array(
23 23
         'alter_text' => 0,
24 24
         'text' => '',
25 25
         'make_link' => 0,
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         'ellipsis' => 1,
39 39
         'html' => 0,
40 40
         'strip_tags' => 0,
41
-      ),
42
-      'empty' => '',
43
-      'hide_empty' => 0,
44
-      'empty_zero' => 0,
45
-      'hide_alter_empty' => 1,
46
-      'link_to_user' => 0,
47
-      'exclude' => 0,
48
-      'id' => 'uid',
49
-      'table' => 'users',
50
-      'field' => 'uid',
51
-      'relationship' => 'none',
41
+        ),
42
+        'empty' => '',
43
+        'hide_empty' => 0,
44
+        'empty_zero' => 0,
45
+        'hide_alter_empty' => 1,
46
+        'link_to_user' => 0,
47
+        'exclude' => 0,
48
+        'id' => 'uid',
49
+        'table' => 'users',
50
+        'field' => 'uid',
51
+        'relationship' => 'none',
52 52
     ),
53 53
     'name' => array(
54
-      'label' => 'Name',
55
-      'alter' => array(
54
+        'label' => 'Name',
55
+        'alter' => array(
56 56
         'alter_text' => 0,
57 57
         'text' => '',
58 58
         'make_link' => 1,
@@ -71,23 +71,23 @@  discard block
 block discarded – undo
71 71
         'ellipsis' => 1,
72 72
         'html' => 0,
73 73
         'strip_tags' => 0,
74
-      ),
75
-      'empty' => '',
76
-      'hide_empty' => 0,
77
-      'empty_zero' => 0,
78
-      'hide_alter_empty' => 1,
79
-      'link_to_user' => 0,
80
-      'overwrite_anonymous' => 0,
81
-      'anonymous_text' => '',
82
-      'exclude' => 0,
83
-      'id' => 'name',
84
-      'table' => 'users',
85
-      'field' => 'name',
86
-      'relationship' => 'none',
74
+        ),
75
+        'empty' => '',
76
+        'hide_empty' => 0,
77
+        'empty_zero' => 0,
78
+        'hide_alter_empty' => 1,
79
+        'link_to_user' => 0,
80
+        'overwrite_anonymous' => 0,
81
+        'anonymous_text' => '',
82
+        'exclude' => 0,
83
+        'id' => 'name',
84
+        'table' => 'users',
85
+        'field' => 'name',
86
+        'relationship' => 'none',
87 87
     ),
88 88
     'phpcode' => array(
89
-      'label' => 'BOINC user name',
90
-      'alter' => array(
89
+        'label' => 'BOINC user name',
90
+        'alter' => array(
91 91
         'alter_text' => 0,
92 92
         'text' => '',
93 93
         'make_link' => 1,
@@ -106,29 +106,29 @@  discard block
 block discarded – undo
106 106
         'ellipsis' => 1,
107 107
         'html' => 0,
108 108
         'strip_tags' => 0,
109
-      ),
110
-      'empty' => '',
111
-      'hide_empty' => 0,
112
-      'empty_zero' => 0,
113
-      'hide_alter_empty' => 1,
114
-      'value' => '<?php
109
+        ),
110
+        'empty' => '',
111
+        'hide_empty' => 0,
112
+        'empty_zero' => 0,
113
+        'hide_alter_empty' => 1,
114
+        'value' => '<?php
115 115
   $myuser = user_load($data->uid);
116 116
   echo $myuser->boincuser_name;
117 117
 ?>',
118
-      'exclude' => 0,
119
-      'id' => 'phpcode',
120
-      'table' => 'customfield',
121
-      'field' => 'phpcode',
122
-      'relationship' => 'none',
118
+        'exclude' => 0,
119
+        'id' => 'phpcode',
120
+        'table' => 'customfield',
121
+        'field' => 'phpcode',
122
+        'relationship' => 'none',
123 123
     ),
124 124
     'mail' => array(
125
-      'id' => 'mail',
126
-      'table' => 'users',
127
-      'field' => 'mail',
125
+        'id' => 'mail',
126
+        'table' => 'users',
127
+        'field' => 'mail',
128 128
     ),
129 129
     'rid' => array(
130
-      'label' => 'Roles',
131
-      'alter' => array(
130
+        'label' => 'Roles',
131
+        'alter' => array(
132 132
         'alter_text' => 0,
133 133
         'text' => '',
134 134
         'make_link' => 0,
@@ -147,22 +147,22 @@  discard block
 block discarded – undo
147 147
         'ellipsis' => 1,
148 148
         'html' => 0,
149 149
         'strip_tags' => 0,
150
-      ),
151
-      'empty' => '',
152
-      'hide_empty' => 0,
153
-      'empty_zero' => 0,
154
-      'hide_alter_empty' => 1,
155
-      'type' => 'separator',
156
-      'separator' => ', ',
157
-      'exclude' => 0,
158
-      'id' => 'rid',
159
-      'table' => 'users_roles',
160
-      'field' => 'rid',
161
-      'relationship' => 'none',
150
+        ),
151
+        'empty' => '',
152
+        'hide_empty' => 0,
153
+        'empty_zero' => 0,
154
+        'hide_alter_empty' => 1,
155
+        'type' => 'separator',
156
+        'separator' => ', ',
157
+        'exclude' => 0,
158
+        'id' => 'rid',
159
+        'table' => 'users_roles',
160
+        'field' => 'rid',
161
+        'relationship' => 'none',
162 162
     ),
163 163
     'status' => array(
164
-      'label' => 'Banned',
165
-      'alter' => array(
164
+        'label' => 'Banned',
165
+        'alter' => array(
166 166
         'alter_text' => 0,
167 167
         'text' => '',
168 168
         'make_link' => 0,
@@ -181,22 +181,22 @@  discard block
 block discarded – undo
181 181
         'ellipsis' => 1,
182 182
         'html' => 0,
183 183
         'strip_tags' => 0,
184
-      ),
185
-      'empty' => '',
186
-      'hide_empty' => 0,
187
-      'empty_zero' => 0,
188
-      'hide_alter_empty' => 1,
189
-      'type' => 'yes-no',
190
-      'not' => 1,
191
-      'exclude' => 0,
192
-      'id' => 'status',
193
-      'table' => 'users',
194
-      'field' => 'status',
195
-      'relationship' => 'none',
184
+        ),
185
+        'empty' => '',
186
+        'hide_empty' => 0,
187
+        'empty_zero' => 0,
188
+        'hide_alter_empty' => 1,
189
+        'type' => 'yes-no',
190
+        'not' => 1,
191
+        'exclude' => 0,
192
+        'id' => 'status',
193
+        'table' => 'users',
194
+        'field' => 'status',
195
+        'relationship' => 'none',
196 196
     ),
197 197
     'access' => array(
198
-      'label' => 'Last access',
199
-      'alter' => array(
198
+        'label' => 'Last access',
199
+        'alter' => array(
200 200
         'alter_text' => 0,
201 201
         'text' => '',
202 202
         'make_link' => 0,
@@ -215,22 +215,22 @@  discard block
 block discarded – undo
215 215
         'ellipsis' => 1,
216 216
         'html' => 0,
217 217
         'strip_tags' => 0,
218
-      ),
219
-      'empty' => '',
220
-      'hide_empty' => 0,
221
-      'empty_zero' => 0,
222
-      'hide_alter_empty' => 1,
223
-      'date_format' => 'time ago',
224
-      'custom_date_format' => '',
225
-      'exclude' => 0,
226
-      'id' => 'access',
227
-      'table' => 'users',
228
-      'field' => 'access',
229
-      'relationship' => 'none',
218
+        ),
219
+        'empty' => '',
220
+        'hide_empty' => 0,
221
+        'empty_zero' => 0,
222
+        'hide_alter_empty' => 1,
223
+        'date_format' => 'time ago',
224
+        'custom_date_format' => '',
225
+        'exclude' => 0,
226
+        'id' => 'access',
227
+        'table' => 'users',
228
+        'field' => 'access',
229
+        'relationship' => 'none',
230 230
     ),
231 231
     'login' => array(
232
-      'label' => 'Last login',
233
-      'alter' => array(
232
+        'label' => 'Last login',
233
+        'alter' => array(
234 234
         'alter_text' => 0,
235 235
         'text' => '',
236 236
         'make_link' => 0,
@@ -249,22 +249,22 @@  discard block
 block discarded – undo
249 249
         'ellipsis' => 1,
250 250
         'html' => 0,
251 251
         'strip_tags' => 0,
252
-      ),
253
-      'empty' => '',
254
-      'hide_empty' => 0,
255
-      'empty_zero' => 0,
256
-      'hide_alter_empty' => 1,
257
-      'date_format' => 'time ago',
258
-      'custom_date_format' => '',
259
-      'exclude' => 0,
260
-      'id' => 'login',
261
-      'table' => 'users',
262
-      'field' => 'login',
263
-      'relationship' => 'none',
252
+        ),
253
+        'empty' => '',
254
+        'hide_empty' => 0,
255
+        'empty_zero' => 0,
256
+        'hide_alter_empty' => 1,
257
+        'date_format' => 'time ago',
258
+        'custom_date_format' => '',
259
+        'exclude' => 0,
260
+        'id' => 'login',
261
+        'table' => 'users',
262
+        'field' => 'login',
263
+        'relationship' => 'none',
264 264
     ),
265 265
     'created' => array(
266
-      'label' => 'Created date',
267
-      'alter' => array(
266
+        'label' => 'Created date',
267
+        'alter' => array(
268 268
         'alter_text' => 0,
269 269
         'text' => '',
270 270
         'make_link' => 0,
@@ -283,22 +283,22 @@  discard block
 block discarded – undo
283 283
         'ellipsis' => 1,
284 284
         'html' => 0,
285 285
         'strip_tags' => 0,
286
-      ),
287
-      'empty' => '',
288
-      'hide_empty' => 0,
289
-      'empty_zero' => 0,
290
-      'hide_alter_empty' => 1,
291
-      'date_format' => 'time ago',
292
-      'custom_date_format' => '',
293
-      'exclude' => 0,
294
-      'id' => 'created',
295
-      'table' => 'users',
296
-      'field' => 'created',
297
-      'relationship' => 'none',
286
+        ),
287
+        'empty' => '',
288
+        'hide_empty' => 0,
289
+        'empty_zero' => 0,
290
+        'hide_alter_empty' => 1,
291
+        'date_format' => 'time ago',
292
+        'custom_date_format' => '',
293
+        'exclude' => 0,
294
+        'id' => 'created',
295
+        'table' => 'users',
296
+        'field' => 'created',
297
+        'relationship' => 'none',
298 298
     ),
299 299
     'edit_node' => array(
300
-      'label' => '',
301
-      'alter' => array(
300
+        'label' => '',
301
+        'alter' => array(
302 302
         'alter_text' => 0,
303 303
         'text' => '',
304 304
         'make_link' => 0,
@@ -317,143 +317,143 @@  discard block
 block discarded – undo
317 317
         'ellipsis' => 1,
318 318
         'html' => 0,
319 319
         'strip_tags' => 0,
320
-      ),
321
-      'empty' => '',
322
-      'hide_empty' => 0,
323
-      'empty_zero' => 0,
324
-      'hide_alter_empty' => 1,
325
-      'text' => '',
326
-      'exclude' => 0,
327
-      'id' => 'edit_node',
328
-      'table' => 'users',
329
-      'field' => 'edit_node',
330
-      'relationship' => 'none',
320
+        ),
321
+        'empty' => '',
322
+        'hide_empty' => 0,
323
+        'empty_zero' => 0,
324
+        'hide_alter_empty' => 1,
325
+        'text' => '',
326
+        'exclude' => 0,
327
+        'id' => 'edit_node',
328
+        'table' => 'users',
329
+        'field' => 'edit_node',
330
+        'relationship' => 'none',
331 331
     ),
332
-  ));
333
-  $handler->override_option('filters', array(
332
+    ));
333
+    $handler->override_option('filters', array(
334 334
     'name' => array(
335
-      'operator' => 'contains',
336
-      'value' => '',
337
-      'group' => '0',
338
-      'exposed' => TRUE,
339
-      'expose' => array(
335
+        'operator' => 'contains',
336
+        'value' => '',
337
+        'group' => '0',
338
+        'exposed' => TRUE,
339
+        'expose' => array(
340 340
         'use_operator' => 0,
341 341
         'operator' => 'name_op',
342 342
         'identifier' => 'name',
343 343
         'label' => 'Part of a User\'s name',
344 344
         'remember' => 0,
345
-      ),
346
-      'case' => 0,
347
-      'id' => 'name',
348
-      'table' => 'users',
349
-      'field' => 'name',
350
-      'relationship' => 'none',
345
+        ),
346
+        'case' => 0,
347
+        'id' => 'name',
348
+        'table' => 'users',
349
+        'field' => 'name',
350
+        'relationship' => 'none',
351 351
     ),
352 352
     'mail' => array(
353
-      'operator' => 'contains',
354
-      'value' => '',
355
-      'group' => '0',
356
-      'exposed' => TRUE,
357
-      'expose' => array(
353
+        'operator' => 'contains',
354
+        'value' => '',
355
+        'group' => '0',
356
+        'exposed' => TRUE,
357
+        'expose' => array(
358 358
         'use_operator' => 0,
359 359
         'operator' => 'mail_op',
360 360
         'identifier' => 'mail',
361 361
         'label' => 'Part of a User\'s E-mail',
362 362
         'remember' => 0,
363
-      ),
364
-      'case' => 0,
365
-      'id' => 'mail',
366
-      'table' => 'users',
367
-      'field' => 'mail',
368
-      'relationship' => 'none',
363
+        ),
364
+        'case' => 0,
365
+        'id' => 'mail',
366
+        'table' => 'users',
367
+        'field' => 'mail',
368
+        'relationship' => 'none',
369 369
     ),
370
-  ));
371
-  $handler->override_option('access', array(
370
+    ));
371
+    $handler->override_option('access', array(
372 372
     'type' => 'perm',
373 373
     'perm' => 'administer users',
374
-  ));
375
-  $handler->override_option('cache', array(
374
+    ));
375
+    $handler->override_option('cache', array(
376 376
     'type' => 'none',
377
-  ));
378
-  $handler->override_option('use_pager', '1');
379
-  $handler->override_option('style_plugin', 'table');
380
-  $handler->override_option('style_options', array(
377
+    ));
378
+    $handler->override_option('use_pager', '1');
379
+    $handler->override_option('style_plugin', 'table');
380
+    $handler->override_option('style_options', array(
381 381
     'grouping' => '',
382 382
     'override' => 1,
383 383
     'sticky' => 0,
384 384
     'order' => 'desc',
385 385
     'summary' => '',
386 386
     'columns' => array(
387
-      'uid' => 'uid',
388
-      'name' => 'name',
389
-      'phpcode' => 'phpcode',
390
-      'mail' => 'mail',
391
-      'rid' => 'rid',
392
-      'status' => 'status',
393
-      'access' => 'access',
394
-      'login' => 'login',
395
-      'created' => 'created',
396
-      'edit_node' => 'edit_node',
387
+        'uid' => 'uid',
388
+        'name' => 'name',
389
+        'phpcode' => 'phpcode',
390
+        'mail' => 'mail',
391
+        'rid' => 'rid',
392
+        'status' => 'status',
393
+        'access' => 'access',
394
+        'login' => 'login',
395
+        'created' => 'created',
396
+        'edit_node' => 'edit_node',
397 397
     ),
398 398
     'info' => array(
399
-      'uid' => array(
399
+        'uid' => array(
400 400
         'sortable' => 1,
401 401
         'separator' => '',
402
-      ),
403
-      'name' => array(
402
+        ),
403
+        'name' => array(
404 404
         'sortable' => 1,
405 405
         'separator' => '',
406
-      ),
407
-      'phpcode' => array(
406
+        ),
407
+        'phpcode' => array(
408 408
         'separator' => '',
409
-      ),
410
-      'mail' => array(
409
+        ),
410
+        'mail' => array(
411 411
         'sortable' => 1,
412 412
         'separator' => '',
413
-      ),
414
-      'rid' => array(
413
+        ),
414
+        'rid' => array(
415 415
         'separator' => '',
416
-      ),
417
-      'status' => array(
416
+        ),
417
+        'status' => array(
418 418
         'sortable' => 1,
419 419
         'separator' => '',
420
-      ),
421
-      'access' => array(
420
+        ),
421
+        'access' => array(
422 422
         'sortable' => 1,
423 423
         'separator' => '',
424
-      ),
425
-      'login' => array(
424
+        ),
425
+        'login' => array(
426 426
         'sortable' => 1,
427 427
         'separator' => '',
428
-      ),
429
-      'created' => array(
428
+        ),
429
+        'created' => array(
430 430
         'sortable' => 1,
431 431
         'separator' => '',
432
-      ),
433
-      'edit_node' => array(
432
+        ),
433
+        'edit_node' => array(
434 434
         'separator' => '',
435
-      ),
435
+        ),
436 436
     ),
437 437
     'default' => 'access',
438
-  ));
439
-  $handler = $view->new_display('page', 'Page', 'page_1');
440
-  $handler->override_option('path', 'admin/user/search');
441
-  $handler->override_option('menu', array(
438
+    ));
439
+    $handler = $view->new_display('page', 'Page', 'page_1');
440
+    $handler->override_option('path', 'admin/user/search');
441
+    $handler->override_option('menu', array(
442 442
     'type' => 'normal',
443 443
     'title' => 'User search',
444 444
     'description' => 'Find users by partial name or email address',
445 445
     'weight' => '0',
446 446
     'name' => 'navigation',
447
-  ));
448
-  $handler->override_option('tab_options', array(
447
+    ));
448
+    $handler->override_option('tab_options', array(
449 449
     'type' => 'none',
450 450
     'title' => '',
451 451
     'description' => '',
452 452
     'weight' => 0,
453 453
     'name' => 'navigation',
454
-  ));
454
+    ));
455 455
 
456
-  $views[$view->name] = $view;
456
+    $views[$view->name] = $view;
457 457
 
458
-  return $views;
458
+    return $views;
459 459
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/private_messages/private_messages.strongarm.inc 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_strongarm().
5 5
  */
6 6
 function private_messages_strongarm() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  $strongarm = new stdClass;
10
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
-  $strongarm->api_version = 1;
12
-  $strongarm->name = 'pm_email_notify_body';
13
-  $strongarm->value = 'Hi !boincuser_name,
9
+    $strongarm = new stdClass;
10
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
11
+    $strongarm->api_version = 1;
12
+    $strongarm->name = 'pm_email_notify_body';
13
+    $strongarm->value = 'Hi !boincuser_name,
14 14
 
15 15
 This is an automatic reminder from the site !site. You have received a new private message from !author_boincuser_name.
16 16
 
@@ -19,21 +19,21 @@  discard block
 block discarded – undo
19 19
 
20 20
 If you don\'t want to receive these emails again, change your preferences here:
21 21
 !settings';
22
-  $export['pm_email_notify_body'] = $strongarm;
23
-
24
-  $strongarm = new stdClass;
25
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
26
-  $strongarm->api_version = 1;
27
-  $strongarm->name = 'pm_email_notify_default';
28
-  $strongarm->value = 1;
29
-  $export['pm_email_notify_default'] = $strongarm;
30
-
31
-  $strongarm = new stdClass;
32
-  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
33
-  $strongarm->api_version = 1;
34
-  $strongarm->name = 'pm_email_notify_subject';
35
-  $strongarm->value = 'New private message at !site.';
36
-  $export['pm_email_notify_subject'] = $strongarm;
37
-
38
-  return $export;
22
+    $export['pm_email_notify_body'] = $strongarm;
23
+
24
+    $strongarm = new stdClass;
25
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
26
+    $strongarm->api_version = 1;
27
+    $strongarm->name = 'pm_email_notify_default';
28
+    $strongarm->value = 1;
29
+    $export['pm_email_notify_default'] = $strongarm;
30
+
31
+    $strongarm = new stdClass;
32
+    $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
33
+    $strongarm->api_version = 1;
34
+    $strongarm->name = 'pm_email_notify_subject';
35
+    $strongarm->value = 'New private message at !site.';
36
+    $export['pm_email_notify_subject'] = $strongarm;
37
+
38
+    return $export;
39 39
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/private_messages/private_messages.features.inc 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
  * Implementation of hook_ctools_plugin_api().
5 5
  */
6 6
 function private_messages_ctools_plugin_api() {
7
-  list($module, $api) = func_get_args();
8
-  if ($module == "panels_mini" && $api == "panels_default") {
7
+    list($module, $api) = func_get_args();
8
+    if ($module == "panels_mini" && $api == "panels_default") {
9 9
     return array("version" => 1);
10
-  }
11
-  else if ($module == "strongarm" && $api == "strongarm") {
10
+    }
11
+    else if ($module == "strongarm" && $api == "strongarm") {
12 12
     return array("version" => 1);
13
-  }
13
+    }
14 14
 }
Please login to merge, or discard this patch.
html/ops/manage_app_versions.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@
 block discarded – undo
62 62
     start_table("");
63 63
     table_header(
64 64
         "ID #<br><small>click for details</small>",
65
-      "Application<br><small>click for details</small>",
66
-      "Version",
67
-      "Platform",
68
-      "Plan class",
69
-      "minimum<br>client version",
70
-      "maximum<br>client version",
71
-      "beta?",
72
-      "deprecated?",
73
-      ""
65
+        "Application<br><small>click for details</small>",
66
+        "Version",
67
+        "Platform",
68
+        "Plan class",
69
+        "minimum<br>client version",
70
+        "maximum<br>client version",
71
+        "beta?",
72
+        "deprecated?",
73
+        ""
74 74
     );
75 75
     $clause = $all?"true":"deprecated = 0";
76 76
     $avs = BoincAppVersion::enum(
Please login to merge, or discard this patch.
global_search_solr/global_search_solr.features.fe_block_settings.inc 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_default_fe_block_settings().
5 5
  */
6 6
 function global_search_solr_default_fe_block_settings() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  // boinc
10
-  $theme = array();
9
+    // boinc
10
+    $theme = array();
11 11
 
12
-  $theme['apachesolr_search-sort'] = array(
12
+    $theme['apachesolr_search-sort'] = array(
13 13
     'module' => 'apachesolr_search',
14 14
     'delta' => 'sort',
15 15
     'theme' => 'boinc',
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     'pages' => 'search/team/*',
23 23
     'title' => '',
24 24
     'cache' => '-1',
25
-  );
25
+    );
26 26
 
27
-  $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
27
+    $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
28 28
     'module' => 'facetapi',
29 29
     'delta' => '7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J',
30 30
     'theme' => 'boinc',
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
     'pages' => '',
38 38
     'title' => '',
39 39
     'cache' => '-1',
40
-  );
40
+    );
41 41
 
42
-  $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
42
+    $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
43 43
     'module' => 'facetapi',
44 44
     'delta' => 'GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu',
45 45
     'theme' => 'boinc',
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
     'pages' => 'search/team/*',
53 53
     'title' => '',
54 54
     'cache' => '-1',
55
-  );
55
+    );
56 56
 
57
-  $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
57
+    $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
58 58
     'module' => 'facetapi',
59 59
     'delta' => 'WtseAVugB1EhxGslwR3XIwoa0sVTttYt',
60 60
     'theme' => 'boinc',
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     'pages' => 'search/team/*',
68 68
     'title' => '',
69 69
     'cache' => '-1',
70
-  );
70
+    );
71 71
 
72
-  $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
72
+    $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
73 73
     'module' => 'facetapi',
74 74
     'delta' => 'wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j',
75 75
     'theme' => 'boinc',
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
     'pages' => '',
83 83
     'title' => '',
84 84
     'cache' => '-1',
85
-  );
85
+    );
86 86
 
87
-  $theme['boinc_solr_search-boinc_solr_search_0'] = array(
87
+    $theme['boinc_solr_search-boinc_solr_search_0'] = array(
88 88
     'module' => 'boinc_solr_search',
89 89
     'delta' => 'boinc_solr_search_0',
90 90
     'theme' => 'boinc',
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
     'pages' => 'search/*',
98 98
     'title' => '',
99 99
     'cache' => '1',
100
-  );
100
+    );
101 101
 
102
-  $export['boinc'] = $theme;
102
+    $export['boinc'] = $theme;
103 103
 
104
-  // einstein
105
-  $theme = array();
104
+    // einstein
105
+    $theme = array();
106 106
 
107
-  $theme['apachesolr_search-sort'] = array(
107
+    $theme['apachesolr_search-sort'] = array(
108 108
     'module' => 'apachesolr_search',
109 109
     'delta' => 'sort',
110 110
     'theme' => 'einstein',
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
     'pages' => 'search/team/*',
118 118
     'title' => '',
119 119
     'cache' => '-1',
120
-  );
120
+    );
121 121
 
122
-  $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
122
+    $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
123 123
     'module' => 'facetapi',
124 124
     'delta' => '7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J',
125 125
     'theme' => 'einstein',
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
     'pages' => '',
133 133
     'title' => '',
134 134
     'cache' => '-1',
135
-  );
135
+    );
136 136
 
137
-  $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
137
+    $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
138 138
     'module' => 'facetapi',
139 139
     'delta' => 'GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu',
140 140
     'theme' => 'einstein',
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
     'pages' => 'search/team/*',
148 148
     'title' => '',
149 149
     'cache' => '-1',
150
-  );
150
+    );
151 151
 
152
-  $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
152
+    $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
153 153
     'module' => 'facetapi',
154 154
     'delta' => 'WtseAVugB1EhxGslwR3XIwoa0sVTttYt',
155 155
     'theme' => 'einstein',
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
     'pages' => 'search/team/*',
163 163
     'title' => '',
164 164
     'cache' => '-1',
165
-  );
165
+    );
166 166
 
167
-  $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
167
+    $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
168 168
     'module' => 'facetapi',
169 169
     'delta' => 'wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j',
170 170
     'theme' => 'einstein',
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
     'pages' => '',
178 178
     'title' => '',
179 179
     'cache' => '-1',
180
-  );
180
+    );
181 181
 
182
-  $theme['boinc_solr_search-boinc_solr_search_0'] = array(
182
+    $theme['boinc_solr_search-boinc_solr_search_0'] = array(
183 183
     'module' => 'boinc_solr_search',
184 184
     'delta' => 'boinc_solr_search_0',
185 185
     'theme' => 'einstein',
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
     'pages' => 'search/*',
193 193
     'title' => '',
194 194
     'cache' => '1',
195
-  );
195
+    );
196 196
 
197
-  $export['einstein'] = $theme;
197
+    $export['einstein'] = $theme;
198 198
 
199
-  // garland
200
-  $theme = array();
199
+    // garland
200
+    $theme = array();
201 201
 
202
-  $theme['apachesolr_search-sort'] = array(
202
+    $theme['apachesolr_search-sort'] = array(
203 203
     'module' => 'apachesolr_search',
204 204
     'delta' => 'sort',
205 205
     'theme' => 'garland',
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
     'pages' => 'search/team/*',
213 213
     'title' => '',
214 214
     'cache' => '-1',
215
-  );
215
+    );
216 216
 
217
-  $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
217
+    $theme['facetapi-7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J'] = array(
218 218
     'module' => 'facetapi',
219 219
     'delta' => '7ML0OK3vgYXeSgMyfPmmpnz2TBw9jZ7J',
220 220
     'theme' => 'garland',
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
     'pages' => '',
228 228
     'title' => '',
229 229
     'cache' => '-1',
230
-  );
230
+    );
231 231
 
232
-  $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
232
+    $theme['facetapi-GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu'] = array(
233 233
     'module' => 'facetapi',
234 234
     'delta' => 'GiIy4zr9Gu0ZSa0bumw1Y9qIIpIDf1wu',
235 235
     'theme' => 'garland',
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
     'pages' => 'search/team/*',
243 243
     'title' => '',
244 244
     'cache' => '-1',
245
-  );
245
+    );
246 246
 
247
-  $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
247
+    $theme['facetapi-WtseAVugB1EhxGslwR3XIwoa0sVTttYt'] = array(
248 248
     'module' => 'facetapi',
249 249
     'delta' => 'WtseAVugB1EhxGslwR3XIwoa0sVTttYt',
250 250
     'theme' => 'garland',
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
     'pages' => 'search/team/*',
258 258
     'title' => '',
259 259
     'cache' => '-1',
260
-  );
260
+    );
261 261
 
262
-  $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
262
+    $theme['facetapi-wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j'] = array(
263 263
     'module' => 'facetapi',
264 264
     'delta' => 'wWWinJ0eOefOtAMbjo2yl86Mnf1rO12j',
265 265
     'theme' => 'garland',
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
     'pages' => '',
273 273
     'title' => '',
274 274
     'cache' => '-1',
275
-  );
275
+    );
276 276
 
277
-  $theme['boinc_solr_search-boinc_solr_search_0'] = array(
277
+    $theme['boinc_solr_search-boinc_solr_search_0'] = array(
278 278
     'module' => 'boinc_solr_search',
279 279
     'delta' => 'boinc_solr_search_0',
280 280
     'theme' => 'garland',
@@ -287,16 +287,16 @@  discard block
 block discarded – undo
287 287
     'pages' => 'search/*',
288 288
     'title' => '',
289 289
     'cache' => '1',
290
-  );
290
+    );
291 291
 
292
-  $export['garland'] = $theme;
292
+    $export['garland'] = $theme;
293 293
 
294
-  $theme_default = variable_get('theme_default', 'garland');
295
-  $themes = list_themes();
296
-  foreach ($export as $theme_key => $settings) {
294
+    $theme_default = variable_get('theme_default', 'garland');
295
+    $themes = list_themes();
296
+    foreach ($export as $theme_key => $settings) {
297 297
     if ($theme_key != $theme_default && empty($themes[$theme_key]->status)) {
298
-      unset($export[$theme_key]);
298
+        unset($export[$theme_key]);
299 299
     }
300
-  }
301
-  return $export;
300
+    }
301
+    return $export;
302 302
 }
Please login to merge, or discard this patch.
sites/default/boinc/modules/boinc_solr_search/boinc_solr_search.module 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
  * Functions are forward compatible with Drupal 7 hooks.
18 18
  */
19 19
 function boinc_solr_search_block($op = 'list', $delta = 0, $edit = array()) {
20
-  switch ($op) {
20
+    switch ($op) {
21 21
     case 'list':
22 22
       return boinc_solr_search_block_info();
23
-      break;
23
+        break;
24 24
     case 'view':
25 25
       return boinc_solr_search_block_view($delta);
26
-      break;
26
+        break;
27 27
     case 'configure':
28 28
     case 'save':
29 29
     default:
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
  * (somewhat) forward compatible.
38 38
  */
39 39
 function boinc_solr_search_block_info() {
40
-  $blocks = array();
41
-  $blocks['boinc_solr_search_0'] = array(
40
+    $blocks = array();
41
+    $blocks['boinc_solr_search_0'] = array(
42 42
     'info' => t('BOINC Search Help'),
43
-  );
44
-  return $blocks;
43
+    );
44
+    return $blocks;
45 45
 }
46 46
 
47 47
 /**
@@ -51,28 +51,28 @@  discard block
 block discarded – undo
51 51
  * (somewhat) forward compatible.
52 52
  */
53 53
 function boinc_solr_search_block_view($delta = 0) {
54
-  $block = array();
55
-  switch($delta) {
54
+    $block = array();
55
+    switch($delta) {
56 56
     case 'boinc_solr_search_0':
57 57
       $items = array(
58
-          bts('By default a search matches ANY search term. Results with more than one term will be presented higher in the search results.', array(), NULL, 'boinc:search-help-sidebar-block'),
59
-          bts('You may use \'AND\' to have the search engine return results with ALL search terms.', array(), NULL, 'boinc:search-help-sidebar-block'),
60
-          bts('For example, searching for \'boinc AND client\' will only contain results with words boinc and client.', array(), NULL, 'boinc:search-help-sidebar-block')
61
-      );
58
+            bts('By default a search matches ANY search term. Results with more than one term will be presented higher in the search results.', array(), NULL, 'boinc:search-help-sidebar-block'),
59
+            bts('You may use \'AND\' to have the search engine return results with ALL search terms.', array(), NULL, 'boinc:search-help-sidebar-block'),
60
+            bts('For example, searching for \'boinc AND client\' will only contain results with words boinc and client.', array(), NULL, 'boinc:search-help-sidebar-block')
61
+        );
62 62
 
63
-      drupal_add_js('misc/collapse.js');
64
-      // For Drupal 7 the format of the array changes, see https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_fieldset/7.x for details.
65
-      $collapsible_item = array(
63
+        drupal_add_js('misc/collapse.js');
64
+        // For Drupal 7 the format of the array changes, see https://api.drupal.org/api/drupal/includes%21form.inc/function/theme_fieldset/7.x for details.
65
+        $collapsible_item = array(
66 66
         '#title' => bts('Search Help', array(), NULL, 'boinc:search-help-sidebar-block'),
67 67
         '#description' => theme_item_list($items),
68 68
         '#collapsible' => TRUE,
69 69
         '#collapsed' => TRUE,
70 70
         '#attributes' => array(
71
-          'class' => 'search-help-block',
71
+            'class' => 'search-help-block',
72 72
         ),
73
-      );
74
-      $block['content'] = theme('fieldset', $collapsible_item);
75
-      break;
76
-  }
77
-  return $block;
73
+        );
74
+        $block['content'] = theme('fieldset', $collapsible_item);
75
+        break;
76
+    }
77
+    return $block;
78 78
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinccore/boinccore.admin.inc 1 patch
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -7,191 +7,191 @@  discard block
 block discarded – undo
7 7
 */
8 8
 
9 9
 /**
10
-  * The BOINC community form allows the setting of requirements for interaction
11
-  * in the community sections of the site.
12
-  */
10
+ * The BOINC community form allows the setting of requirements for interaction
11
+ * in the community sections of the site.
12
+ */
13 13
 function boinccore_admin_community(&$form_state) {
14
-  $form = array();
15
-  $default = array(
14
+    $form = array();
15
+    $default = array(
16 16
     'min_credit_to_post' => variable_get('boinc_comment_min_credit', 0),
17 17
     'penalty_period' => variable_get('boinc_penalty_period', 7*24*60*60),
18 18
     'moderator_mailing_list' => variable_get('boinc_moderator_mailing_list', ''),
19 19
     'moderator_force_individual_notifications' => variable_get('boinc_moderator_force_individual_notifications', 0),
20
-  );
20
+    );
21 21
   
22
-  // Define the form
23
-  $form['boinc_comment_min_credit'] = array(
22
+    // Define the form
23
+    $form['boinc_comment_min_credit'] = array(
24 24
     '#type' => 'textfield',
25 25
     '#title' => t('Credit required for community participation'),
26 26
     '#default_value' => $default['min_credit_to_post'],
27 27
     '#description' => t('Set a minimum threshold of credit a user must have
28 28
       earned before being allowed to create a profile, post comments or participate in forums.'),
29
-  );
30
-  $form['boinc_penalty_period'] = array(
29
+    );
30
+    $form['boinc_penalty_period'] = array(
31 31
     '#type' => 'textfield',
32 32
     '#title' => t('Penalty period'),
33 33
     '#default_value' => $default['penalty_period'],
34 34
     '#description' => t('The amount of time (in seconds) that user privileges
35 35
       are revoked when a user is banned from community participation.'),
36
-  );
37
-  $form['boinc_moderator_mailing_list'] = array(
36
+    );
37
+    $form['boinc_moderator_mailing_list'] = array(
38 38
     '#type' => 'textfield',
39 39
     '#title' => t('Moderator mailing list'),
40 40
     '#default_value' => $default['moderator_mailing_list'],
41 41
     '#description' => t('As an alternative to sending moderator notifications
42 42
       to individual users with the moderator role, enter a mailing list address
43 43
       here to be the only target of the notification emails.'),
44
-  );
45
-  $form['boinc_moderator_force_individual_notifications'] = array(
44
+    );
45
+    $form['boinc_moderator_force_individual_notifications'] = array(
46 46
     '#type' => 'checkbox',
47 47
     '#title' => t('Always send individual notifications'),
48 48
     '#default_value' => $default['moderator_force_individual_notifications'],
49 49
     '#description' => t('Continue to send individual moderator notification
50 50
       emails even when a mailing list is provided.'),
51
-  );
51
+    );
52 52
   
53
-  $form['tools'] = array(
53
+    $form['tools'] = array(
54 54
     '#title' => t('Tools'),
55 55
     '#type' => 'fieldset',
56 56
     '#description' => '',
57 57
     '#collapsible' => TRUE,
58 58
     '#collapsed' => FALSE,
59 59
     '#attributes' => array('class' => '')
60
-  );
61
-  $form['tools']['reset_uotd'] = array(
60
+    );
61
+    $form['tools']['reset_uotd'] = array(
62 62
     '#type' => 'submit',
63 63
     '#value' => t('Force new UOTD'),
64 64
     '#submit' => array('boinccore_reset_user_of_the_day'),
65
-  );
65
+    );
66 66
   
67
-  return system_settings_form($form);
67
+    return system_settings_form($form);
68 68
 }
69 69
 
70 70
 /**
71
-  * Validate the BOINC community form.
72
-  */
71
+ * Validate the BOINC community form.
72
+ */
73 73
 function boinccore_admin_community_validate($form, &$form_state) {
74
-  $values = $form_state['values'];
75
-  if (!is_numeric($values['boinc_comment_min_credit'])) {
74
+    $values = $form_state['values'];
75
+    if (!is_numeric($values['boinc_comment_min_credit'])) {
76 76
     form_set_error('boinc_comment_min_credit', t('The minimum credit value must be a number.'));
77
-  }
77
+    }
78 78
 }
79 79
 
80 80
 /**
81
-  * Handle post-validation submission of BOINC community form.
82
-  */
81
+ * Handle post-validation submission of BOINC community form.
82
+ */
83 83
 function boinccore_admin_community_submit($form, &$form_state) {
84
-  drupal_set_message(t('BOINC community settings have been updated.'));
84
+    drupal_set_message(t('BOINC community settings have been updated.'));
85 85
 }
86 86
 
87 87
 /**
88 88
  * Force a reset of the user of the day
89 89
  */
90 90
 function boinccore_reset_user_of_the_day() {
91
-  if (boincuser_select_user_of_the_day()) {
91
+    if (boincuser_select_user_of_the_day()) {
92 92
     drupal_set_message(t('The user of the day has been reset.'));
93
-  }
93
+    }
94 94
 }
95 95
 
96 96
 /**
97
-  * The standard page generator form provides an interface to create standard
98
-  * pages, such as a Help or About page.
99
-  */
97
+ * The standard page generator form provides an interface to create standard
98
+ * pages, such as a Help or About page.
99
+ */
100 100
 function boinccore_admin_default_content(&$form_state) {
101
-  $form = array();
101
+    $form = array();
102 102
   
103
-  // Define the form
104
-  $form['page'] = array(
103
+    // Define the form
104
+    $form['page'] = array(
105 105
     '#type' => 'select',
106 106
     '#title' => t('Generate default content for'),
107 107
     '#description' => t('Generate some standard pages for a Drupal-BOINC Web site. You may generate all pages or specific pages. If a page already exists, it will <b>not</b> be overwritten. Pages will be generated with the path \'/page\', e.g., \'/help\'. Note the absense of \'content/\'.<p>The pages generated here will have very limited content. Most will have content such as \'Add a link to your FAQ here.\', and it is the admin or editors responsibility to add the necessary content.'),
108 108
     '#options' => array(
109
-      0 => t('All standard pages'),
109
+        0 => t('All standard pages'),
110 110
 //      'about' => t('About page'),
111
-      'help' => t('Help page'),
112
-      'rules' => t('Rules and Policies page'),
113
-      'moderation' => t('Moderation information page'),
111
+        'help' => t('Help page'),
112
+        'rules' => t('Rules and Policies page'),
113
+        'moderation' => t('Moderation information page'),
114 114
     ),
115
-  );
116
-  $form['submit'] = array(
115
+    );
116
+    $form['submit'] = array(
117 117
     '#type' => 'submit',
118 118
     '#value' => 'Generate content',
119
-  );
119
+    );
120 120
   
121
-  return $form;
121
+    return $form;
122 122
 }
123 123
 
124 124
 /**
125
-  * Generate content based on the selection made on the form
126
-  */
125
+ * Generate content based on the selection made on the form
126
+ */
127 127
 function boinccore_admin_default_content_submit($form, &$form_state) {
128
-  $option = $form_state['values']['page'];
129
-  $page_list = boinccore_admin_default_content_generate($option);
130
-  $pages_generated = count($page_list);
131
-  if ($pages_generated > 0) {
128
+    $option = $form_state['values']['page'];
129
+    $page_list = boinccore_admin_default_content_generate($option);
130
+    $pages_generated = count($page_list);
131
+    if ($pages_generated > 0) {
132 132
     switch ($pages_generated) {
133 133
     case 1:
134 134
       $page_list = reset($page_list);
135
-      break;
135
+        break;
136 136
     case 2:
137 137
       $page_list = implode(' and ', $page_list);
138
-      break;
138
+        break;
139 139
     default:
140 140
       end($page_list);
141
-      $page_list[key($page_list)] = 'and ' . $page_list[key($page_list)];
142
-      $page_list = implode(', ', $page_list);
141
+        $page_list[key($page_list)] = 'and ' . $page_list[key($page_list)];
142
+        $page_list = implode(', ', $page_list);
143 143
     }
144 144
     drupal_set_message(t('Default content has been generated for the @listed
145 145
       @pages.', array(
146 146
         '@listed' => $page_list, 
147 147
         '@pages' => format_plural($pages_generated, 'page', 'pages'),
148
-      )
148
+        )
149 149
     ));
150
-  }
151
-  else {
150
+    }
151
+    else {
152 152
     if ($option) {
153
-      drupal_set_message(t('The @specified page already exists.',
153
+        drupal_set_message(t('The @specified page already exists.',
154 154
         array('@specified' => $option)), 'warning');
155 155
     }
156 156
     else {
157
-      drupal_set_message(t('All pages already exist, so none can be recreated
157
+        drupal_set_message(t('All pages already exist, so none can be recreated
158 158
         automatically.'), 'warning');
159 159
     }
160 160
     drupal_set_message(t('To recreate a page, first delete the existing page (or
161 161
       remove its URL alias), then try this function again.'), 'warning');
162
-  }
162
+    }
163 163
 }
164 164
 
165 165
 /**
166
-  * 
167
-  */
166
+ * 
167
+ */
168 168
 function boinccore_admin_default_content_generate($pages = array()) {
169
-  if (!$pages) {
169
+    if (!$pages) {
170 170
     // If not specified, attempt to generate all pages by default
171 171
     $pages = array(
172
-      'help',
172
+        'help',
173 173
 //      'about',
174
-      'rules',
175
-      'moderation',
174
+        'rules',
175
+        'moderation',
176 176
     );
177
-  }
178
-  elseif (!is_array($pages)) {
177
+    }
178
+    elseif (!is_array($pages)) {
179 179
     $pages = array($pages);
180
-  }
180
+    }
181 181
 
182
-  $pages_generated = array();
183
-  if (in_array('about', $pages)) {
182
+    $pages_generated = array();
183
+    if (in_array('about', $pages)) {
184 184
     // Create the default About page, if it doesn't exist
185 185
     // TODO: what is the default About page...?
186 186
     if (!drupal_lookup_path('source', 'about')) {
187
-      drupal_set_message('The about page doesn\'t yet have a definition...', 'warning');
188
-      //$pages_generated[] = 'about';
187
+        drupal_set_message('The about page doesn\'t yet have a definition...', 'warning');
188
+        //$pages_generated[] = 'about';
189
+    }
189 190
     }
190
-  }
191
-  if (in_array('help', $pages)) {
191
+    if (in_array('help', $pages)) {
192 192
     // Create the default Help page, if it doesn't exist
193 193
     if (!drupal_lookup_path('source', 'help')) {
194
-      $node = array(
194
+        $node = array(
195 195
         'type' => 'page',
196 196
         'title' => t('Help'),
197 197
         'uid' => 1,
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         'comment' => 0, // disable comments
205 205
         'moderate' => 0,
206 206
         'body' => preg_replace('/>\s+</', '><',
207
-          '<p>Use this page to provide help and support for your site\'s
207
+            '<p>Use this page to provide help and support for your site\'s
208 208
           visitors:</p>
209 209
           <ul>
210 210
             <li>Add a link to your primary forum for getting help</li>
@@ -215,25 +215,25 @@  discard block
 block discarded – undo
215 215
         'sticky' => 0,
216 216
         'format' => 4,
217 217
         //'teaser' => $teaser,
218
-      );
219
-      $node = (object) $node; // node_save requires an object
220
-      node_save($node);
218
+        );
219
+        $node = (object) $node; // node_save requires an object
220
+        node_save($node);
221 221
       
222
-      $item = array(
222
+        $item = array(
223 223
         'link_path' => drupal_get_normal_path('help'),
224 224
         'link_title' => t('Help'),
225 225
         'menu_name' => 'primary-links',
226 226
         'weight' => 50,
227
-      );
228
-      menu_link_save($item);
229
-      $pages_generated[] = 'help';
227
+        );
228
+        menu_link_save($item);
229
+        $pages_generated[] = 'help';
230 230
     }
231
-  }
232
-  if (in_array('rules', $pages)) {
231
+    }
232
+    if (in_array('rules', $pages)) {
233 233
     // Create the default Rules page, if it doesn't exist
234 234
     if (!drupal_lookup_path('source', 'rules-and-policies')) {
235
-      // Create node
236
-      $node = array(
235
+        // Create node
236
+        $node = array(
237 237
         'type' => 'page',
238 238
         'title' => t('Rules and Policies'),
239 239
         'uid' => 1,
@@ -246,30 +246,30 @@  discard block
 block discarded – undo
246 246
         'comment' => 0, // disable comments
247 247
         'moderate' => 0,
248 248
         'body' => preg_replace('/>\s+</', '><',
249
-          '<p>Use this page to list your sites rules and policies.</p>'),
249
+            '<p>Use this page to list your sites rules and policies.</p>'),
250 250
         'sticky' => 0,
251 251
         'format' => 4,
252 252
         //'teaser' => $teaser,
253
-      );
254
-      $node = (object) $node; // node_save requires an object
255
-      node_save($node);
253
+        );
254
+        $node = (object) $node; // node_save requires an object
255
+        node_save($node);
256 256
 
257
-      // Create menu item to node
258
-      $item = array(
257
+        // Create menu item to node
258
+        $item = array(
259 259
         'link_path' => drupal_get_normal_path('rules-and-policies'),
260 260
         'link_title' => t('Rules and Policies'),
261 261
         'menu_name' => 'menu-footer-links',
262 262
         'weight' => 0,
263
-      );
264
-      menu_link_save($item);
265
-      $pages_generated[] = 'rules-and-policies';
263
+        );
264
+        menu_link_save($item);
265
+        $pages_generated[] = 'rules-and-policies';
266
+    }
266 267
     }
267
-  }
268
-  if (in_array('moderation', $pages)) {
268
+    if (in_array('moderation', $pages)) {
269 269
     // Create the default Moderation page, if it doesn't exist
270 270
     if (!drupal_lookup_path('source', 'moderation')) {
271
-      // Create node
272
-      $node = array(
271
+        // Create node
272
+        $node = array(
273 273
         'type' => 'page',
274 274
         'title' => t('Moderation'),
275 275
         'uid' => 1,
@@ -282,27 +282,27 @@  discard block
 block discarded – undo
282 282
         'comment' => 0, // disable comments
283 283
         'moderate' => 0,
284 284
         'body' => preg_replace('/>\s+</', '><',
285
-          '<p>Use this page to describe your sites moderation policy.</p>'),
285
+            '<p>Use this page to describe your sites moderation policy.</p>'),
286 286
         'sticky' => 0,
287 287
         'format' => 4,
288 288
         //'teaser' => $teaser,
289
-      );
290
-      $node = (object) $node; // node_save requires an object
291
-      node_save($node);
289
+        );
290
+        $node = (object) $node; // node_save requires an object
291
+        node_save($node);
292 292
 
293
-      // Create menu item to node
294
-      $item = array(
293
+        // Create menu item to node
294
+        $item = array(
295 295
         'link_path' => drupal_get_normal_path('moderation'),
296 296
         'link_title' => t('Moderation'),
297 297
         'menu_name' => 'menu-footer-links',
298 298
         'weight' => 0,
299
-      );
300
-      menu_link_save($item);
301
-      $pages_generated[] = 'moderation';
299
+        );
300
+        menu_link_save($item);
301
+        $pages_generated[] = 'moderation';
302
+    }
302 303
     }
303
-  }
304 304
 
305
-  // Rebuild drupal menus
306
-  menu_rebuild();
307
-  return $pages_generated;
305
+    // Rebuild drupal menus
306
+    menu_rebuild();
307
+    return $pages_generated;
308 308
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinccore/includes/boinccore.forms.inc 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,38 +10,38 @@
 block discarded – undo
10 10
  * separate text for user profiles.
11 11
  */
12 12
 function boinccore_delete_confirm(&$form_state, $node) {
13
-  $form = array();
14
-  $form['nid'] = array(
13
+    $form = array();
14
+    $form['nid'] = array(
15 15
     '#type' => 'value',
16 16
     '#value' => $node->nid,
17
-  );
17
+    );
18 18
 
19
-  // Build confirm form from elements, depending on node type.
20
-  $description =  bts('This action cannot be undone.', array(), NULL, 'boinc:delete-node');
21
-  $no = bts('Cancel', array(), NULL, 'boinc:form-cancel');
19
+    // Build confirm form from elements, depending on node type.
20
+    $description =  bts('This action cannot be undone.', array(), NULL, 'boinc:delete-node');
21
+    $no = bts('Cancel', array(), NULL, 'boinc:form-cancel');
22 22
 
23
-  switch($node->type) {
24
-  case 'profile':
23
+    switch($node->type) {
24
+    case 'profile':
25 25
     $question = bts('Are you sure you want to clear your profile?', array(), NULL, 'boinc:delete-node');
26 26
     $path = isset($_GET['destination']) ? $_GET['destination'] : 'account';
27 27
     $yes = bts('Confirm', array(), NULL, 'boinc:form-confirm');
28 28
     break;
29 29
 
30
-  default:
30
+    default:
31 31
     $question = bts('Are you sure you want to Delete %title?', array('%title' => $node->title), NULL, 'boinc:delete-node');
32 32
     $path = isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid;
33 33
     $yes = bts('Delete', array(), NULL, 'boinc:form-delete');
34
-  }
35
-  return confirm_form($form, $question, $path, $description, $yes, $no);
34
+    }
35
+    return confirm_form($form, $question, $path, $description, $yes, $no);
36 36
 }
37 37
 
38 38
 /**
39 39
  * Execute node deletion.
40 40
  */
41 41
 function boinccore_delete_confirm_submit($form, &$form_state) {
42
-  if ($form_state['values']['confirm']) {
42
+    if ($form_state['values']['confirm']) {
43 43
     node_delete($form_state['values']['nid']);
44
-  }
44
+    }
45 45
 
46
-  $form_state['redirect'] = 'account';
46
+    $form_state['redirect'] = 'account';
47 47
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.pages.inc 1 patch
Indentation   +185 added lines, -185 removed lines patch added patch discarded remove patch
@@ -5,45 +5,45 @@  discard block
 block discarded – undo
5 5
  * Callback admin/boinc/import/settings
6 6
  */
7 7
 function boincimport_admin_settings() {
8
-  global $conf ;
9
-  global $db_url;
10
-  global $base_url;
11
-  $stage = variable_get('boincimport_config_stage', 0); 
8
+    global $conf ;
9
+    global $db_url;
10
+    global $base_url;
11
+    $stage = variable_get('boincimport_config_stage', 0); 
12 12
   
13
-  // Start with a quick sanity check on the BOINC environment
14
-  boinc_get_path();
13
+    // Start with a quick sanity check on the BOINC environment
14
+    boinc_get_path();
15 15
   
16
-  //We'll be checking that the setup is complete.
17
-  //If it is not complete, the migration will not go ahead.
18
-  $ready_for_migration = 1;
16
+    //We'll be checking that the setup is complete.
17
+    //If it is not complete, the migration will not go ahead.
18
+    $ready_for_migration = 1;
19 19
 
20
-  // Checking that the migration has been tested on a copy first.
21
-  $form['test'] = array(
20
+    // Checking that the migration has been tested on a copy first.
21
+    $form['test'] = array(
22 22
     '#type' => 'fieldset',
23 23
     '#title' => t('Test on copy first'),
24 24
     '#collapsible' => TRUE,
25 25
     '#collapsed' => TRUE,
26
-  );
26
+    );
27 27
     
28
-  $output = '';
29
-  if (!variable_get('boincimport_tested', 0)) {
28
+    $output = '';
29
+    if (!variable_get('boincimport_tested', 0)) {
30 30
     $form['test']['#collapsed']= FALSE;
31 31
     $output = '<span class="marker">';
32 32
     $ready_for_migration = 0;
33
-  }
34
-  $output .= '<p>' . t('The migration will modify and even destroy some data. You
33
+    }
34
+    $output .= '<p>' . t('The migration will modify and even destroy some data. You
35 35
     must test this module on a copy of your data first, several times if necessary.
36 36
     Only use this module on your live data when you are familiar with the procedure
37 37
     and you\'re confident everything will run smoothly.') . '</p><p>' . t('Also, you
38 38
     should make a full backup of your database just prior to performing the
39 39
     migration on the live data. It is better to turn off both the BOINC site and the
40 40
     Drupal site during the migration.') . '</p>';
41
-  if (!variable_get('boincimport_tested', 0)) {
41
+    if (!variable_get('boincimport_tested', 0)) {
42 42
     $output .= '</span>';
43
-  }
44
-  $form['test']['intro'] = array('#value' => $output);
43
+    }
44
+    $form['test']['intro'] = array('#value' => $output);
45 45
 
46
-  $form['test']['boincimport_tested'] = array(
46
+    $form['test']['boincimport_tested'] = array(
47 47
     '#type' => 'checkbox',
48 48
     '#title' => t('I am running a trial migration on a disposable copy of the database
49 49
       OR I have already done so and I am running this on my live site, confident that
@@ -51,64 +51,64 @@  discard block
 block discarded – undo
51 51
     '#return_value' => 1,
52 52
     '#default_value' => variable_get('boincimport_tested', 0),
53 53
     '#description' => '',
54
-  );
54
+    );
55 55
   
56
-  // Where is BOINC data?
57
-  $pre = variable_get('boincimport_table_prefix', '');
58
-  $tables = array($pre .'forum', $pre .'post', $pre .'thread', $pre .'user');
59
-  $db = (is_array($db_url) AND isset($db_url['boinc_rw'])) ? 'boinc_rw' : 'default';
60
-  $result = _boincimport_check_tables($tables, $db, 0);
56
+    // Where is BOINC data?
57
+    $pre = variable_get('boincimport_table_prefix', '');
58
+    $tables = array($pre .'forum', $pre .'post', $pre .'thread', $pre .'user');
59
+    $db = (is_array($db_url) AND isset($db_url['boinc_rw'])) ? 'boinc_rw' : 'default';
60
+    $result = _boincimport_check_tables($tables, $db, 0);
61 61
   
62
-  $config_path = conf_path();
63
-  $form['boinc_data'] = array(
62
+    $config_path = conf_path();
63
+    $form['boinc_data'] = array(
64 64
     '#type' => 'fieldset',
65 65
     '#title' => t('Location of BOINC data'),
66 66
     '#collapsible' => TRUE,
67 67
     '#collapsed' => TRUE,
68
-  );
69
-  $form['boinc_data']['boincimport_db_configured'] = array(
68
+    );
69
+    $form['boinc_data']['boincimport_db_configured'] = array(
70 70
     '#type' => 'checkbox',
71 71
     '#title' => t('There is a \'boinc\' database connection string configured in %file',
72
-      array('%file' => "{$config_path}/settings.php")),
72
+        array('%file' => "{$config_path}/settings.php")),
73 73
     '#return_value' => 1,
74 74
     '#default_value' => variable_get('boincimport_db_configured', 1),
75 75
     '#description' => '',
76 76
     '#disabled' => ($result['result']) ? TRUE : FALSE
77
-  );
78
-  if (variable_get('boincimport_db_configured', 1) != 1) {
77
+    );
78
+    if (variable_get('boincimport_db_configured', 1) != 1) {
79 79
     $default_db_url = is_array($db_url) ? end($db_url) : $db_url;
80 80
     $url = variable_get('boincimport_db_url', $default_db_url);
81 81
     if (!preg_match('{(mysql|pgsql):\/\/(.+):(.*?)@(.+)/(\w+)}i', $url)) {
82
-      $output = '<p class="marker">'. t('Set the address of the BOINC database
82
+        $output = '<p class="marker">'. t('Set the address of the BOINC database
83 83
         according to the following format:') . '<br /><pre>
84 84
         mysql://boinc_username:boinc_password@localhost/boinc_database
85 85
         </pre></p>';
86
-      $ready_for_migration = 0;
87
-      $form['boinc_data']['#collapsed'] = FALSE;
88
-      $form['boinc_data']['db_connect_string_note'] = array('#value' => $output);
86
+        $ready_for_migration = 0;
87
+        $form['boinc_data']['#collapsed'] = FALSE;
88
+        $form['boinc_data']['db_connect_string_note'] = array('#value' => $output);
89 89
     }
90 90
 
91 91
     $form['boinc_data']['boincimport_db_url'] = array(
92
-      '#type' => 'textfield',
93
-      '#title' => t('BOINC database location'),
94
-      '#default_value' => variable_get('boincimport_db_url', $default_db_url),
95
-      '#size' => 80,
96
-      '#maxlength' => 255,
97
-      '#description' => '',
92
+        '#type' => 'textfield',
93
+        '#title' => t('BOINC database location'),
94
+        '#default_value' => variable_get('boincimport_db_url', $default_db_url),
95
+        '#size' => 80,
96
+        '#maxlength' => 255,
97
+        '#description' => '',
98 98
     );
99
-  }
99
+    }
100 100
 
101
-  $output = '<p>' . t('Note that due to a limitation within Drupal core, we cannot
101
+    $output = '<p>' . t('Note that due to a limitation within Drupal core, we cannot
102 102
     import messages from one database type to another database type. E.g, we
103 103
     cannot import BOINC from a myqsl DB, to a postgresql DB. You need to import
104 104
     the data into the same type of database first (import all the BOINC data, as is,
105 105
     from mysql to postgresql).') . '</p><p>' . t('If both BOINC and Drupal are on
106 106
     postgresql, see !this_issue.', array('!this_issue' => l(t('this issue'),
107 107
     'http://drupal.org/node/64877', array('attributes' => array('target' => '_blank'))))) . '</p>';
108
-  $form['boinc_data']['note'] = array('#value' => $output);
108
+    $form['boinc_data']['note'] = array('#value' => $output);
109 109
   
110
-  // BOINC table prefix
111
-  $form['boinc_data']['boincimport_table_prefix'] = array(
110
+    // BOINC table prefix
111
+    $form['boinc_data']['boincimport_table_prefix'] = array(
112 112
     '#type' => 'textfield',
113 113
     '#title' => t('BOINC table prefix'),
114 114
     '#default_value' => variable_get('boincimport_table_prefix', ''),
@@ -116,30 +116,30 @@  discard block
 block discarded – undo
116 116
     '#maxlength' => 255,
117 117
     '#description' => t('What prefix is used for your BOINC tables?'),
118 118
     '#disabled' => ($result['result']) ? TRUE : FALSE
119
-  );
119
+    );
120 120
   
121
-  $output = $result['html'];
122
-  if ($result['result'] != 1) {
121
+    $output = $result['html'];
122
+    if ($result['result'] != 1) {
123 123
     $ready_for_migration = 0;
124 124
     $form['boinc_data']['#collapsed']= FALSE;
125 125
     $output .= '<span class="marker">';
126 126
     $output .= t('Some tables couldn\'t be found. Are the database settings correct?
127 127
       Please correct the errors so that the BOINC tables can be accessed.');
128 128
     $output .= '</span>';
129
-  }
129
+    }
130 130
 
131
-  $form['boinc_data']['result'] = array('#value' => $output);
131
+    $form['boinc_data']['result'] = array('#value' => $output);
132 132
   
133
-  // USERS settings
134
-  $form['users'] = array(
133
+    // USERS settings
134
+    $form['users'] = array(
135 135
     '#type' => 'fieldset',
136 136
     '#title' => t('User import'),
137 137
     '#collapsible' => TRUE,
138 138
     '#collapsed' => TRUE,
139
-  );
139
+    );
140 140
 
141
-  // User import batch size
142
-  $form['users']['boincimport_user_batch_size'] = array(
141
+    // User import batch size
142
+    $form['users']['boincimport_user_batch_size'] = array(
143 143
     '#type' => 'textfield',
144 144
     '#title' => t('Number of accounts to process at a time'),
145 145
     '#default_value' => variable_get('boincimport_user_batch_size', 50),
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
     '#description' => t('Due to memory intensive API calls, this value may have to
149 149
       be adjusted to avoid exhausting system resources. The default value is a
150 150
       balance between performance and reliability.')
151
-  );
151
+    );
152 152
 
153
-  // Import users who have never posted?
154
-  $form['users']['boincimport_import_lurkers'] = array(
153
+    // Import users who have never posted?
154
+    $form['users']['boincimport_import_lurkers'] = array(
155 155
     '#type' => 'checkbox',
156 156
     '#title' => t('Import users who have never posted?'),
157 157
     '#return_value' => 1,
@@ -160,199 +160,199 @@  discard block
 block discarded – undo
160 160
       involvement? This may not be desired, as it can take a very long time to
161 161
       import tens or hundreds of thousands of accounts. (note that users who
162 162
       are not imported now will still be imported on-the-fly upon login)'),
163
-  );
163
+    );
164 164
 
165
-  // Input format settings
166
-  $form['input'] = array(
165
+    // Input format settings
166
+    $form['input'] = array(
167 167
     '#type' => 'fieldset',
168 168
     '#title' => t('Input format settings'),
169 169
     '#collapsible' => TRUE,
170 170
     '#collapsed' => TRUE
171
-  );
172
-  $output = '<p>'. t('Select which !input_format should be used for the imported
171
+    );
172
+    $output = '<p>'. t('Select which !input_format should be used for the imported
173 173
     messages. It is highly-recommended that this value be left as it is, as the
174 174
     Full HTML and PHP code formats can be very dangerous!', 
175 175
     array('!input_format' => l(t('input format'), 'admin/settings/filters'))) .'</p>';
176
-  $form['input']['intro'] = array('#value' => $output);
176
+    $form['input']['intro'] = array('#value' => $output);
177 177
   
178
-  $formats = db_query('SELECT format, name FROM {filter_formats}');
179
-  while ($format = db_fetch_array($formats)) {
178
+    $formats = db_query('SELECT format, name FROM {filter_formats}');
179
+    while ($format = db_fetch_array($formats)) {
180 180
     $input_formats[$format['format']]= $format['name'];
181
-  }
181
+    }
182 182
   
183
-  // By default, use the format named "Rich text"; fall back to Filtered HTML
184
-  $default_input_format = db_result(db_query("
183
+    // By default, use the format named "Rich text"; fall back to Filtered HTML
184
+    $default_input_format = db_result(db_query("
185 185
     SELECT format FROM {filter_formats} WHERE name = '%s'", 'Rich text'));
186
-  if (!$default_input_format) $default_input_format = 1;
186
+    if (!$default_input_format) $default_input_format = 1;
187 187
   
188
-  $input_format = variable_get('boincimport_input_format', $default_input_format);
189
-  $form['input']['boincimport_input_format'] = array(
188
+    $input_format = variable_get('boincimport_input_format', $default_input_format);
189
+    $form['input']['boincimport_input_format'] = array(
190 190
     '#type' => 'radios',
191 191
     '#title' => t('Input format'),
192 192
     '#default_value' => $input_format,
193 193
     '#options' => $input_formats
194
-  );
195
-  if (!$input_format) {
194
+    );
195
+    if (!$input_format) {
196 196
     $ready_for_migration = 0;
197 197
     $form['input']['#collapsed']= FALSE;
198
-  }
199
-  $output = '<p><em>'. t('This setting will be applied to all posts and private
198
+    }
199
+    $output = '<p><em>'. t('This setting will be applied to all posts and private
200 200
     messages.') .'</em></p>';
201
-  $form['input']['result'] = array('#value' => $output);
201
+    $form['input']['result'] = array('#value' => $output);
202 202
   
203
-  // BBcode settings
204
-  $form['bbcode'] = array(
203
+    // BBcode settings
204
+    $form['bbcode'] = array(
205 205
     '#type' => 'fieldset',
206 206
     '#title' => t('BBcode settings'),
207 207
     '#collapsible' => TRUE,
208 208
     '#collapsed' => TRUE,
209
-  );
209
+    );
210 210
   
211
-  $output = '<p>' . t('BOINC posts are often formatted in BBcode. During the
211
+    $output = '<p>' . t('BOINC posts are often formatted in BBcode. During the
212 212
     import process, BBcode can be handled in two diffent ways') . ':</p>';
213
-  $output .= '<ul><li>' . t('Leave the BBcode as is and use the !bbcode_module
213
+    $output .= '<ul><li>' . t('Leave the BBcode as is and use the !bbcode_module
214 214
     after the migration to filter the imported posts. In this case, the module
215 215
     is not required during the migration, but will need to be installed and
216 216
     configured later.',
217 217
     array('!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode',
218 218
     array('attributes' => array('target' => '_blank'))))) . '</li>';
219
-  $output .= '<li>' . t('Filter the BBcode now and replace it with plain HTML.
219
+    $output .= '<li>' . t('Filter the BBcode now and replace it with plain HTML.
220 220
     The BBcode module will be required during the migration process, but can
221 221
     be disabled afterwards.') . '</li></ul>';
222
-  $output .= '<p>' . t('An appropriate input filter should be chosen, as well,
222
+    $output .= '<p>' . t('An appropriate input filter should be chosen, as well,
223 223
     as it will affect how the post is displayed. For example, if BBcode is
224 224
     removed and replaced by HTML, some HTML tags will be stripped by the
225 225
     "Filtered HTML" input format unless they are first added to the list of
226 226
     allowed tags in that format. See the !input_formats page.',
227 227
     array('!input_formats' => l(t('input formats'), 'admin/settings/filters'))) . '</p>';
228 228
     
229
-  $form['bbcode']['intro'] = array('#value' => $output);
230
-  $form['bbcode']['boincimport_bbcode'] = array(
229
+    $form['bbcode']['intro'] = array('#value' => $output);
230
+    $form['bbcode']['boincimport_bbcode'] = array(
231 231
     '#type' => 'radios',
232 232
     '#title' => t('BBcode handling'),
233 233
     '#default_value' => variable_get('boincimport_bbcode', 0),
234 234
     '#options' => array(t('Leave BBcode as is.'), t('Transform BBcode into HTML.')),
235 235
     '#description' => '',
236
-  );
236
+    );
237 237
   
238
-  $module_status = _boincimport_check_module('bbcode');
239
-  $bbcode_disabled = ($module_status['result'] == 0) ? true : false;
240
-  $output = $module_status['html'];
238
+    $module_status = _boincimport_check_module('bbcode');
239
+    $bbcode_disabled = ($module_status['result'] == 0) ? true : false;
240
+    $output = $module_status['html'];
241 241
   
242
-  if (variable_get('boincimport_bbcode', 0)) {
242
+    if (variable_get('boincimport_bbcode', 0)) {
243 243
     if ($bbcode_disabled) {
244
-      $ready_for_migration = 0;
245
-      $form['bbcode']['#collapsed'] = FALSE;
246
-      $output .= '<p><span class="marker">';
247
-      $output .= t('The !bbcode_module is required to transform BBcode into HTML.
244
+        $ready_for_migration = 0;
245
+        $form['bbcode']['#collapsed'] = FALSE;
246
+        $output .= '<p><span class="marker">';
247
+        $output .= t('The !bbcode_module is required to transform BBcode into HTML.
248 248
         You first need to !enable_bbcode', array(
249
-          '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))),
250
-          '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules')));
251
-      $output .= '</span></p>';
249
+            '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))),
250
+            '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules')));
251
+        $output .= '</span></p>';
252 252
     }
253 253
     $sql = "SELECT COUNT(*) FROM {filters} WHERE module = 'bbcode' AND format = %d";
254 254
     $result = db_query($sql, $input_format);
255 255
     if (!db_result($result)) {
256
-      $form['bbcode']['#collapsed'] = FALSE;
257
-      $output .= '<p class="marker">'. t('You need to !enable_bbcode_input and
256
+        $form['bbcode']['#collapsed'] = FALSE;
257
+        $output .= '<p class="marker">'. t('You need to !enable_bbcode_input and
258 258
         then !configure_bbcode_options', array(
259
-          '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
260
-          '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'</p>';
259
+            '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
260
+            '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'</p>';
261 261
     }
262 262
     $output .= '<p>'. t('For best results, !disable_all_options', 
263 263
     array('!disable_all_options' => l(t('all four BBcode configure options should be disabled'), "admin/settings/filters/{$input_format}/configure"))) . '.</p>';
264
-  } else {
264
+    } else {
265 265
     if ($bbcode_disabled) {
266
-      $form['bbcode']['#collapsed'] = FALSE;
267
-      $output .= '<p>'. t('The !bbcode_module is recommended, but not required.
266
+        $form['bbcode']['#collapsed'] = FALSE;
267
+        $output .= '<p>'. t('The !bbcode_module is recommended, but not required.
268 268
         You may !enable_bbcode after having installed it.', array(
269
-          '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))),
270
-          '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))) .'</p>';
269
+            '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))),
270
+            '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))) .'</p>';
271 271
     }
272 272
     $output .= '<p>' . t('Don\'t forget to !enable_bbcode_input and then !configure_bbcode_options.', array(
273
-      '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
274
-      '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) . '</p>';
273
+        '!enable_bbcode_input' =>  l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"),
274
+        '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) . '</p>';
275 275
     $output .= '<p>' . t('You may want to enable it for other input formats, too.') . '</p>';
276
-  }
277
-  $output .= '<p><em>'. t('This setting will be applied to all posts, private
276
+    }
277
+    $output .= '<p><em>'. t('This setting will be applied to all posts, private
278 278
     messages and the users\' signature.') .'</em></p>';
279 279
     
280
-  $form['bbcode']['result'] = array('#value' => $output);
280
+    $form['bbcode']['result'] = array('#value' => $output);
281 281
   
282
-  // URL transform settings
283
-  $form['url_transforms'] = array(
282
+    // URL transform settings
283
+    $form['url_transforms'] = array(
284 284
     '#type' => 'fieldset',
285 285
     '#title' => t('URL transforms'),
286 286
     '#collapsible' => TRUE,
287 287
     '#collapsed' => TRUE,
288
-  );
289
-  if (!variable_get('boincimport_base_url_boinc', 0)) {
288
+    );
289
+    if (!variable_get('boincimport_base_url_boinc', 0)) {
290 290
     $form['url_transforms']['#collapsed']= FALSE;
291 291
     $output = '<span class="marker">';
292 292
     $ready_for_migration = 0;
293
-  }
293
+    }
294 294
 
295
-  // List of BOINC domains possible in URLs to transform
296
-  $form['url_transforms']['boincimport_base_url_boinc'] = array(
295
+    // List of BOINC domains possible in URLs to transform
296
+    $form['url_transforms']['boincimport_base_url_boinc'] = array(
297 297
     '#type' => 'textarea',
298 298
     '#title' => t('BOINC base URLs to transform'),
299 299
     '#default_value' => variable_get('boincimport_base_url_boinc', ''),
300 300
     '#description' => t('List URL bases that should be transformed from
301 301
       BOINC format to Drupal format (enter one domain per line, including http://).'),
302
-  );
302
+    );
303 303
 
304
-  // The Drupal domain to use in URL transform results
305
-  $form['url_transforms']['boincimport_base_url_drupal'] = array(
304
+    // The Drupal domain to use in URL transform results
305
+    $form['url_transforms']['boincimport_base_url_drupal'] = array(
306 306
     '#type' => 'textfield',
307 307
     '#title' => t('Target Drupal base URL'),
308 308
     '#default_value' => variable_get('boincimport_base_url_drupal', ''),
309 309
     '#description' => t('Specify the URL base to use in transform results. If
310 310
       left blank, the base_url configured in this Drupal environment will be
311 311
       used (currently: %url)', array('%url' =>$base_url)),
312
-  );
312
+    );
313 313
   
314
-  // Are we ready for migration?
315
-  $form['migration'] = array(
314
+    // Are we ready for migration?
315
+    $form['migration'] = array(
316 316
     '#type' => 'fieldset',
317 317
     '#title' => 'Migration',
318 318
     '#collapsible' => TRUE,
319 319
     '#collapsed' => FALSE,
320
-  );
321
-  variable_set('boincimport_ready', $ready_for_migration);
322
-  if ($ready_for_migration) {
320
+    );
321
+    variable_set('boincimport_ready', $ready_for_migration);
322
+    if ($ready_for_migration) {
323 323
     $output = '<p>'. t('Check the settings above one more time. If everything
324 324
       is ok, !proceed.', array('!proceed' => l(t('you can now proceed with the migration'), 'admin/boinc/import/process'))) .'</p>';
325
-  } else {
325
+    } else {
326 326
     $output = '<p class="marker">'. t('You are not ready for the migration yet.
327 327
       Please check the settings above.') .'</p>';
328
-  }
328
+    }
329 329
   
330
-  $form['migration']['info'] = array('#value' => $output);
331
-  return system_settings_form($form); 
330
+    $form['migration']['info'] = array('#value' => $output);
331
+    return system_settings_form($form); 
332 332
 }
333 333
 
334 334
 /**
335 335
  * Callback admin/boinc/import/post_configuration
336 336
  */
337 337
 function boincimport_post_configuration() {
338
-  $output = '<p>'. t('This page will help to tie up any loose ends following
338
+    $output = '<p>'. t('This page will help to tie up any loose ends following
339 339
     the BOINC data import process. Before continuing, it may be best to have
340 340
     already:') .'</p>';
341
-  $output .= '<ul>';
342
-  $output .= '<li>'. t('Imported users, teams, and forums using the BOINC
341
+    $output .= '<ul>';
342
+    $output .= '<li>'. t('Imported users, teams, and forums using the BOINC
343 343
     import module') .'</li>';
344
-  $output .= '<li>'. t('Imported any additional data using add on modules if
344
+    $output .= '<li>'. t('Imported any additional data using add on modules if
345 345
     available.') .'</li>';
346
-  $output .= '</ul>';
347
-  //User Set up
348
-  $output .= '<h2>'. t('User settings') .'</h2>';  
349
-  $output .= '<p>'. t('Make sure your !user_settings are correct. Specifically,
346
+    $output .= '</ul>';
347
+    //User Set up
348
+    $output .= '<h2>'. t('User settings') .'</h2>';  
349
+    $output .= '<p>'. t('Make sure your !user_settings are correct. Specifically,
350 350
     you can enable or disable signatures there. ', array(
351
-      '!user_settings' => l(t('user settings'), 'admin/user/settings')
351
+        '!user_settings' => l(t('user settings'), 'admin/user/settings')
352 352
     )) .'</p>'; 
353
-  $output .= '<p>' . t('Note that avatar/picture support is not tied to user
353
+    $output .= '<p>' . t('Note that avatar/picture support is not tied to user
354 354
     settings Picture support at this time.') . '</p>';
355
-  /*$output .= '<p>' . t('In order to activate avatar/picture support, you need to
355
+    /*$output .= '<p>' . t('In order to activate avatar/picture support, you need to
356 356
     enable pictures on this page and also:') . '</p>';
357 357
   $output .= '<ul>';
358 358
   $output .= '<li>'. t('Tick the checkboxes to allow "User pictures in posts" and/or
@@ -365,73 +365,73 @@  discard block
 block discarded – undo
365 365
     )) .'</li>';
366 366
   $output .= '</ul>'; */
367 367
   
368
-  // Forum Set up
369
-  $output .= '<h2>'. t('Forum settings') .'</h2>';
370
-  $output .= '<p>'. t('Check any additional changes to make on the
368
+    // Forum Set up
369
+    $output .= '<h2>'. t('Forum settings') .'</h2>';
370
+    $output .= '<p>'. t('Check any additional changes to make on the
371 371
     !forum_settings page.', array(
372
-      '!forum_settings' =>  l(t('forum settings'), 'admin/content/forum/settings')
372
+        '!forum_settings' =>  l(t('forum settings'), 'admin/content/forum/settings')
373 373
     )) .'</p>';
374
-  $output .= '<p>'. t('It also may be a good idea to look at the !forum_list to
374
+    $output .= '<p>'. t('It also may be a good idea to look at the !forum_list to
375 375
     verify that all necessary containers and forums are in place.', array(
376
-      '!forum_list' =>  l(t('forum list'), 'admin/content/forum')
376
+        '!forum_list' =>  l(t('forum list'), 'admin/content/forum')
377 377
     )) .'</p>';
378
-  /*$output .= '<p>'. t('If need be, set up the private forums as explained in the
378
+    /*$output .= '<p>'. t('If need be, set up the private forums as explained in the
379 379
     !documentation.', array(
380 380
       '!documentation' => l(t('documentation'), 'http://drupal.org/node/58969', array('attributes' => array('target' => '_blank')))
381 381
     )) .'</p>';
382 382
     */
383
-  /*
383
+    /*
384 384
   // Redirection from old URLs:
385 385
   $output .= '<h2>'. t('Redirection from BOINC forum URLs to new Drupal forum URLs') .'</h2>';
386 386
   $output .= '<p>'. t('Enable the boincforum_redirect.module. This way, users
387 387
     accessing URLs from your old BOINC installation will be redirected to your new
388 388
     Drupal forum.') .'</p>';
389 389
   */
390
-  // BBcode
391
-  $bbcode = variable_get('boincimport_bbcode', 0);
392
-  if ($bbcode) {
390
+    // BBcode
391
+    $bbcode = variable_get('boincimport_bbcode', 0);
392
+    if ($bbcode) {
393 393
     $output .= '<h2>'. t('Remove BBcode module') .'</h2>';
394 394
     $output .= '<p>'. t('The BBcode has been cleaned from the posts. You shouldn\'t
395 395
       need the bbcode module anymore. You can disable it.') .'</p>';
396
-  } else {
396
+    } else {
397 397
     $output .= '<h2>'. t('Configure BBcode module') .'</h2>';
398 398
     $output .= '<p>'. t('Most likely, there are many BOINC forum postings
399 399
       formatted in BBcode. It would be a good idea to verify that BBcode is
400 400
       being formatted correctly in the imported posts. Have a look around
401 401
       !the_forum.', array(
402 402
         '!the_forum' =>  l(t('the forum'), 'community')
403
-      )) . '</p>';
404
-  }
403
+        )) . '</p>';
404
+    }
405 405
 
406
-  return $output;
406
+    return $output;
407 407
 }
408 408
 
409 409
 /**
410 410
  * Callback admin/boinc/import
411 411
  */
412 412
 function boincimport_main() {
413
-  // Start with a quick sanity check on the BOINC environment
414
-  boinc_get_path();
415
-  // If that's ok, on with the show
416
-  $output .= t('You may want to !check_documentation before starting.', array(
413
+    // Start with a quick sanity check on the BOINC environment
414
+    boinc_get_path();
415
+    // If that's ok, on with the show
416
+    $output .= t('You may want to !check_documentation before starting.', array(
417 417
     '!check_documentation' => l(t('check the documentation'), 'http://boinc.berkeley.edu/trac/wiki/InstallDrupal', array('attributes' =>array('target' => '_blank')))
418
-  ));
419
-  $output = '<ol><li>';
420
-  $output .= l(t('Configure the migration'), 'admin/boinc/import/settings');
421
-  $output .= '</li>';
422
-  $output .= '<li>';
423
-  $output .= l(t('Execute the migration'), 'admin/boinc/import/process');
424
-  $output .= '</li>';
425
-  $output .= '<li>';
426
-  $output .= l(t('Post migration configuration'), 'admin/boinc/import/post_configuration');
427
-  $output .= '</li>';
428
-  $output .= '<li>';
429
-  $output .= t('!cleanup (Accessing this link will delete all the saved BOINC forum
418
+    ));
419
+    $output = '<ol><li>';
420
+    $output .= l(t('Configure the migration'), 'admin/boinc/import/settings');
421
+    $output .= '</li>';
422
+    $output .= '<li>';
423
+    $output .= l(t('Execute the migration'), 'admin/boinc/import/process');
424
+    $output .= '</li>';
425
+    $output .= '<li>';
426
+    $output .= l(t('Post migration configuration'), 'admin/boinc/import/post_configuration');
427
+    $output .= '</li>';
428
+    $output .= '<li>';
429
+    $output .= t('!cleanup (Accessing this link will delete all the saved BOINC forum
430 430
     conversion settings: click only when you\'re done with all the above.)', array(
431
-      '!cleanup' => l(t('Cleanup'), 'admin/boinc/import/cleanup')
431
+        '!cleanup' => l(t('Cleanup'), 'admin/boinc/import/cleanup')
432 432
     ));
433
-  $output .= '</li>';
434
-  /*$output .= '<li>';
433
+    $output .= '</li>';
434
+    /*$output .= '<li>';
435 435
   $output .= t('Enable the boincforum_redirect module for seamless redirection
436 436
     from the old forums to the new. This module requires !clean_urls to be active.', array(
437 437
       '!clean_urls' => l(t('Clean URLs'), 'admin/settings/clean-urls')
@@ -442,14 +442,14 @@  discard block
 block discarded – undo
442 442
     uninstall BOINC forum - This will delete tables necessary for redirection. You can,
443 443
     however, deactivate the module safely.');
444 444
   $output .= '</li>';*/
445
-  $output .= '</ol>';
445
+    $output .= '</ol>';
446 446
 
447
-  // process will die() if the link to the BOINC database is wrong:
448
-  $output .= '<p>'. t('If the BOINC data is in another database, but you made a
447
+    // process will die() if the link to the BOINC database is wrong:
448
+    $output .= '<p>'. t('If the BOINC data is in another database, but you made a
449 449
     mistake while setting up the data base url, you may be unable to access the
450 450
     setting page due to some limitations of the core of Drupal. !reset_db_url.', array(
451
-      '!reset_db_url' => l(t('Click here to reset the database url'), 'admin/boinc/import/reset')
451
+        '!reset_db_url' => l(t('Click here to reset the database url'), 'admin/boinc/import/reset')
452 452
     )) .'</p>';
453 453
 
454
-  return $output;
454
+    return $output;
455 455
 }
Please login to merge, or discard this patch.