Passed
Push — vko_enable_macos_tests_on_ci ( 796815...7029b8 )
by Vitalii
16:35
created
drupal/sites/all/features/global_search_solr/global_search_solr.module 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 // Hackish... but there doesn't seem to be a non-hackish way to change the
6 6
 // label on the search form!? Need a custom module to call hook_form_alter()...
7 7
 function global_search_solr_form_alter(&$form, &$form_state, $form_id) {
8
-  if ($form_id == 'apachesolr_search_custom_page_search_form') {
8
+    if ($form_id == 'apachesolr_search_custom_page_search_form') {
9 9
     $form['basic']['keys']['#title'] = t('Search');
10 10
     $form['basic']['keys']['#size'] = 40;
11
-  }
11
+    }
12 12
 }
Please login to merge, or discard this patch.
sites/all/features/private_messages/private_messages.panels_default.inc 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_default_panels_mini().
5 5
  */
6 6
 function private_messages_default_panels_mini() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  $mini = new stdClass;
10
-  $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
11
-  $mini->api_version = 1;
12
-  $mini->name = 'user_mail_summary';
13
-  $mini->category = 'BOINC';
14
-  $mini->admin_title = 'User mail summary';
15
-  $mini->admin_description = 'Mail widget for user dashboard';
16
-  $mini->requiredcontexts = array();
17
-  $mini->contexts = array();
18
-  $mini->relationships = array();
19
-  $display = new panels_display;
20
-  $display->layout = 'onecol';
21
-  $display->layout_settings = array();
22
-  $display->panel_settings = array(
9
+    $mini = new stdClass;
10
+    $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
11
+    $mini->api_version = 1;
12
+    $mini->name = 'user_mail_summary';
13
+    $mini->category = 'BOINC';
14
+    $mini->admin_title = 'User mail summary';
15
+    $mini->admin_description = 'Mail widget for user dashboard';
16
+    $mini->requiredcontexts = array();
17
+    $mini->contexts = array();
18
+    $mini->relationships = array();
19
+    $display = new panels_display;
20
+    $display->layout = 'onecol';
21
+    $display->layout_settings = array();
22
+    $display->panel_settings = array(
23 23
     'style_settings' => array(
24
-      'default' => NULL,
25
-      'middle' => NULL,
24
+        'default' => NULL,
25
+        'middle' => NULL,
26 26
     ),
27
-  );
28
-  $display->cache = array();
29
-  $display->title = 'Messages';
30
-  $display->storage_type = 'panels_mini';
31
-  $display->storage_id = 'user_mail_summary';
32
-  $display->content = array();
33
-  $display->panels = array();
27
+    );
28
+    $display->cache = array();
29
+    $display->title = 'Messages';
30
+    $display->storage_type = 'panels_mini';
31
+    $display->storage_id = 'user_mail_summary';
32
+    $display->content = array();
33
+    $display->panels = array();
34 34
     $pane = new stdClass;
35 35
     $pane->pid = 'new-1';
36 36
     $pane->panel = 'middle';
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
     $pane->shown = TRUE;
40 40
     $pane->access = array();
41 41
     $pane->configuration = array(
42
-      'admin_title' => 'Mail summary',
43
-      'title' => 'Messages',
44
-      'body' => '<?php
42
+        'admin_title' => 'Mail summary',
43
+        'title' => 'Messages',
44
+        'body' => '<?php
45 45
   $l1 = url(\'messages\');
46 46
   $l2 = url(\'messages/new\');
47 47
 ?>
@@ -51,22 +51,22 @@  discard block
 block discarded – undo
51 51
   </li>
52 52
   <li class="last tab"><a href="<?php echo $l2?>"><?php print bts(\'Compose new\', array(), NULL, \'boinc:account-dashboard\'); ?></a></li>
53 53
 </ul>',
54
-      'format' => '3',
55
-      'substitute' => TRUE,
54
+        'format' => '3',
55
+        'substitute' => TRUE,
56 56
     );
57 57
     $pane->cache = array();
58 58
     $pane->style = array(
59
-      'settings' => NULL,
59
+        'settings' => NULL,
60 60
     );
61 61
     $pane->css = array();
62 62
     $pane->extras = array();
63 63
     $pane->position = 0;
64 64
     $display->content['new-1'] = $pane;
65 65
     $display->panels['middle'][0] = 'new-1';
66
-  $display->hide_title = PANELS_TITLE_NONE;
67
-  $display->title_pane = 'new-1';
68
-  $mini->display = $display;
69
-  $export['user_mail_summary'] = $mini;
66
+    $display->hide_title = PANELS_TITLE_NONE;
67
+    $display->title_pane = 'new-1';
68
+    $mini->display = $display;
69
+    $export['user_mail_summary'] = $mini;
70 70
 
71
-  return $export;
71
+    return $export;
72 72
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.features.inc 1 patch
Indentation   +1672 added lines, -1672 removed lines patch added patch discarded remove patch
@@ -4,35 +4,35 @@  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
-  }
19
+    }
20 20
 }
21 21
 
22 22
 /**
23 23
  * Implementation of hook_flag_default_flags().
24 24
  */
25 25
 function boinc_standard_flag_default_flags() {
26
-  $flags = array();
27
-  // Exported flag: "Comment Abuse 1 SPAM".
28
-  $flags['abuse_comment_1'] = array(
26
+    $flags = array();
27
+    // Exported flag: "Comment Abuse 1 SPAM".
28
+    $flags['abuse_comment_1'] = array(
29 29
     'content_type' => 'comment',
30 30
     'title' => 'Comment Abuse 1 SPAM',
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
     'flag_short' => 'Flag as SPAM',
38 38
     'flag_long' => 'Flag this comment as SPAM.',
@@ -43,31 +43,31 @@  discard block
 block discarded – undo
43 43
     'unflag_denied_text' => '',
44 44
     'link_type' => 'toggle',
45 45
     'roles' => array(
46
-      'flag' => array(
46
+        'flag' => array(
47 47
         '0' => 2,
48
-      ),
49
-      'unflag' => array(
48
+        ),
49
+        'unflag' => array(
50 50
         '0' => 2,
51
-      ),
51
+        ),
52 52
     ),
53 53
     'weight' => 0,
54 54
     'access_author' => '',
55 55
     'show_on_comment' => 0,
56 56
     'module' => 'boinc_standard',
57 57
     'locked' => array(
58
-      '0' => 'name',
58
+        '0' => 'name',
59 59
     ),
60 60
     'api_version' => 2,
61
-  );
62
-  // Exported flag: "Comment Abuse 2 LINK".
63
-  $flags['abuse_comment_2'] = array(
61
+    );
62
+    // Exported flag: "Comment Abuse 2 LINK".
63
+    $flags['abuse_comment_2'] = array(
64 64
     'content_type' => 'comment',
65 65
     'title' => 'Comment Abuse 2 LINK',
66 66
     'global' => FALSE,
67 67
     'types' => array(
68
-      '0' => 'forum',
69
-      '1' => 'news',
70
-      '2' => 'team_forum',
68
+        '0' => 'forum',
69
+        '1' => 'news',
70
+        '2' => 'team_forum',
71 71
     ),
72 72
     'flag_short' => 'Flag as abusive link',
73 73
     'flag_long' => 'Flag this comment with abusive link.',
@@ -78,31 +78,31 @@  discard block
 block discarded – undo
78 78
     'unflag_denied_text' => '',
79 79
     'link_type' => 'toggle',
80 80
     'roles' => array(
81
-      'flag' => array(
81
+        'flag' => array(
82 82
         '0' => 2,
83
-      ),
84
-      'unflag' => array(
83
+        ),
84
+        'unflag' => array(
85 85
         '0' => 2,
86
-      ),
86
+        ),
87 87
     ),
88 88
     'weight' => 0,
89 89
     'access_author' => '',
90 90
     'show_on_comment' => 0,
91 91
     'module' => 'boinc_standard',
92 92
     'locked' => array(
93
-      '0' => 'name',
93
+        '0' => 'name',
94 94
     ),
95 95
     'api_version' => 2,
96
-  );
97
-  // Exported flag: "Comment Abuse 3 Hostile".
98
-  $flags['abuse_comment_3'] = array(
96
+    );
97
+    // Exported flag: "Comment Abuse 3 Hostile".
98
+    $flags['abuse_comment_3'] = array(
99 99
     'content_type' => 'comment',
100 100
     'title' => 'Comment Abuse 3 Hostile',
101 101
     'global' => FALSE,
102 102
     'types' => array(
103
-      '0' => 'forum',
104
-      '1' => 'news',
105
-      '2' => 'team_forum',
103
+        '0' => 'forum',
104
+        '1' => 'news',
105
+        '2' => 'team_forum',
106 106
     ),
107 107
     'flag_short' => 'Flag as hostile',
108 108
     'flag_long' => 'Flag this comment as hostile.',
@@ -113,31 +113,31 @@  discard block
 block discarded – undo
113 113
     'unflag_denied_text' => '',
114 114
     'link_type' => 'toggle',
115 115
     'roles' => array(
116
-      'flag' => array(
116
+        'flag' => array(
117 117
         '0' => 2,
118
-      ),
119
-      'unflag' => array(
118
+        ),
119
+        'unflag' => array(
120 120
         '0' => 2,
121
-      ),
121
+        ),
122 122
     ),
123 123
     'weight' => 0,
124 124
     'access_author' => '',
125 125
     'show_on_comment' => 0,
126 126
     'module' => 'boinc_standard',
127 127
     'locked' => array(
128
-      '0' => 'name',
128
+        '0' => 'name',
129 129
     ),
130 130
     'api_version' => 2,
131
-  );
132
-  // Exported flag: "Comment Abuse 4 Not Kid Friendly".
133
-  $flags['abuse_comment_4'] = array(
131
+    );
132
+    // Exported flag: "Comment Abuse 4 Not Kid Friendly".
133
+    $flags['abuse_comment_4'] = array(
134 134
     'content_type' => 'comment',
135 135
     'title' => 'Comment Abuse 4 Not Kid Friendly',
136 136
     'global' => FALSE,
137 137
     'types' => array(
138
-      '0' => 'forum',
139
-      '1' => 'news',
140
-      '2' => 'team_forum',
138
+        '0' => 'forum',
139
+        '1' => 'news',
140
+        '2' => 'team_forum',
141 141
     ),
142 142
     'flag_short' => 'Flag as not kid-friendly',
143 143
     'flag_long' => 'Flag this comment as not kid-friendly.',
@@ -148,31 +148,31 @@  discard block
 block discarded – undo
148 148
     'unflag_denied_text' => '',
149 149
     'link_type' => 'toggle',
150 150
     'roles' => array(
151
-      'flag' => array(
151
+        'flag' => array(
152 152
         '0' => 2,
153
-      ),
154
-      'unflag' => array(
153
+        ),
154
+        'unflag' => array(
155 155
         '0' => 2,
156
-      ),
156
+        ),
157 157
     ),
158 158
     'weight' => 0,
159 159
     'access_author' => '',
160 160
     'show_on_comment' => 0,
161 161
     'module' => 'boinc_standard',
162 162
     'locked' => array(
163
-      '0' => 'name',
163
+        '0' => 'name',
164 164
     ),
165 165
     'api_version' => 2,
166
-  );
167
-  // Exported flag: "Comment Abuse 5 Other".
168
-  $flags['abuse_comment_5'] = array(
166
+    );
167
+    // Exported flag: "Comment Abuse 5 Other".
168
+    $flags['abuse_comment_5'] = array(
169 169
     'content_type' => 'comment',
170 170
     'title' => 'Comment Abuse 5 Other',
171 171
     'global' => FALSE,
172 172
     'types' => array(
173
-      '0' => 'forum',
174
-      '1' => 'news',
175
-      '2' => 'team_forum',
173
+        '0' => 'forum',
174
+        '1' => 'news',
175
+        '2' => 'team_forum',
176 176
     ),
177 177
     'flag_short' => 'Flag as other',
178 178
     'flag_long' => 'Flag this comment - other reason',
@@ -183,31 +183,31 @@  discard block
 block discarded – undo
183 183
     'unflag_denied_text' => '',
184 184
     'link_type' => 'toggle',
185 185
     'roles' => array(
186
-      'flag' => array(
186
+        'flag' => array(
187 187
         '0' => 2,
188
-      ),
189
-      'unflag' => array(
188
+        ),
189
+        'unflag' => array(
190 190
         '0' => 2,
191
-      ),
191
+        ),
192 192
     ),
193 193
     'weight' => 0,
194 194
     'access_author' => '',
195 195
     'show_on_comment' => 0,
196 196
     'module' => 'boinc_standard',
197 197
     'locked' => array(
198
-      '0' => 'name',
198
+        '0' => 'name',
199 199
     ),
200 200
     'api_version' => 2,
201
-  );
202
-  // Exported flag: "Comment Abuse meta".
203
-  $flags['abuse_comment_meta'] = array(
201
+    );
202
+    // Exported flag: "Comment Abuse meta".
203
+    $flags['abuse_comment_meta'] = array(
204 204
     'content_type' => 'comment',
205 205
     'title' => 'Comment Abuse meta',
206 206
     'global' => '0',
207 207
     'types' => array(
208
-      '0' => 'forum',
209
-      '1' => 'news',
210
-      '2' => 'team_forum',
208
+        '0' => 'forum',
209
+        '1' => 'news',
210
+        '2' => 'team_forum',
211 211
     ),
212 212
     'flag_short' => 'Report',
213 213
     'flag_long' => 'Report comment.',
@@ -218,31 +218,31 @@  discard block
 block discarded – undo
218 218
     'unflag_denied_text' => '',
219 219
     'link_type' => 'toggle',
220 220
     'roles' => array(
221
-      'flag' => array(
221
+        'flag' => array(
222 222
         '0' => 2,
223
-      ),
224
-      'unflag' => array(
223
+        ),
224
+        'unflag' => array(
225 225
         '0' => 2,
226
-      ),
226
+        ),
227 227
     ),
228 228
     'weight' => 0,
229 229
     'access_author' => '',
230 230
     'show_on_comment' => 1,
231 231
     'module' => 'boinc_standard',
232 232
     'locked' => array(
233
-      '0' => 'name',
233
+        '0' => 'name',
234 234
     ),
235 235
     'api_version' => 2,
236
-  );
237
-  // Exported flag: "Node Abuse 1 SPAM".
238
-  $flags['abuse_node_1'] = array(
236
+    );
237
+    // Exported flag: "Node Abuse 1 SPAM".
238
+    $flags['abuse_node_1'] = array(
239 239
     'content_type' => 'node',
240 240
     'title' => 'Node Abuse 1 SPAM',
241 241
     'global' => FALSE,
242 242
     'types' => array(
243
-      '0' => 'forum',
244
-      '1' => 'news',
245
-      '2' => 'team_forum',
243
+        '0' => 'forum',
244
+        '1' => 'news',
245
+        '2' => 'team_forum',
246 246
     ),
247 247
     'flag_short' => 'Flag as SPAM',
248 248
     'flag_long' => 'Flag this content SPAM.',
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
     'unflag_denied_text' => '',
254 254
     'link_type' => 'toggle',
255 255
     'roles' => array(
256
-      'flag' => array(
256
+        'flag' => array(
257 257
         '0' => 2,
258
-      ),
259
-      'unflag' => array(
258
+        ),
259
+        'unflag' => array(
260 260
         '0' => 2,
261
-      ),
261
+        ),
262 262
     ),
263 263
     'weight' => 0,
264 264
     'show_on_page' => 0,
@@ -268,19 +268,19 @@  discard block
 block discarded – undo
268 268
     'i18n' => '0',
269 269
     'module' => 'boinc_standard',
270 270
     'locked' => array(
271
-      '0' => 'name',
271
+        '0' => 'name',
272 272
     ),
273 273
     'api_version' => 2,
274
-  );
275
-  // Exported flag: "Node Abuse 2 Link".
276
-  $flags['abuse_node_2'] = array(
274
+    );
275
+    // Exported flag: "Node Abuse 2 Link".
276
+    $flags['abuse_node_2'] = array(
277 277
     'content_type' => 'node',
278 278
     'title' => 'Node Abuse 2 Link',
279 279
     'global' => FALSE,
280 280
     'types' => array(
281
-      '0' => 'forum',
282
-      '1' => 'news',
283
-      '2' => 'team_forum',
281
+        '0' => 'forum',
282
+        '1' => 'news',
283
+        '2' => 'team_forum',
284 284
     ),
285 285
     'flag_short' => 'Report as abusive link',
286 286
     'flag_long' => 'Flag this content as abusive link.',
@@ -291,12 +291,12 @@  discard block
 block discarded – undo
291 291
     'unflag_denied_text' => '',
292 292
     'link_type' => 'toggle',
293 293
     'roles' => array(
294
-      'flag' => array(
294
+        'flag' => array(
295 295
         '0' => 2,
296
-      ),
297
-      'unflag' => array(
296
+        ),
297
+        'unflag' => array(
298 298
         '0' => 2,
299
-      ),
299
+        ),
300 300
     ),
301 301
     'weight' => 0,
302 302
     'show_on_page' => 0,
@@ -306,19 +306,19 @@  discard block
 block discarded – undo
306 306
     'i18n' => '0',
307 307
     'module' => 'boinc_standard',
308 308
     'locked' => array(
309
-      '0' => 'name',
309
+        '0' => 'name',
310 310
     ),
311 311
     'api_version' => 2,
312
-  );
313
-  // Exported flag: "Node Abuse 3 Hostile".
314
-  $flags['abuse_node_3'] = array(
312
+    );
313
+    // Exported flag: "Node Abuse 3 Hostile".
314
+    $flags['abuse_node_3'] = array(
315 315
     'content_type' => 'node',
316 316
     'title' => 'Node Abuse 3 Hostile',
317 317
     'global' => FALSE,
318 318
     'types' => array(
319
-      '0' => 'forum',
320
-      '1' => 'news',
321
-      '2' => 'team_forum',
319
+        '0' => 'forum',
320
+        '1' => 'news',
321
+        '2' => 'team_forum',
322 322
     ),
323 323
     'flag_short' => 'Flag as hostile',
324 324
     'flag_long' => 'Flag this content as hostile.',
@@ -329,12 +329,12 @@  discard block
 block discarded – undo
329 329
     'unflag_denied_text' => '',
330 330
     'link_type' => 'toggle',
331 331
     'roles' => array(
332
-      'flag' => array(
332
+        'flag' => array(
333 333
         '0' => 2,
334
-      ),
335
-      'unflag' => array(
334
+        ),
335
+        'unflag' => array(
336 336
         '0' => 2,
337
-      ),
337
+        ),
338 338
     ),
339 339
     'weight' => 0,
340 340
     'show_on_page' => 0,
@@ -344,19 +344,19 @@  discard block
 block discarded – undo
344 344
     'i18n' => '0',
345 345
     'module' => 'boinc_standard',
346 346
     'locked' => array(
347
-      '0' => 'name',
347
+        '0' => 'name',
348 348
     ),
349 349
     'api_version' => 2,
350
-  );
351
-  // Exported flag: "Node Abuse 4 Not Kid Friendly".
352
-  $flags['abuse_node_4'] = array(
350
+    );
351
+    // Exported flag: "Node Abuse 4 Not Kid Friendly".
352
+    $flags['abuse_node_4'] = array(
353 353
     'content_type' => 'node',
354 354
     'title' => 'Node Abuse 4 Not Kid Friendly',
355 355
     'global' => FALSE,
356 356
     'types' => array(
357
-      '0' => 'forum',
358
-      '1' => 'news',
359
-      '2' => 'team_forum',
357
+        '0' => 'forum',
358
+        '1' => 'news',
359
+        '2' => 'team_forum',
360 360
     ),
361 361
     'flag_short' => 'Flag as not kid-friendly',
362 362
     'flag_long' => 'Flag this content as not kid-friendly.',
@@ -367,12 +367,12 @@  discard block
 block discarded – undo
367 367
     'unflag_denied_text' => '',
368 368
     'link_type' => 'toggle',
369 369
     'roles' => array(
370
-      'flag' => array(
370
+        'flag' => array(
371 371
         '0' => 2,
372
-      ),
373
-      'unflag' => array(
372
+        ),
373
+        'unflag' => array(
374 374
         '0' => 2,
375
-      ),
375
+        ),
376 376
     ),
377 377
     'weight' => 0,
378 378
     'show_on_page' => 0,
@@ -382,19 +382,19 @@  discard block
 block discarded – undo
382 382
     'i18n' => '0',
383 383
     'module' => 'boinc_standard',
384 384
     'locked' => array(
385
-      '0' => 'name',
385
+        '0' => 'name',
386 386
     ),
387 387
     'api_version' => 2,
388
-  );
389
-  // Exported flag: "Node Abuse 5 Other".
390
-  $flags['abuse_node_5'] = array(
388
+    );
389
+    // Exported flag: "Node Abuse 5 Other".
390
+    $flags['abuse_node_5'] = array(
391 391
     'content_type' => 'node',
392 392
     'title' => 'Node Abuse 5 Other',
393 393
     'global' => FALSE,
394 394
     'types' => array(
395
-      '0' => 'forum',
396
-      '1' => 'news',
397
-      '2' => 'team_forum',
395
+        '0' => 'forum',
396
+        '1' => 'news',
397
+        '2' => 'team_forum',
398 398
     ),
399 399
     'flag_short' => 'Flag as other',
400 400
     'flag_long' => 'Flag this content - other reason.',
@@ -405,12 +405,12 @@  discard block
 block discarded – undo
405 405
     'unflag_denied_text' => '',
406 406
     'link_type' => 'toggle',
407 407
     'roles' => array(
408
-      'flag' => array(
408
+        'flag' => array(
409 409
         '0' => 2,
410
-      ),
411
-      'unflag' => array(
410
+        ),
411
+        'unflag' => array(
412 412
         '0' => 2,
413
-      ),
413
+        ),
414 414
     ),
415 415
     'weight' => 0,
416 416
     'show_on_page' => 0,
@@ -420,19 +420,19 @@  discard block
 block discarded – undo
420 420
     'i18n' => '0',
421 421
     'module' => 'boinc_standard',
422 422
     'locked' => array(
423
-      '0' => 'name',
423
+        '0' => 'name',
424 424
     ),
425 425
     'api_version' => 2,
426
-  );
427
-  // Exported flag: "Node Abuse meta".
428
-  $flags['abuse_node_meta'] = array(
426
+    );
427
+    // Exported flag: "Node Abuse meta".
428
+    $flags['abuse_node_meta'] = array(
429 429
     'content_type' => 'node',
430 430
     'title' => 'Node Abuse meta',
431 431
     'global' => FALSE,
432 432
     'types' => array(
433
-      '0' => 'forum',
434
-      '1' => 'news',
435
-      '2' => 'team_forum',
433
+        '0' => 'forum',
434
+        '1' => 'news',
435
+        '2' => 'team_forum',
436 436
     ),
437 437
     'flag_short' => 'Report',
438 438
     'flag_long' => 'Report content',
@@ -443,12 +443,12 @@  discard block
 block discarded – undo
443 443
     'unflag_denied_text' => '',
444 444
     'link_type' => 'toggle',
445 445
     'roles' => array(
446
-      'flag' => array(
446
+        'flag' => array(
447 447
         '0' => 2,
448
-      ),
449
-      'unflag' => array(
448
+        ),
449
+        'unflag' => array(
450 450
         '0' => 2,
451
-      ),
451
+        ),
452 452
     ),
453 453
     'weight' => 0,
454 454
     'show_on_page' => 1,
@@ -458,12 +458,12 @@  discard block
 block discarded – undo
458 458
     'i18n' => '0',
459 459
     'module' => 'boinc_standard',
460 460
     'locked' => array(
461
-      '0' => 'name',
461
+        '0' => 'name',
462 462
     ),
463 463
     'api_version' => 2,
464
-  );
465
-  // Exported flag: "User Abuse 1 SPAM".
466
-  $flags['abuse_user_1'] = array(
464
+    );
465
+    // Exported flag: "User Abuse 1 SPAM".
466
+    $flags['abuse_user_1'] = array(
467 467
     'content_type' => 'user',
468 468
     'title' => 'User Abuse 1 SPAM',
469 469
     'global' => FALSE,
@@ -477,24 +477,24 @@  discard block
 block discarded – undo
477 477
     'unflag_denied_text' => '',
478 478
     'link_type' => 'toggle',
479 479
     'roles' => array(
480
-      'flag' => array(
480
+        'flag' => array(
481 481
         '0' => 2,
482
-      ),
483
-      'unflag' => array(
482
+        ),
483
+        'unflag' => array(
484 484
         '0' => 2,
485
-      ),
485
+        ),
486 486
     ),
487 487
     'weight' => 0,
488 488
     'show_on_profile' => 0,
489 489
     'access_uid' => '',
490 490
     'module' => 'boinc_standard',
491 491
     'locked' => array(
492
-      '0' => 'name',
492
+        '0' => 'name',
493 493
     ),
494 494
     'api_version' => 2,
495
-  );
496
-  // Exported flag: "User Abuse 2 Link".
497
-  $flags['abuse_user_2'] = array(
495
+    );
496
+    // Exported flag: "User Abuse 2 Link".
497
+    $flags['abuse_user_2'] = array(
498 498
     'content_type' => 'user',
499 499
     'title' => 'User Abuse 2 Link',
500 500
     'global' => FALSE,
@@ -508,24 +508,24 @@  discard block
 block discarded – undo
508 508
     'unflag_denied_text' => '',
509 509
     'link_type' => 'toggle',
510 510
     'roles' => array(
511
-      'flag' => array(
511
+        'flag' => array(
512 512
         '0' => 2,
513
-      ),
514
-      'unflag' => array(
513
+        ),
514
+        'unflag' => array(
515 515
         '0' => 2,
516
-      ),
516
+        ),
517 517
     ),
518 518
     'weight' => 0,
519 519
     'show_on_profile' => 0,
520 520
     'access_uid' => '',
521 521
     'module' => 'boinc_standard',
522 522
     'locked' => array(
523
-      '0' => 'name',
523
+        '0' => 'name',
524 524
     ),
525 525
     'api_version' => 2,
526
-  );
527
-  // Exported flag: "User Abuse 3 Not Kid Friendly".
528
-  $flags['abuse_user_3'] = array(
526
+    );
527
+    // Exported flag: "User Abuse 3 Not Kid Friendly".
528
+    $flags['abuse_user_3'] = array(
529 529
     'content_type' => 'user',
530 530
     'title' => 'User Abuse 3 Not Kid Friendly',
531 531
     'global' => FALSE,
@@ -539,24 +539,24 @@  discard block
 block discarded – undo
539 539
     'unflag_denied_text' => '',
540 540
     'link_type' => 'toggle',
541 541
     'roles' => array(
542
-      'flag' => array(
542
+        'flag' => array(
543 543
         '0' => 2,
544
-      ),
545
-      'unflag' => array(
544
+        ),
545
+        'unflag' => array(
546 546
         '0' => 2,
547
-      ),
547
+        ),
548 548
     ),
549 549
     'weight' => 0,
550 550
     'show_on_profile' => 0,
551 551
     'access_uid' => '',
552 552
     'module' => 'boinc_standard',
553 553
     'locked' => array(
554
-      '0' => 'name',
554
+        '0' => 'name',
555 555
     ),
556 556
     'api_version' => 2,
557
-  );
558
-  // Exported flag: "User Abuse 4 Other".
559
-  $flags['abuse_user_4'] = array(
557
+    );
558
+    // Exported flag: "User Abuse 4 Other".
559
+    $flags['abuse_user_4'] = array(
560 560
     'content_type' => 'user',
561 561
     'title' => 'User Abuse 4 Other',
562 562
     'global' => FALSE,
@@ -570,24 +570,24 @@  discard block
 block discarded – undo
570 570
     'unflag_denied_text' => '',
571 571
     'link_type' => 'toggle',
572 572
     'roles' => array(
573
-      'flag' => array(
573
+        'flag' => array(
574 574
         '0' => 2,
575
-      ),
576
-      'unflag' => array(
575
+        ),
576
+        'unflag' => array(
577 577
         '0' => 2,
578
-      ),
578
+        ),
579 579
     ),
580 580
     'weight' => 0,
581 581
     'show_on_profile' => 0,
582 582
     'access_uid' => '',
583 583
     'module' => 'boinc_standard',
584 584
     'locked' => array(
585
-      '0' => 'name',
585
+        '0' => 'name',
586 586
     ),
587 587
     'api_version' => 2,
588
-  );
589
-  // Exported flag: "User Abuse Meta".
590
-  $flags['abuse_user_meta'] = array(
588
+    );
589
+    // Exported flag: "User Abuse Meta".
590
+    $flags['abuse_user_meta'] = array(
591 591
     'content_type' => 'user',
592 592
     'title' => 'User Abuse Meta',
593 593
     'global' => FALSE,
@@ -601,31 +601,31 @@  discard block
 block discarded – undo
601 601
     'unflag_denied_text' => '',
602 602
     'link_type' => 'toggle',
603 603
     'roles' => array(
604
-      'flag' => array(
604
+        'flag' => array(
605 605
         '0' => 2,
606
-      ),
607
-      'unflag' => array(
606
+        ),
607
+        'unflag' => array(
608 608
         '0' => 2,
609
-      ),
609
+        ),
610 610
     ),
611 611
     'weight' => 0,
612 612
     'show_on_profile' => 1,
613 613
     'access_uid' => '',
614 614
     'module' => 'boinc_standard',
615 615
     'locked' => array(
616
-      '0' => 'name',
616
+        '0' => 'name',
617 617
     ),
618 618
     'api_version' => 2,
619
-  );
620
-  // Exported flag: "Subscriptions".
621
-  $flags['subscriptions'] = array(
619
+    );
620
+    // Exported flag: "Subscriptions".
621
+    $flags['subscriptions'] = array(
622 622
     'content_type' => 'node',
623 623
     'title' => 'Subscriptions',
624 624
     'global' => '0',
625 625
     'types' => array(
626
-      '0' => 'forum',
627
-      '1' => 'news',
628
-      '2' => 'team_forum',
626
+        '0' => 'forum',
627
+        '1' => 'news',
628
+        '2' => 'team_forum',
629 629
     ),
630 630
     'flag_short' => 'subscribe',
631 631
     'flag_long' => 'Subscribe to this topic',
@@ -636,12 +636,12 @@  discard block
 block discarded – undo
636 636
     'unflag_denied_text' => '',
637 637
     'link_type' => 'toggle',
638 638
     'roles' => array(
639
-      'flag' => array(
639
+        'flag' => array(
640 640
         '0' => 2,
641
-      ),
642
-      'unflag' => array(
641
+        ),
642
+        'unflag' => array(
643 643
         '0' => 2,
644
-      ),
644
+        ),
645 645
     ),
646 646
     'weight' => 0,
647 647
     'show_on_page' => 1,
@@ -651,11 +651,11 @@  discard block
 block discarded – undo
651 651
     'i18n' => '0',
652 652
     'module' => 'boinc_standard',
653 653
     'locked' => array(
654
-      '0' => 'name',
654
+        '0' => 'name',
655 655
     ),
656 656
     'api_version' => 2,
657
-  );
658
-  return $flags;
657
+    );
658
+    return $flags;
659 659
 
660 660
 }
661 661
 
@@ -663,47 +663,47 @@  discard block
 block discarded – undo
663 663
  * Implementation of hook_node_info().
664 664
  */
665 665
 function boinc_standard_node_info() {
666
-  $items = array(
666
+    $items = array(
667 667
     'page' => array(
668
-      'name' => t('Page'),
669
-      'module' => 'features',
670
-      '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.'),
671
-      'has_title' => '1',
672
-      'title_label' => t('Title'),
673
-      'has_body' => '1',
674
-      'body_label' => t('Body'),
675
-      'min_word_count' => '0',
676
-      'help' => '',
668
+        'name' => t('Page'),
669
+        'module' => 'features',
670
+        '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.'),
671
+        'has_title' => '1',
672
+        'title_label' => t('Title'),
673
+        'has_body' => '1',
674
+        'body_label' => t('Body'),
675
+        'min_word_count' => '0',
676
+        'help' => '',
677 677
     ),
678
-  );
679
-  return $items;
678
+    );
679
+    return $items;
680 680
 }
681 681
 
682 682
 /**
683 683
  * Implementation of hook_rules_defaults().
684 684
  */
685 685
 function boinc_standard_rules_defaults() {
686
-  return array(
686
+    return array(
687 687
     'rules' => array(
688
-      'rules_notify_admins_about_circular_merge_error' => array(
688
+        'rules_notify_admins_about_circular_merge_error' => array(
689 689
         '#type' => 'rule',
690 690
         '#set' => 'event_boincwork_circular_merge_error',
691 691
         '#label' => 'Notify admins about circular merge error',
692 692
         '#active' => 1,
693 693
         '#weight' => '0',
694 694
         '#categories' => array(
695
-          '0' => 'boinc_standard',
696
-          '1' => 'admin notification',
695
+            '0' => 'boinc_standard',
696
+            '1' => 'admin notification',
697 697
         ),
698 698
         '#status' => 'default',
699 699
         '#conditions' => array(),
700 700
         '#actions' => array(
701
-          '0' => array(
701
+            '0' => array(
702 702
             '#type' => 'action',
703 703
             '#settings' => array(
704
-              'from' => '',
705
-              'subject' => '[subject_tag:string] Circular host merging error',
706
-              '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.
704
+                'from' => '',
705
+                'subject' => '[subject_tag:string] Circular host merging error',
706
+                '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 707
 
708 708
 Information about this host merge attempt:
709 709
 <?php
@@ -714,62 +714,62 @@  discard block
 block discarded – undo
714 714
 print "BOINC id: " . $account->boincuser_id . "\\n";
715 715
 print "Drupal UID: " . $user->uid . "\\n";
716 716
 ?>',
717
-              '#eval input' => array(
717
+                '#eval input' => array(
718 718
                 'token_rules_input_evaluator' => array(
719
-                  'subject' => array(
719
+                    'subject' => array(
720 720
                     '0' => 'subject_tag',
721 721
                     '1' => ':global',
722
-                  ),
723
-                  'message' => array(
722
+                    ),
723
+                    'message' => array(
724 724
                     '0' => ':global',
725
-                  ),
726
-                  'from' => array(
725
+                    ),
726
+                    'from' => array(
727 727
                     '0' => ':global',
728
-                  ),
728
+                    ),
729 729
                 ),
730 730
                 'rules_input_evaluator_php' => array(
731
-                  'message' => array(
731
+                    'message' => array(
732 732
                     '0' => 'oldhost_id',
733 733
                     '1' => 'targethost_id',
734 734
                     '2' => 'user',
735
-                  ),
735
+                    ),
736
+                ),
736 737
                 ),
737
-              ),
738 738
             ),
739 739
             '#name' => 'boinccore_rules_action_mail_to_admins',
740 740
             '#info' => array(
741
-              'label' => 'Notify admins via email',
742
-              'module' => 'BOINC core',
743
-              'eval input' => array(
741
+                'label' => 'Notify admins via email',
742
+                'module' => 'BOINC core',
743
+                'eval input' => array(
744 744
                 '0' => 'subject',
745 745
                 '1' => 'message',
746 746
                 '2' => 'from',
747
-              ),
747
+                ),
748 748
             ),
749 749
             '#weight' => 0.0,
750
-          ),
750
+            ),
751 751
         ),
752 752
         '#version' => 6003,
753
-      ),
754
-      'rules_notify_admins_about_zombie_merge_attempt' => array(
753
+        ),
754
+        'rules_notify_admins_about_zombie_merge_attempt' => array(
755 755
         '#type' => 'rule',
756 756
         '#set' => 'event_boincwork_zombie_merge_error',
757 757
         '#label' => 'Notify admins about zombie merge attempt',
758 758
         '#active' => 1,
759 759
         '#weight' => '0',
760 760
         '#categories' => array(
761
-          '0' => 'boinc_standard',
762
-          '1' => 'admin notification',
761
+            '0' => 'boinc_standard',
762
+            '1' => 'admin notification',
763 763
         ),
764 764
         '#status' => 'default',
765 765
         '#conditions' => array(),
766 766
         '#actions' => array(
767
-          '0' => array(
767
+            '0' => array(
768 768
             '#type' => 'action',
769 769
             '#settings' => array(
770
-              'from' => '',
771
-              'subject' => '[subject_tag:string] Zombie host merging error',
772
-              '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.
770
+                'from' => '',
771
+                'subject' => '[subject_tag:string] Zombie host merging error',
772
+                '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 773
 I.e., $target_host->userid == 0
774 774
 
775 775
 Information about this host merge attempt:
@@ -781,3303 +781,3303 @@  discard block
 block discarded – undo
781 781
 print "BOINC id: " . $account->boincuser_id . "\\n";
782 782
 print "Drupal UID: " . $user->uid . "\\n";
783 783
 ?>',
784
-              '#eval input' => array(
784
+                '#eval input' => array(
785 785
                 'token_rules_input_evaluator' => array(
786
-                  'subject' => array(
786
+                    'subject' => array(
787 787
                     '0' => 'subject_tag',
788 788
                     '1' => ':global',
789
-                  ),
790
-                  'message' => array(
789
+                    ),
790
+                    'message' => array(
791 791
                     '0' => ':global',
792
-                  ),
793
-                  'from' => array(
792
+                    ),
793
+                    'from' => array(
794 794
                     '0' => ':global',
795
-                  ),
795
+                    ),
796 796
                 ),
797 797
                 'rules_input_evaluator_php' => array(
798
-                  'message' => array(
798
+                    'message' => array(
799 799
                     '0' => 'oldhost_id',
800 800
                     '1' => 'targethost_id',
801 801
                     '2' => 'user',
802
-                  ),
802
+                    ),
803
+                ),
803 804
                 ),
804
-              ),
805 805
             ),
806 806
             '#name' => 'boinccore_rules_action_mail_to_admins',
807 807
             '#info' => array(
808
-              'label' => 'Notify admins via email',
809
-              'module' => 'BOINC core',
810
-              'eval input' => array(
808
+                'label' => 'Notify admins via email',
809
+                'module' => 'BOINC core',
810
+                'eval input' => array(
811 811
                 '0' => 'subject',
812 812
                 '1' => 'message',
813 813
                 '2' => 'from',
814
-              ),
814
+                ),
815 815
             ),
816 816
             '#weight' => 0.0,
817
-          ),
817
+            ),
818 818
         ),
819 819
         '#version' => 6003,
820
-      ),
821
-      'rules_notify_admins_error_when_user_consenting_with_missing_consent_type' => array(
820
+        ),
821
+        'rules_notify_admins_error_when_user_consenting_with_missing_consent_type' => array(
822 822
         '#type' => 'rule',
823 823
         '#set' => 'event_boincuser_general_consent_type_error',
824 824
         '#label' => 'Notify admins error when user consenting with missing consent type',
825 825
         '#active' => 1,
826 826
         '#weight' => '0',
827 827
         '#categories' => array(
828
-          '0' => 'boinc_standard',
829
-          '1' => 'admin notification',
828
+            '0' => 'boinc_standard',
829
+            '1' => 'admin notification',
830 830
         ),
831 831
         '#status' => 'default',
832 832
         '#conditions' => array(),
833 833
         '#actions' => array(
834
-          '0' => array(
834
+            '0' => array(
835 835
             '#type' => 'action',
836 836
             '#settings' => array(
837
-              'from' => '',
838
-              'subject' => '[subject_tag:string] Error from user consenting to terms of use, missing consent type',
839
-              '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.',
840
-              '#eval input' => array(
837
+                'from' => '',
838
+                'subject' => '[subject_tag:string] Error from user consenting to terms of use, missing consent type',
839
+                '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.',
840
+                '#eval input' => array(
841 841
                 'token_rules_input_evaluator' => array(
842
-                  'subject' => array(
842
+                    'subject' => array(
843 843
                     '0' => 'subject_tag',
844 844
                     '1' => ':global',
845
-                  ),
846
-                  'message' => array(
845
+                    ),
846
+                    'message' => array(
847 847
                     '0' => 'consent_type',
848 848
                     '1' => 'user',
849 849
                     '2' => ':global',
850
-                  ),
851
-                  'from' => array(
850
+                    ),
851
+                    'from' => array(
852 852
                     '0' => ':global',
853
-                  ),
853
+                    ),
854
+                ),
854 855
                 ),
855
-              ),
856 856
             ),
857 857
             '#name' => 'boinccore_rules_action_mail_to_admins',
858 858
             '#info' => array(
859
-              'label' => 'Notify admins via email',
860
-              'module' => 'BOINC core',
861
-              'eval input' => array(
859
+                'label' => 'Notify admins via email',
860
+                'module' => 'BOINC core',
861
+                'eval input' => array(
862 862
                 '0' => 'subject',
863 863
                 '1' => 'message',
864 864
                 '2' => 'from',
865
-              ),
865
+                ),
866 866
             ),
867 867
             '#weight' => 0.0,
868
-          ),
868
+            ),
869 869
         ),
870 870
         '#version' => 6003,
871
-      ),
872
-      'rules_notify_admins_user_changing_email_address_to_existing_user' => array(
871
+        ),
872
+        'rules_notify_admins_user_changing_email_address_to_existing_user' => array(
873 873
         '#type' => 'rule',
874 874
         '#set' => 'event_boincuser_change_email_error',
875 875
         '#label' => 'Notify admins user changing email address to existing user',
876 876
         '#active' => 1,
877 877
         '#weight' => '0',
878 878
         '#categories' => array(
879
-          '0' => 'boinc_standard',
880
-          '1' => 'admin notification',
879
+            '0' => 'boinc_standard',
880
+            '1' => 'admin notification',
881 881
         ),
882 882
         '#status' => 'default',
883 883
         '#conditions' => array(),
884 884
         '#actions' => array(
885
-          '0' => array(
885
+            '0' => array(
886 886
             '#type' => 'action',
887 887
             '#settings' => array(
888
-              'from' => '',
889
-              'subject' => '[subject_tag:string] User attempted to change email address to one used by existing user.',
890
-              '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.',
891
-              '#eval input' => array(
888
+                'from' => '',
889
+                'subject' => '[subject_tag:string] User attempted to change email address to one used by existing user.',
890
+                '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.',
891
+                '#eval input' => array(
892 892
                 'token_rules_input_evaluator' => array(
893
-                  'subject' => array(
893
+                    'subject' => array(
894 894
                     '0' => 'subject_tag',
895 895
                     '1' => ':global',
896
-                  ),
897
-                  'message' => array(
896
+                    ),
897
+                    'message' => array(
898 898
                     '0' => 'new_email_addr',
899 899
                     '1' => 'user',
900 900
                     '2' => ':global',
901
-                  ),
902
-                  'from' => array(
901
+                    ),
902
+                    'from' => array(
903 903
                     '0' => ':global',
904
-                  ),
904
+                    ),
905
+                ),
905 906
                 ),
906
-              ),
907 907
             ),
908 908
             '#name' => 'boinccore_rules_action_mail_to_admins',
909 909
             '#info' => array(
910
-              'label' => 'Notify admins via email',
911
-              'module' => 'BOINC core',
912
-              'eval input' => array(
910
+                'label' => 'Notify admins via email',
911
+                'module' => 'BOINC core',
912
+                'eval input' => array(
913 913
                 '0' => 'subject',
914 914
                 '1' => 'message',
915 915
                 '2' => 'from',
916
-              ),
916
+                ),
917 917
             ),
918 918
             '#weight' => 0.0,
919
-          ),
919
+            ),
920 920
         ),
921 921
         '#version' => 6003,
922
-      ),
923
-      'rules_notify_admins_user_reverting_to_previous_email_address_that_is_now_used_by_another_user' => array(
922
+        ),
923
+        'rules_notify_admins_user_reverting_to_previous_email_address_that_is_now_used_by_another_user' => array(
924 924
         '#type' => 'rule',
925 925
         '#set' => 'event_boincuser_revert_email_error',
926 926
         '#label' => 'Notify admins user reverting to previous email address that is now used by another user',
927 927
         '#active' => 1,
928 928
         '#weight' => '0',
929 929
         '#categories' => array(
930
-          '0' => 'boinc_standard',
931
-          '1' => 'admin notification',
930
+            '0' => 'boinc_standard',
931
+            '1' => 'admin notification',
932 932
         ),
933 933
         '#status' => 'default',
934 934
         '#conditions' => array(),
935 935
         '#actions' => array(
936
-          '0' => array(
936
+            '0' => array(
937 937
             '#type' => 'action',
938 938
             '#settings' => array(
939
-              'from' => '',
940
-              'subject' => '[subject_tag:string] User attempted to revert to previous email address to one used by existing user.',
941
-              '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.',
942
-              '#eval input' => array(
939
+                'from' => '',
940
+                'subject' => '[subject_tag:string] User attempted to revert to previous email address to one used by existing user.',
941
+                '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.',
942
+                '#eval input' => array(
943 943
                 'token_rules_input_evaluator' => array(
944
-                  'subject' => array(
944
+                    'subject' => array(
945 945
                     '0' => 'subject_tag',
946 946
                     '1' => ':global',
947
-                  ),
948
-                  'message' => array(
947
+                    ),
948
+                    'message' => array(
949 949
                     '0' => 'new_email_addr',
950 950
                     '1' => 'user',
951 951
                     '2' => ':global',
952
-                  ),
953
-                  'from' => array(
952
+                    ),
953
+                    'from' => array(
954 954
                     '0' => ':global',
955
-                  ),
955
+                    ),
956
+                ),
956 957
                 ),
957
-              ),
958 958
             ),
959 959
             '#name' => 'boinccore_rules_action_mail_to_admins',
960 960
             '#info' => array(
961
-              'label' => 'Notify admins via email',
962
-              'module' => 'BOINC core',
963
-              'eval input' => array(
961
+                'label' => 'Notify admins via email',
962
+                'module' => 'BOINC core',
963
+                'eval input' => array(
964 964
                 '0' => 'subject',
965 965
                 '1' => 'message',
966 966
                 '2' => 'from',
967
-              ),
967
+                ),
968 968
             ),
969 969
             '#weight' => 0.0,
970
-          ),
970
+            ),
971 971
         ),
972 972
         '#version' => 6003,
973
-      ),
974
-      'rules_notify_admins_when_user_fails_to_delete_their_own_account' => array(
973
+        ),
974
+        'rules_notify_admins_when_user_fails_to_delete_their_own_account' => array(
975 975
         '#type' => 'rule',
976 976
         '#set' => 'event_boincuser_delete_general_error',
977 977
         '#label' => 'Notify admins when user fails to delete their own account',
978 978
         '#active' => 1,
979 979
         '#weight' => '0',
980 980
         '#categories' => array(
981
-          '0' => 'boinc_standard',
982
-          '1' => 'admin notification',
981
+            '0' => 'boinc_standard',
982
+            '1' => 'admin notification',
983 983
         ),
984 984
         '#status' => 'default',
985 985
         '#conditions' => array(),
986 986
         '#actions' => array(
987
-          '0' => array(
987
+            '0' => array(
988 988
             '#type' => 'action',
989 989
             '#settings' => array(
990
-              'from' => '',
991
-              'subject' => '[subject_tag:string] Error when user trying to delete their account',
992
-              'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error from \'boincuser_load\'.',
993
-              '#eval input' => array(
990
+                'from' => '',
991
+                'subject' => '[subject_tag:string] Error when user trying to delete their account',
992
+                'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error from \'boincuser_load\'.',
993
+                '#eval input' => array(
994 994
                 'token_rules_input_evaluator' => array(
995
-                  'subject' => array(
995
+                    'subject' => array(
996 996
                     '0' => 'subject_tag',
997 997
                     '1' => ':global',
998
-                  ),
999
-                  'message' => array(
998
+                    ),
999
+                    'message' => array(
1000 1000
                     '0' => 'user',
1001 1001
                     '1' => ':global',
1002
-                  ),
1003
-                  'from' => array(
1002
+                    ),
1003
+                    'from' => array(
1004 1004
                     '0' => ':global',
1005
-                  ),
1005
+                    ),
1006
+                ),
1006 1007
                 ),
1007
-              ),
1008 1008
             ),
1009 1009
             '#name' => 'boinccore_rules_action_mail_to_admins',
1010 1010
             '#info' => array(
1011
-              'label' => 'Notify admins via email',
1012
-              'module' => 'BOINC core',
1013
-              'eval input' => array(
1011
+                'label' => 'Notify admins via email',
1012
+                'module' => 'BOINC core',
1013
+                'eval input' => array(
1014 1014
                 '0' => 'subject',
1015 1015
                 '1' => 'message',
1016 1016
                 '2' => 'from',
1017
-              ),
1017
+                ),
1018 1018
             ),
1019 1019
             '#weight' => 0.0,
1020
-          ),
1020
+            ),
1021 1021
         ),
1022 1022
         '#version' => 6003,
1023
-      ),
1024
-      'rules_notify_admins_when_user_tries_to_delete_account_with_invalid_uid' => array(
1023
+        ),
1024
+        'rules_notify_admins_when_user_tries_to_delete_account_with_invalid_uid' => array(
1025 1025
         '#type' => 'rule',
1026 1026
         '#set' => 'event_boincuser_delete_uid_invalid_error',
1027 1027
         '#label' => 'Notify admins when user tries to delete account with invalid uid',
1028 1028
         '#active' => 1,
1029 1029
         '#weight' => '0',
1030 1030
         '#categories' => array(
1031
-          '0' => 'boinc_standard',
1032
-          '1' => 'admin notification',
1031
+            '0' => 'boinc_standard',
1032
+            '1' => 'admin notification',
1033 1033
         ),
1034 1034
         '#status' => 'default',
1035 1035
         '#conditions' => array(),
1036 1036
         '#actions' => array(
1037
-          '0' => array(
1037
+            '0' => array(
1038 1038
             '#type' => 'action',
1039 1039
             '#settings' => array(
1040
-              'from' => '',
1041
-              'subject' => '[subject_tag:string] invalid uid when user trying to delete their account',
1042
-              'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error is Drupal UID=[user:uid] cannot be located.',
1043
-              '#eval input' => array(
1040
+                'from' => '',
1041
+                'subject' => '[subject_tag:string] invalid uid when user trying to delete their account',
1042
+                'message' => 'User [user:display-name], [user:mail], attempted to delete their account. Error is Drupal UID=[user:uid] cannot be located.',
1043
+                '#eval input' => array(
1044 1044
                 'token_rules_input_evaluator' => array(
1045
-                  'subject' => array(
1045
+                    'subject' => array(
1046 1046
                     '0' => 'subject_tag',
1047 1047
                     '1' => ':global',
1048
-                  ),
1049
-                  'message' => array(
1048
+                    ),
1049
+                    'message' => array(
1050 1050
                     '0' => 'user',
1051 1051
                     '1' => ':global',
1052
-                  ),
1053
-                  'from' => array(
1052
+                    ),
1053
+                    'from' => array(
1054 1054
                     '0' => ':global',
1055
-                  ),
1055
+                    ),
1056
+                ),
1056 1057
                 ),
1057
-              ),
1058 1058
             ),
1059 1059
             '#name' => 'boinccore_rules_action_mail_to_admins',
1060 1060
             '#info' => array(
1061
-              'label' => 'Notify admins via email',
1062
-              'module' => 'BOINC core',
1063
-              'eval input' => array(
1061
+                'label' => 'Notify admins via email',
1062
+                'module' => 'BOINC core',
1063
+                'eval input' => array(
1064 1064
                 '0' => 'subject',
1065 1065
                 '1' => 'message',
1066 1066
                 '2' => 'from',
1067
-              ),
1067
+                ),
1068 1068
             ),
1069 1069
             '#weight' => 0.0,
1070
-          ),
1070
+            ),
1071 1071
         ),
1072 1072
         '#version' => 6003,
1073
-      ),
1074
-      'rules_notify_admin_error_when_user_consenting_to_terms_of_use' => array(
1073
+        ),
1074
+        'rules_notify_admin_error_when_user_consenting_to_terms_of_use' => array(
1075 1075
         '#type' => 'rule',
1076 1076
         '#set' => 'event_boincuser_general_consent_error',
1077 1077
         '#label' => 'Notify admins error when user consenting to terms of use',
1078 1078
         '#active' => 1,
1079 1079
         '#weight' => '0',
1080 1080
         '#categories' => array(
1081
-          '0' => 'boinc_standard',
1082
-          '1' => 'admin notification',
1081
+            '0' => 'boinc_standard',
1082
+            '1' => 'admin notification',
1083 1083
         ),
1084 1084
         '#status' => 'default',
1085 1085
         '#conditions' => array(),
1086 1086
         '#actions' => array(
1087
-          '0' => array(
1087
+            '0' => array(
1088 1088
             '#type' => 'action',
1089 1089
             '#settings' => array(
1090
-              'from' => '',
1091
-              'subject' => '[subject_tag:string] Error when user attempted to consent to terms of use',
1092
-              '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\'.
1090
+                'from' => '',
1091
+                'subject' => '[subject_tag:string] Error when user attempted to consent to terms of use',
1092
+                '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 1093
 
1094 1094
 asdf jkl;',
1095
-              '#eval input' => array(
1095
+                '#eval input' => array(
1096 1096
                 'token_rules_input_evaluator' => array(
1097
-                  'subject' => array(
1097
+                    'subject' => array(
1098 1098
                     '0' => 'subject_tag',
1099 1099
                     '1' => ':global',
1100
-                  ),
1101
-                  'message' => array(
1100
+                    ),
1101
+                    'message' => array(
1102 1102
                     '0' => 'user',
1103 1103
                     '1' => ':global',
1104
-                  ),
1105
-                  'from' => array(
1104
+                    ),
1105
+                    'from' => array(
1106 1106
                     '0' => ':global',
1107
-                  ),
1107
+                    ),
1108
+                ),
1108 1109
                 ),
1109
-              ),
1110 1110
             ),
1111 1111
             '#name' => 'boinccore_rules_action_mail_to_admins',
1112 1112
             '#info' => array(
1113
-              'label' => 'Notify admins via email',
1114
-              'module' => 'BOINC core',
1115
-              'eval input' => array(
1113
+                'label' => 'Notify admins via email',
1114
+                'module' => 'BOINC core',
1115
+                'eval input' => array(
1116 1116
                 '0' => 'subject',
1117 1117
                 '1' => 'message',
1118 1118
                 '2' => 'from',
1119
-              ),
1119
+                ),
1120 1120
             ),
1121 1121
             '#weight' => 0.0,
1122
-          ),
1122
+            ),
1123 1123
         ),
1124 1124
         '#version' => 6003,
1125
-      ),
1126
-      'rules_offensive_comment_reported_hostile' => array(
1125
+        ),
1126
+        'rules_offensive_comment_reported_hostile' => array(
1127 1127
         '#type' => 'rule',
1128 1128
         '#set' => 'event_flag_flagged_abuse_comment_3',
1129 1129
         '#label' => 'Offensive comment reported - Hostile',
1130 1130
         '#active' => 1,
1131 1131
         '#weight' => '0',
1132 1132
         '#categories' => array(
1133
-          '0' => 'boinc_standard',
1134
-          '1' => 'moderator notification',
1133
+            '0' => 'boinc_standard',
1134
+            '1' => 'moderator notification',
1135 1135
         ),
1136 1136
         '#status' => 'default',
1137 1137
         '#conditions' => array(),
1138 1138
         '#actions' => array(
1139
-          '0' => array(
1139
+            '0' => array(
1140 1140
             '#type' => 'action',
1141 1141
             '#settings' => array(
1142
-              'from' => '',
1143
-              'subject' => 'Report of hostile language in [node:type] comment at [:global:site-name]',
1144
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1142
+                'from' => '',
1143
+                'subject' => 'Report of hostile language in [node:type] comment at [:global:site-name]',
1144
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1145 1145
 containing hostile language for the [:global:site-name] site:
1146 1146
 
1147 1147
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1148 1148
 
1149 1149
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1150
-              '#eval input' => array(
1150
+                '#eval input' => array(
1151 1151
                 'token_rules_input_evaluator' => array(
1152
-                  'subject' => array(
1152
+                    'subject' => array(
1153 1153
                     '0' => 'node',
1154 1154
                     '1' => ':global',
1155
-                  ),
1156
-                  'message' => array(
1155
+                    ),
1156
+                    'message' => array(
1157 1157
                     '0' => 'flagging_user',
1158 1158
                     '1' => 'comment',
1159 1159
                     '2' => 'node',
1160 1160
                     '3' => ':global',
1161
-                  ),
1162
-                  'from' => array(
1161
+                    ),
1162
+                    'from' => array(
1163 1163
                     '0' => ':global',
1164
-                  ),
1164
+                    ),
1165 1165
                 ),
1166 1166
                 'rules_input_evaluator_php' => array(
1167
-                  'message' => array(),
1167
+                    'message' => array(),
1168
+                ),
1168 1169
                 ),
1169
-              ),
1170 1170
             ),
1171 1171
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1172 1172
             '#info' => array(
1173
-              'label' => 'Notify moderators via email',
1174
-              'module' => 'BOINC core',
1175
-              'eval input' => array(
1173
+                'label' => 'Notify moderators via email',
1174
+                'module' => 'BOINC core',
1175
+                'eval input' => array(
1176 1176
                 '0' => 'subject',
1177 1177
                 '1' => 'message',
1178 1178
                 '2' => 'from',
1179
-              ),
1179
+                ),
1180 1180
             ),
1181 1181
             '#weight' => 0.0,
1182
-          ),
1182
+            ),
1183 1183
         ),
1184 1184
         '#version' => 6003,
1185
-      ),
1186
-      'rules_offensive_comment_reported_link' => array(
1185
+        ),
1186
+        'rules_offensive_comment_reported_link' => array(
1187 1187
         '#type' => 'rule',
1188 1188
         '#set' => 'event_flag_flagged_abuse_comment_2',
1189 1189
         '#label' => 'Offensive comment reported - Link',
1190 1190
         '#active' => 1,
1191 1191
         '#weight' => '0',
1192 1192
         '#categories' => array(
1193
-          '0' => 'boinc_standard',
1194
-          '1' => 'moderator notification',
1193
+            '0' => 'boinc_standard',
1194
+            '1' => 'moderator notification',
1195 1195
         ),
1196 1196
         '#status' => 'default',
1197 1197
         '#conditions' => array(),
1198 1198
         '#actions' => array(
1199
-          '0' => array(
1199
+            '0' => array(
1200 1200
             '#type' => 'action',
1201 1201
             '#settings' => array(
1202
-              'from' => '',
1203
-              'subject' => 'Report of inappropriate link in  [node:type] comment at [:global:site-name]',
1204
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1202
+                'from' => '',
1203
+                'subject' => 'Report of inappropriate link in  [node:type] comment at [:global:site-name]',
1204
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1205 1205
 containing an offensive or inappropriate link for the [:global:site-name] site:
1206 1206
 
1207 1207
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1208 1208
 
1209 1209
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1210
-              '#eval input' => array(
1210
+                '#eval input' => array(
1211 1211
                 'token_rules_input_evaluator' => array(
1212
-                  'subject' => array(
1212
+                    'subject' => array(
1213 1213
                     '0' => 'node',
1214 1214
                     '1' => ':global',
1215
-                  ),
1216
-                  'message' => array(
1215
+                    ),
1216
+                    'message' => array(
1217 1217
                     '0' => 'flagging_user',
1218 1218
                     '1' => 'comment',
1219 1219
                     '2' => 'node',
1220 1220
                     '3' => ':global',
1221
-                  ),
1222
-                  'from' => array(
1221
+                    ),
1222
+                    'from' => array(
1223 1223
                     '0' => ':global',
1224
-                  ),
1224
+                    ),
1225 1225
                 ),
1226 1226
                 'rules_input_evaluator_php' => array(
1227
-                  'message' => array(),
1227
+                    'message' => array(),
1228
+                ),
1228 1229
                 ),
1229
-              ),
1230 1230
             ),
1231 1231
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1232 1232
             '#info' => array(
1233
-              'label' => 'Notify moderators via email',
1234
-              'module' => 'BOINC core',
1235
-              'eval input' => array(
1233
+                'label' => 'Notify moderators via email',
1234
+                'module' => 'BOINC core',
1235
+                'eval input' => array(
1236 1236
                 '0' => 'subject',
1237 1237
                 '1' => 'message',
1238 1238
                 '2' => 'from',
1239
-              ),
1239
+                ),
1240 1240
             ),
1241 1241
             '#weight' => 0.0,
1242
-          ),
1242
+            ),
1243 1243
         ),
1244 1244
         '#version' => 6003,
1245
-      ),
1246
-      'rules_offensive_comment_reported_not_kid_friendly' => array(
1245
+        ),
1246
+        'rules_offensive_comment_reported_not_kid_friendly' => array(
1247 1247
         '#type' => 'rule',
1248 1248
         '#set' => 'event_flag_flagged_abuse_comment_4',
1249 1249
         '#label' => 'Offensive comment reported - Not Kid Friendly',
1250 1250
         '#active' => 1,
1251 1251
         '#weight' => '0',
1252 1252
         '#categories' => array(
1253
-          '0' => 'boinc_standard',
1254
-          '1' => 'moderator notification',
1253
+            '0' => 'boinc_standard',
1254
+            '1' => 'moderator notification',
1255 1255
         ),
1256 1256
         '#status' => 'default',
1257 1257
         '#conditions' => array(),
1258 1258
         '#actions' => array(
1259
-          '0' => array(
1259
+            '0' => array(
1260 1260
             '#type' => 'action',
1261 1261
             '#settings' => array(
1262
-              'from' => '',
1263
-              'subject' => 'Report of non Kid-friendly language in [node:type] comment at [:global:site-name]',
1264
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1262
+                'from' => '',
1263
+                'subject' => 'Report of non Kid-friendly language in [node:type] comment at [:global:site-name]',
1264
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1265 1265
 containing non Kid-friendly language for the [:global:site-name] site:
1266 1266
 
1267 1267
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1268 1268
 
1269 1269
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1270
-              '#eval input' => array(
1270
+                '#eval input' => array(
1271 1271
                 'token_rules_input_evaluator' => array(
1272
-                  'subject' => array(
1272
+                    'subject' => array(
1273 1273
                     '0' => 'node',
1274 1274
                     '1' => ':global',
1275
-                  ),
1276
-                  'message' => array(
1275
+                    ),
1276
+                    'message' => array(
1277 1277
                     '0' => 'flagging_user',
1278 1278
                     '1' => 'comment',
1279 1279
                     '2' => 'node',
1280 1280
                     '3' => ':global',
1281
-                  ),
1282
-                  'from' => array(
1281
+                    ),
1282
+                    'from' => array(
1283 1283
                     '0' => ':global',
1284
-                  ),
1284
+                    ),
1285 1285
                 ),
1286 1286
                 'rules_input_evaluator_php' => array(
1287
-                  'message' => array(),
1287
+                    'message' => array(),
1288
+                ),
1288 1289
                 ),
1289
-              ),
1290 1290
             ),
1291 1291
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1292 1292
             '#info' => array(
1293
-              'label' => 'Notify moderators via email',
1294
-              'module' => 'BOINC core',
1295
-              'eval input' => array(
1293
+                'label' => 'Notify moderators via email',
1294
+                'module' => 'BOINC core',
1295
+                'eval input' => array(
1296 1296
                 '0' => 'subject',
1297 1297
                 '1' => 'message',
1298 1298
                 '2' => 'from',
1299
-              ),
1299
+                ),
1300 1300
             ),
1301 1301
             '#weight' => 0.0,
1302
-          ),
1302
+            ),
1303 1303
         ),
1304 1304
         '#version' => 6003,
1305
-      ),
1306
-      'rules_offensive_comment_reported_other' => array(
1305
+        ),
1306
+        'rules_offensive_comment_reported_other' => array(
1307 1307
         '#type' => 'rule',
1308 1308
         '#set' => 'event_flag_flagged_abuse_comment_5',
1309 1309
         '#label' => 'Offensive comment reported - Other',
1310 1310
         '#active' => 1,
1311 1311
         '#weight' => '0',
1312 1312
         '#categories' => array(
1313
-          '0' => 'boinc_standard',
1314
-          '1' => 'moderator notification',
1313
+            '0' => 'boinc_standard',
1314
+            '1' => 'moderator notification',
1315 1315
         ),
1316 1316
         '#status' => 'default',
1317 1317
         '#conditions' => array(),
1318 1318
         '#actions' => array(
1319
-          '0' => array(
1319
+            '0' => array(
1320 1320
             '#type' => 'action',
1321 1321
             '#settings' => array(
1322
-              'from' => '',
1323
-              'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
1324
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1322
+                'from' => '',
1323
+                'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
1324
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content as
1325 1325
 being offensive or inappropriate for the [:global:site-name] site, with reason \'Other\':
1326 1326
 
1327 1327
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1328 1328
 
1329 1329
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1330
-              '#eval input' => array(
1330
+                '#eval input' => array(
1331 1331
                 'token_rules_input_evaluator' => array(
1332
-                  'subject' => array(
1332
+                    'subject' => array(
1333 1333
                     '0' => 'node',
1334 1334
                     '1' => ':global',
1335
-                  ),
1336
-                  'message' => array(
1335
+                    ),
1336
+                    'message' => array(
1337 1337
                     '0' => 'flagging_user',
1338 1338
                     '1' => 'comment',
1339 1339
                     '2' => 'node',
1340 1340
                     '3' => ':global',
1341
-                  ),
1342
-                  'from' => array(
1341
+                    ),
1342
+                    'from' => array(
1343 1343
                     '0' => ':global',
1344
-                  ),
1344
+                    ),
1345 1345
                 ),
1346 1346
                 'rules_input_evaluator_php' => array(
1347
-                  'message' => array(),
1347
+                    'message' => array(),
1348
+                ),
1348 1349
                 ),
1349
-              ),
1350 1350
             ),
1351 1351
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1352 1352
             '#info' => array(
1353
-              'label' => 'Notify moderators via email',
1354
-              'module' => 'BOINC core',
1355
-              'eval input' => array(
1353
+                'label' => 'Notify moderators via email',
1354
+                'module' => 'BOINC core',
1355
+                'eval input' => array(
1356 1356
                 '0' => 'subject',
1357 1357
                 '1' => 'message',
1358 1358
                 '2' => 'from',
1359
-              ),
1359
+                ),
1360 1360
             ),
1361 1361
             '#weight' => 0.0,
1362
-          ),
1362
+            ),
1363 1363
         ),
1364 1364
         '#version' => 6003,
1365
-      ),
1366
-      'rules_offensive_comment_reported_spam' => array(
1365
+        ),
1366
+        'rules_offensive_comment_reported_spam' => array(
1367 1367
         '#type' => 'rule',
1368 1368
         '#set' => 'event_flag_flagged_abuse_comment_1',
1369 1369
         '#label' => 'Offensive comment reported - SPAM',
1370 1370
         '#active' => 1,
1371 1371
         '#weight' => '0',
1372 1372
         '#categories' => array(
1373
-          '0' => 'boinc_standard',
1374
-          '1' => 'moderator notification',
1373
+            '0' => 'boinc_standard',
1374
+            '1' => 'moderator notification',
1375 1375
         ),
1376 1376
         '#status' => 'default',
1377 1377
         '#conditions' => array(),
1378 1378
         '#actions' => array(
1379
-          '0' => array(
1379
+            '0' => array(
1380 1380
             '#type' => 'action',
1381 1381
             '#settings' => array(
1382
-              'from' => '',
1383
-              'subject' => 'Report of SPAM [node:type] comment at [:global:site-name]',
1384
-              'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content
1382
+                'from' => '',
1383
+                'subject' => 'Report of SPAM [node:type] comment at [:global:site-name]',
1384
+                'message' => '[flagging_user:display-name] has reported the following comment on [node:type] content
1385 1385
 as being SPAM for the [:global:site-name] site:
1386 1386
 
1387 1387
 <?php print url(\'<front>\', array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>/goto/comment/[comment:comment-cid]
1388 1388
 
1389 1389
 Total reports of this comment: [comment:flag-abuse-comment-meta-count]',
1390
-              '#eval input' => array(
1390
+                '#eval input' => array(
1391 1391
                 'token_rules_input_evaluator' => array(
1392
-                  'subject' => array(
1392
+                    'subject' => array(
1393 1393
                     '0' => 'node',
1394 1394
                     '1' => ':global',
1395
-                  ),
1396
-                  'message' => array(
1395
+                    ),
1396
+                    'message' => array(
1397 1397
                     '0' => 'flagging_user',
1398 1398
                     '1' => 'comment',
1399 1399
                     '2' => 'node',
1400 1400
                     '3' => ':global',
1401
-                  ),
1402
-                  'from' => array(
1401
+                    ),
1402
+                    'from' => array(
1403 1403
                     '0' => ':global',
1404
-                  ),
1404
+                    ),
1405 1405
                 ),
1406 1406
                 'rules_input_evaluator_php' => array(
1407
-                  'message' => array(),
1407
+                    'message' => array(),
1408
+                ),
1408 1409
                 ),
1409
-              ),
1410 1410
             ),
1411 1411
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1412 1412
             '#info' => array(
1413
-              'label' => 'Notify moderators via email',
1414
-              'module' => 'BOINC core',
1415
-              'eval input' => array(
1413
+                'label' => 'Notify moderators via email',
1414
+                'module' => 'BOINC core',
1415
+                'eval input' => array(
1416 1416
                 '0' => 'subject',
1417 1417
                 '1' => 'message',
1418 1418
                 '2' => 'from',
1419
-              ),
1419
+                ),
1420 1420
             ),
1421 1421
             '#weight' => 0.0,
1422
-          ),
1422
+            ),
1423 1423
         ),
1424 1424
         '#version' => 6003,
1425
-      ),
1426
-      'rules_offensive_content_reported_hostile' => array(
1425
+        ),
1426
+        'rules_offensive_content_reported_hostile' => array(
1427 1427
         '#type' => 'rule',
1428 1428
         '#set' => 'event_flag_flagged_abuse_node_3',
1429 1429
         '#label' => 'Offensive content reported - Hostile',
1430 1430
         '#active' => 1,
1431 1431
         '#weight' => '0',
1432 1432
         '#categories' => array(
1433
-          '0' => 'boinc_standard',
1434
-          '1' => 'moderator notification',
1433
+            '0' => 'boinc_standard',
1434
+            '1' => 'moderator notification',
1435 1435
         ),
1436 1436
         '#status' => 'default',
1437 1437
         '#conditions' => array(),
1438 1438
         '#actions' => array(
1439
-          '0' => array(
1439
+            '0' => array(
1440 1440
             '#type' => 'action',
1441 1441
             '#settings' => array(
1442
-              'from' => '',
1443
-              'subject' => 'Report of hostile language in [node:type] content at [:global:site-name]',
1444
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content
1442
+                'from' => '',
1443
+                'subject' => 'Report of hostile language in [node:type] content at [:global:site-name]',
1444
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content
1445 1445
 as hostile language for the [:global:site-name] site:
1446 1446
 
1447 1447
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1448 1448
 
1449 1449
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1450
-              '#eval input' => array(
1450
+                '#eval input' => array(
1451 1451
                 'token_rules_input_evaluator' => array(
1452
-                  'subject' => array(
1452
+                    'subject' => array(
1453 1453
                     '0' => 'node',
1454 1454
                     '1' => ':global',
1455
-                  ),
1456
-                  'message' => array(
1455
+                    ),
1456
+                    'message' => array(
1457 1457
                     '0' => 'flagging_user',
1458 1458
                     '1' => 'node',
1459 1459
                     '2' => ':global',
1460
-                  ),
1461
-                  'from' => array(
1460
+                    ),
1461
+                    'from' => array(
1462 1462
                     '0' => ':global',
1463
-                  ),
1463
+                    ),
1464 1464
                 ),
1465 1465
                 'rules_input_evaluator_php' => array(
1466
-                  'message' => array(
1466
+                    'message' => array(
1467 1467
                     '0' => 'node',
1468
-                  ),
1468
+                    ),
1469
+                ),
1469 1470
                 ),
1470
-              ),
1471 1471
             ),
1472 1472
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1473 1473
             '#info' => array(
1474
-              'label' => 'Notify moderators via email',
1475
-              'module' => 'BOINC core',
1476
-              'eval input' => array(
1474
+                'label' => 'Notify moderators via email',
1475
+                'module' => 'BOINC core',
1476
+                'eval input' => array(
1477 1477
                 '0' => 'subject',
1478 1478
                 '1' => 'message',
1479 1479
                 '2' => 'from',
1480
-              ),
1480
+                ),
1481 1481
             ),
1482 1482
             '#weight' => 0.0,
1483
-          ),
1483
+            ),
1484 1484
         ),
1485 1485
         '#version' => 6003,
1486
-      ),
1487
-      'rules_offensive_content_reported_link' => array(
1486
+        ),
1487
+        'rules_offensive_content_reported_link' => array(
1488 1488
         '#type' => 'rule',
1489 1489
         '#set' => 'event_flag_flagged_abuse_node_2',
1490 1490
         '#label' => 'Offensive content reported - Link',
1491 1491
         '#active' => 1,
1492 1492
         '#weight' => '0',
1493 1493
         '#categories' => array(
1494
-          '0' => 'boinc_standard',
1495
-          '1' => 'moderator notification',
1494
+            '0' => 'boinc_standard',
1495
+            '1' => 'moderator notification',
1496 1496
         ),
1497 1497
         '#status' => 'default',
1498 1498
         '#conditions' => array(),
1499 1499
         '#actions' => array(
1500
-          '0' => array(
1500
+            '0' => array(
1501 1501
             '#type' => 'action',
1502 1502
             '#settings' => array(
1503
-              'from' => '',
1504
-              'subject' => 'Report of inappropriate link in [node:type] content at [:global:site-name]',
1505
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content
1503
+                'from' => '',
1504
+                'subject' => 'Report of inappropriate link in [node:type] content at [:global:site-name]',
1505
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content
1506 1506
 as containing an offensive or inappropriate link for the [:global:site-name] site:
1507 1507
 
1508 1508
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1509 1509
 
1510 1510
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1511
-              '#eval input' => array(
1511
+                '#eval input' => array(
1512 1512
                 'token_rules_input_evaluator' => array(
1513
-                  'subject' => array(
1513
+                    'subject' => array(
1514 1514
                     '0' => 'node',
1515 1515
                     '1' => ':global',
1516
-                  ),
1517
-                  'message' => array(
1516
+                    ),
1517
+                    'message' => array(
1518 1518
                     '0' => 'flagging_user',
1519 1519
                     '1' => 'node',
1520 1520
                     '2' => ':global',
1521
-                  ),
1522
-                  'from' => array(
1521
+                    ),
1522
+                    'from' => array(
1523 1523
                     '0' => ':global',
1524
-                  ),
1524
+                    ),
1525 1525
                 ),
1526 1526
                 'rules_input_evaluator_php' => array(
1527
-                  'message' => array(
1527
+                    'message' => array(
1528 1528
                     '0' => 'node',
1529
-                  ),
1529
+                    ),
1530
+                ),
1530 1531
                 ),
1531
-              ),
1532 1532
             ),
1533 1533
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1534 1534
             '#info' => array(
1535
-              'label' => 'Notify moderators via email',
1536
-              'module' => 'BOINC core',
1537
-              'eval input' => array(
1535
+                'label' => 'Notify moderators via email',
1536
+                'module' => 'BOINC core',
1537
+                'eval input' => array(
1538 1538
                 '0' => 'subject',
1539 1539
                 '1' => 'message',
1540 1540
                 '2' => 'from',
1541
-              ),
1541
+                ),
1542 1542
             ),
1543 1543
             '#weight' => 0.0,
1544
-          ),
1544
+            ),
1545 1545
         ),
1546 1546
         '#version' => 6003,
1547
-      ),
1548
-      'rules_offensive_content_reported_not_kid_friendly' => array(
1547
+        ),
1548
+        'rules_offensive_content_reported_not_kid_friendly' => array(
1549 1549
         '#type' => 'rule',
1550 1550
         '#set' => 'event_flag_flagged_abuse_node_4',
1551 1551
         '#label' => 'Offensive content reported - Not Kid Friendly',
1552 1552
         '#active' => 1,
1553 1553
         '#weight' => '0',
1554 1554
         '#categories' => array(
1555
-          '0' => 'boinc_standard',
1556
-          '1' => 'moderator notification',
1555
+            '0' => 'boinc_standard',
1556
+            '1' => 'moderator notification',
1557 1557
         ),
1558 1558
         '#status' => 'default',
1559 1559
         '#conditions' => array(),
1560 1560
         '#actions' => array(
1561
-          '0' => array(
1561
+            '0' => array(
1562 1562
             '#type' => 'action',
1563 1563
             '#settings' => array(
1564
-              'from' => '',
1565
-              'subject' => 'Report of non Kid-friendly language in [node:type] content at [:global:site-name]',
1566
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content
1564
+                'from' => '',
1565
+                'subject' => 'Report of non Kid-friendly language in [node:type] content at [:global:site-name]',
1566
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content
1567 1567
 as containing non Kid-friendly language for the [:global:site-name] site:
1568 1568
 
1569 1569
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1570 1570
 
1571 1571
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1572
-              '#eval input' => array(
1572
+                '#eval input' => array(
1573 1573
                 'token_rules_input_evaluator' => array(
1574
-                  'subject' => array(
1574
+                    'subject' => array(
1575 1575
                     '0' => 'node',
1576 1576
                     '1' => ':global',
1577
-                  ),
1578
-                  'message' => array(
1577
+                    ),
1578
+                    'message' => array(
1579 1579
                     '0' => 'flagging_user',
1580 1580
                     '1' => 'node',
1581 1581
                     '2' => ':global',
1582
-                  ),
1583
-                  'from' => array(
1582
+                    ),
1583
+                    'from' => array(
1584 1584
                     '0' => ':global',
1585
-                  ),
1585
+                    ),
1586 1586
                 ),
1587 1587
                 'rules_input_evaluator_php' => array(
1588
-                  'message' => array(
1588
+                    'message' => array(
1589 1589
                     '0' => 'node',
1590
-                  ),
1590
+                    ),
1591
+                ),
1591 1592
                 ),
1592
-              ),
1593 1593
             ),
1594 1594
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1595 1595
             '#info' => array(
1596
-              'label' => 'Notify moderators via email',
1597
-              'module' => 'BOINC core',
1598
-              'eval input' => array(
1596
+                'label' => 'Notify moderators via email',
1597
+                'module' => 'BOINC core',
1598
+                'eval input' => array(
1599 1599
                 '0' => 'subject',
1600 1600
                 '1' => 'message',
1601 1601
                 '2' => 'from',
1602
-              ),
1602
+                ),
1603 1603
             ),
1604 1604
             '#weight' => 0.0,
1605
-          ),
1605
+            ),
1606 1606
         ),
1607 1607
         '#version' => 6003,
1608
-      ),
1609
-      'rules_offensive_content_reported_other' => array(
1608
+        ),
1609
+        'rules_offensive_content_reported_other' => array(
1610 1610
         '#type' => 'rule',
1611 1611
         '#set' => 'event_flag_flagged_abuse_node_4',
1612 1612
         '#label' => 'Offensive content reported - Other',
1613 1613
         '#active' => 1,
1614 1614
         '#weight' => '0',
1615 1615
         '#categories' => array(
1616
-          '0' => 'boinc_standard',
1617
-          '1' => 'moderator notification',
1616
+            '0' => 'boinc_standard',
1617
+            '1' => 'moderator notification',
1618 1618
         ),
1619 1619
         '#status' => 'default',
1620 1620
         '#conditions' => array(),
1621 1621
         '#actions' => array(
1622
-          '0' => array(
1622
+            '0' => array(
1623 1623
             '#type' => 'action',
1624 1624
             '#settings' => array(
1625
-              'from' => '',
1626
-              'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
1627
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content
1625
+                'from' => '',
1626
+                'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
1627
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content
1628 1628
 as being offensive or inappropriate for the [:global:site-name] site:
1629 1629
 
1630 1630
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1631 1631
 
1632 1632
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1633
-              '#eval input' => array(
1633
+                '#eval input' => array(
1634 1634
                 'token_rules_input_evaluator' => array(
1635
-                  'subject' => array(
1635
+                    'subject' => array(
1636 1636
                     '0' => 'node',
1637 1637
                     '1' => ':global',
1638
-                  ),
1639
-                  'message' => array(
1638
+                    ),
1639
+                    'message' => array(
1640 1640
                     '0' => 'flagging_user',
1641 1641
                     '1' => 'node',
1642 1642
                     '2' => ':global',
1643
-                  ),
1644
-                  'from' => array(
1643
+                    ),
1644
+                    'from' => array(
1645 1645
                     '0' => ':global',
1646
-                  ),
1646
+                    ),
1647 1647
                 ),
1648 1648
                 'rules_input_evaluator_php' => array(
1649
-                  'message' => array(
1649
+                    'message' => array(
1650 1650
                     '0' => 'node',
1651
-                  ),
1651
+                    ),
1652
+                ),
1652 1653
                 ),
1653
-              ),
1654 1654
             ),
1655 1655
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1656 1656
             '#info' => array(
1657
-              'label' => 'Notify moderators via email',
1658
-              'module' => 'BOINC core',
1659
-              'eval input' => array(
1657
+                'label' => 'Notify moderators via email',
1658
+                'module' => 'BOINC core',
1659
+                'eval input' => array(
1660 1660
                 '0' => 'subject',
1661 1661
                 '1' => 'message',
1662 1662
                 '2' => 'from',
1663
-              ),
1663
+                ),
1664 1664
             ),
1665 1665
             '#weight' => 0.0,
1666
-          ),
1666
+            ),
1667 1667
         ),
1668 1668
         '#version' => 6003,
1669
-      ),
1670
-      'rules_offensive_content_reported_spam' => array(
1669
+        ),
1670
+        'rules_offensive_content_reported_spam' => array(
1671 1671
         '#type' => 'rule',
1672 1672
         '#set' => 'event_flag_flagged_abuse_node_1',
1673 1673
         '#label' => 'Offensive content reported - SPAM',
1674 1674
         '#active' => 1,
1675 1675
         '#weight' => '0',
1676 1676
         '#categories' => array(
1677
-          '0' => 'boinc_standard',
1678
-          '1' => 'moderator notification',
1677
+            '0' => 'boinc_standard',
1678
+            '1' => 'moderator notification',
1679 1679
         ),
1680 1680
         '#status' => 'default',
1681 1681
         '#conditions' => array(),
1682 1682
         '#actions' => array(
1683
-          '0' => array(
1683
+            '0' => array(
1684 1684
             '#type' => 'action',
1685 1685
             '#settings' => array(
1686
-              'from' => '',
1687
-              'subject' => 'Report of SPAM [node:type] content at [:global:site-name]',
1688
-              'message' => '[flagging_user:display-name] has reported the following [node:type] content
1686
+                'from' => '',
1687
+                'subject' => 'Report of SPAM [node:type] content at [:global:site-name]',
1688
+                'message' => '[flagging_user:display-name] has reported the following [node:type] content
1689 1689
 as being SPAM for the [:global:site-name] site:
1690 1690
 
1691 1691
 <?php print url(\'node/\' . \\$node->nid, array(\'absolute\' => TRUE, \'language\' => \'en\')); ?>
1692 1692
 
1693 1693
 Total reports of this content: [node:flag-abuse-node-meta-count]',
1694
-              '#eval input' => array(
1694
+                '#eval input' => array(
1695 1695
                 'token_rules_input_evaluator' => array(
1696
-                  'subject' => array(
1696
+                    'subject' => array(
1697 1697
                     '0' => 'node',
1698 1698
                     '1' => ':global',
1699
-                  ),
1700
-                  'message' => array(
1699
+                    ),
1700
+                    'message' => array(
1701 1701
                     '0' => 'flagging_user',
1702 1702
                     '1' => 'node',
1703 1703
                     '2' => ':global',
1704
-                  ),
1705
-                  'from' => array(
1704
+                    ),
1705
+                    'from' => array(
1706 1706
                     '0' => ':global',
1707
-                  ),
1707
+                    ),
1708 1708
                 ),
1709 1709
                 'rules_input_evaluator_php' => array(
1710
-                  'message' => array(
1710
+                    'message' => array(
1711 1711
                     '0' => 'node',
1712
-                  ),
1712
+                    ),
1713
+                ),
1713 1714
                 ),
1714
-              ),
1715 1715
             ),
1716 1716
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1717 1717
             '#info' => array(
1718
-              'label' => 'Notify moderators via email',
1719
-              'module' => 'BOINC core',
1720
-              'eval input' => array(
1718
+                'label' => 'Notify moderators via email',
1719
+                'module' => 'BOINC core',
1720
+                'eval input' => array(
1721 1721
                 '0' => 'subject',
1722 1722
                 '1' => 'message',
1723 1723
                 '2' => 'from',
1724
-              ),
1724
+                ),
1725 1725
             ),
1726 1726
             '#weight' => 0.0,
1727
-          ),
1727
+            ),
1728 1728
         ),
1729 1729
         '#version' => 6003,
1730
-      ),
1731
-      'rules_offensive_user_reported_link' => array(
1730
+        ),
1731
+        'rules_offensive_user_reported_link' => array(
1732 1732
         '#type' => 'rule',
1733 1733
         '#set' => 'event_flag_flagged_abuse_user_2',
1734 1734
         '#label' => 'Offensive user reported - Link',
1735 1735
         '#active' => 1,
1736 1736
         '#weight' => '0',
1737 1737
         '#categories' => array(
1738
-          '0' => 'boinc_standard',
1739
-          '1' => 'moderator notification',
1738
+            '0' => 'boinc_standard',
1739
+            '1' => 'moderator notification',
1740 1740
         ),
1741 1741
         '#status' => 'default',
1742 1742
         '#conditions' => array(),
1743 1743
         '#actions' => array(
1744
-          '0' => array(
1744
+            '0' => array(
1745 1745
             '#type' => 'action',
1746 1746
             '#settings' => array(
1747
-              'from' => '',
1748
-              'subject' => 'Report of inappropriate link in user profile at [:global:site-name]',
1749
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for
1747
+                'from' => '',
1748
+                'subject' => 'Report of inappropriate link in user profile at [:global:site-name]',
1749
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for
1750 1750
 inappropriate link in a user profile:
1751 1751
 
1752 1752
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1753 1753
 
1754 1754
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1755
-              '#eval input' => array(
1755
+                '#eval input' => array(
1756 1756
                 'token_rules_input_evaluator' => array(
1757
-                  'subject' => array(
1757
+                    'subject' => array(
1758 1758
                     '0' => ':global',
1759
-                  ),
1760
-                  'message' => array(
1759
+                    ),
1760
+                    'message' => array(
1761 1761
                     '0' => 'flagging_user',
1762 1762
                     '1' => 'account',
1763 1763
                     '2' => ':global',
1764
-                  ),
1765
-                  'from' => array(
1764
+                    ),
1765
+                    'from' => array(
1766 1766
                     '0' => ':global',
1767
-                  ),
1767
+                    ),
1768 1768
                 ),
1769 1769
                 'rules_input_evaluator_php' => array(
1770
-                  'message' => array(),
1770
+                    'message' => array(),
1771
+                ),
1771 1772
                 ),
1772
-              ),
1773 1773
             ),
1774 1774
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1775 1775
             '#info' => array(
1776
-              'label' => 'Notify moderators via email',
1777
-              'module' => 'BOINC core',
1778
-              'eval input' => array(
1776
+                'label' => 'Notify moderators via email',
1777
+                'module' => 'BOINC core',
1778
+                'eval input' => array(
1779 1779
                 '0' => 'subject',
1780 1780
                 '1' => 'message',
1781 1781
                 '2' => 'from',
1782
-              ),
1782
+                ),
1783 1783
             ),
1784 1784
             '#weight' => 0.0,
1785
-          ),
1785
+            ),
1786 1786
         ),
1787 1787
         '#version' => 6003,
1788
-      ),
1789
-      'rules_offensive_user_reported_not_kid_friendly' => array(
1788
+        ),
1789
+        'rules_offensive_user_reported_not_kid_friendly' => array(
1790 1790
         '#type' => 'rule',
1791 1791
         '#set' => 'event_flag_flagged_abuse_user_3',
1792 1792
         '#label' => 'Offensive user reported - Not Kid Friendly',
1793 1793
         '#active' => 1,
1794 1794
         '#weight' => '0',
1795 1795
         '#categories' => array(
1796
-          '0' => 'boinc_standard',
1797
-          '1' => 'moderator notification',
1796
+            '0' => 'boinc_standard',
1797
+            '1' => 'moderator notification',
1798 1798
         ),
1799 1799
         '#status' => 'default',
1800 1800
         '#conditions' => array(),
1801 1801
         '#actions' => array(
1802
-          '0' => array(
1802
+            '0' => array(
1803 1803
             '#type' => 'action',
1804 1804
             '#settings' => array(
1805
-              'from' => '',
1806
-              'subject' => 'Report of hostile language in user profile at [:global:site-name]',
1807
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for
1805
+                'from' => '',
1806
+                'subject' => 'Report of hostile language in user profile at [:global:site-name]',
1807
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for
1808 1808
 hostile language in a user profile:
1809 1809
 
1810 1810
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1811 1811
 
1812 1812
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1813
-              '#eval input' => array(
1813
+                '#eval input' => array(
1814 1814
                 'token_rules_input_evaluator' => array(
1815
-                  'subject' => array(
1815
+                    'subject' => array(
1816 1816
                     '0' => ':global',
1817
-                  ),
1818
-                  'message' => array(
1817
+                    ),
1818
+                    'message' => array(
1819 1819
                     '0' => 'flagging_user',
1820 1820
                     '1' => 'account',
1821 1821
                     '2' => ':global',
1822
-                  ),
1823
-                  'from' => array(
1822
+                    ),
1823
+                    'from' => array(
1824 1824
                     '0' => ':global',
1825
-                  ),
1825
+                    ),
1826 1826
                 ),
1827 1827
                 'rules_input_evaluator_php' => array(
1828
-                  'message' => array(),
1828
+                    'message' => array(),
1829
+                ),
1829 1830
                 ),
1830
-              ),
1831 1831
             ),
1832 1832
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1833 1833
             '#info' => array(
1834
-              'label' => 'Notify moderators via email',
1835
-              'module' => 'BOINC core',
1836
-              'eval input' => array(
1834
+                'label' => 'Notify moderators via email',
1835
+                'module' => 'BOINC core',
1836
+                'eval input' => array(
1837 1837
                 '0' => 'subject',
1838 1838
                 '1' => 'message',
1839 1839
                 '2' => 'from',
1840
-              ),
1840
+                ),
1841 1841
             ),
1842 1842
             '#weight' => 0.0,
1843
-          ),
1843
+            ),
1844 1844
         ),
1845 1845
         '#version' => 6003,
1846
-      ),
1847
-      'rules_offensive_user_reported_other' => array(
1846
+        ),
1847
+        'rules_offensive_user_reported_other' => array(
1848 1848
         '#type' => 'rule',
1849 1849
         '#set' => 'event_flag_flagged_abuse_user_4',
1850 1850
         '#label' => 'Offensive user reported - Other',
1851 1851
         '#active' => 1,
1852 1852
         '#weight' => '0',
1853 1853
         '#categories' => array(
1854
-          '0' => 'boinc_standard',
1855
-          '1' => 'moderator notification',
1854
+            '0' => 'boinc_standard',
1855
+            '1' => 'moderator notification',
1856 1856
         ),
1857 1857
         '#status' => 'default',
1858 1858
         '#conditions' => array(),
1859 1859
         '#actions' => array(
1860
-          '0' => array(
1860
+            '0' => array(
1861 1861
             '#type' => 'action',
1862 1862
             '#settings' => array(
1863
-              'from' => '',
1864
-              'subject' => 'Report of offensive user at [:global:site-name]',
1865
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for
1863
+                'from' => '',
1864
+                'subject' => 'Report of offensive user at [:global:site-name]',
1865
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for
1866 1866
 inappropriate behavior:
1867 1867
 
1868 1868
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1869 1869
 
1870 1870
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1871
-              '#eval input' => array(
1871
+                '#eval input' => array(
1872 1872
                 'token_rules_input_evaluator' => array(
1873
-                  'subject' => array(
1873
+                    'subject' => array(
1874 1874
                     '0' => ':global',
1875
-                  ),
1876
-                  'message' => array(
1875
+                    ),
1876
+                    'message' => array(
1877 1877
                     '0' => 'flagging_user',
1878 1878
                     '1' => 'account',
1879 1879
                     '2' => ':global',
1880
-                  ),
1881
-                  'from' => array(
1880
+                    ),
1881
+                    'from' => array(
1882 1882
                     '0' => ':global',
1883
-                  ),
1883
+                    ),
1884 1884
                 ),
1885 1885
                 'rules_input_evaluator_php' => array(
1886
-                  'message' => array(),
1886
+                    'message' => array(),
1887
+                ),
1887 1888
                 ),
1888
-              ),
1889 1889
             ),
1890 1890
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1891 1891
             '#info' => array(
1892
-              'label' => 'Notify moderators via email',
1893
-              'module' => 'BOINC core',
1894
-              'eval input' => array(
1892
+                'label' => 'Notify moderators via email',
1893
+                'module' => 'BOINC core',
1894
+                'eval input' => array(
1895 1895
                 '0' => 'subject',
1896 1896
                 '1' => 'message',
1897 1897
                 '2' => 'from',
1898
-              ),
1898
+                ),
1899 1899
             ),
1900 1900
             '#weight' => 0.0,
1901
-          ),
1901
+            ),
1902 1902
         ),
1903 1903
         '#version' => 6003,
1904
-      ),
1905
-      'rules_offensive_user_reported_spam' => array(
1904
+        ),
1905
+        'rules_offensive_user_reported_spam' => array(
1906 1906
         '#type' => 'rule',
1907 1907
         '#set' => 'event_flag_flagged_abuse_user_1',
1908 1908
         '#label' => 'Offensive user reported - SPAM',
1909 1909
         '#active' => 1,
1910 1910
         '#weight' => '0',
1911 1911
         '#categories' => array(
1912
-          '0' => 'boinc_standard',
1913
-          '1' => 'moderator notification',
1912
+            '0' => 'boinc_standard',
1913
+            '1' => 'moderator notification',
1914 1914
         ),
1915 1915
         '#status' => 'default',
1916 1916
         '#conditions' => array(),
1917 1917
         '#actions' => array(
1918
-          '0' => array(
1918
+            '0' => array(
1919 1919
             '#type' => 'action',
1920 1920
             '#settings' => array(
1921
-              'from' => '',
1922
-              'subject' => 'Report of SPAM user at [:global:site-name]',
1923
-              'message' => '[flagging_user:display-name] has reported [account:display-name] for
1921
+                'from' => '',
1922
+                'subject' => 'Report of SPAM user at [:global:site-name]',
1923
+                'message' => '[flagging_user:display-name] has reported [account:display-name] for
1924 1924
 a SPAM user profile:
1925 1925
 
1926 1926
 <?php print url(\\\'<front>\\\', array(\\\'absolute\\\' => TRUE, \\\'language\\\' => \\\'en\\\')); ?>/account/[account:uid]
1927 1927
 
1928 1928
 Total current reports of this user: [account:flag-abuse-user-meta-count]',
1929
-              '#eval input' => array(
1929
+                '#eval input' => array(
1930 1930
                 'token_rules_input_evaluator' => array(
1931
-                  'subject' => array(
1931
+                    'subject' => array(
1932 1932
                     '0' => ':global',
1933
-                  ),
1934
-                  'message' => array(
1933
+                    ),
1934
+                    'message' => array(
1935 1935
                     '0' => 'flagging_user',
1936 1936
                     '1' => 'account',
1937 1937
                     '2' => ':global',
1938
-                  ),
1939
-                  'from' => array(
1938
+                    ),
1939
+                    'from' => array(
1940 1940
                     '0' => ':global',
1941
-                  ),
1941
+                    ),
1942 1942
                 ),
1943 1943
                 'rules_input_evaluator_php' => array(
1944
-                  'message' => array(),
1944
+                    'message' => array(),
1945
+                ),
1945 1946
                 ),
1946
-              ),
1947 1947
             ),
1948 1948
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1949 1949
             '#info' => array(
1950
-              'label' => 'Notify moderators via email',
1951
-              'module' => 'BOINC core',
1952
-              'eval input' => array(
1950
+                'label' => 'Notify moderators via email',
1951
+                'module' => 'BOINC core',
1952
+                'eval input' => array(
1953 1953
                 '0' => 'subject',
1954 1954
                 '1' => 'message',
1955 1955
                 '2' => 'from',
1956
-              ),
1956
+                ),
1957 1957
             ),
1958 1958
             '#weight' => 0.0,
1959
-          ),
1959
+            ),
1960 1960
         ),
1961 1961
         '#version' => 6003,
1962
-      ),
1963
-      'rules_comment_converted_to_new_forum_topic_by_moderator_or_admin' => array(
1962
+        ),
1963
+        'rules_comment_converted_to_new_forum_topic_by_moderator_or_admin' => array(
1964 1964
         '#type' => 'rule',
1965 1965
         '#set' => 'event_boinccore_comment_convert',
1966 1966
         '#label' => 'Comment is converted to new forum topic by moderator or admin',
1967 1967
         '#active' => 1,
1968 1968
         '#weight' => '0',
1969 1969
         '#categories' => array(
1970
-          '0' => 'boinc_standard',
1971
-          '1' => 'moderator notification',
1970
+            '0' => 'boinc_standard',
1971
+            '1' => 'moderator notification',
1972 1972
         ),
1973 1973
         '#status' => 'default',
1974 1974
         '#conditions' => array(),
1975 1975
         '#actions' => array(
1976
-          '0' => array(
1976
+            '0' => array(
1977 1977
             '#info' => array(
1978
-              'label' => 'Notify moderators via email',
1979
-              'module' => 'BOINC core',
1980
-              'eval input' => array(
1978
+                'label' => 'Notify moderators via email',
1979
+                'module' => 'BOINC core',
1980
+                'eval input' => array(
1981 1981
                 '0' => 'subject',
1982 1982
                 '1' => 'message',
1983 1983
                 '2' => 'from',
1984
-              ),
1984
+                ),
1985 1985
             ),
1986 1986
             '#name' => 'boinccore_rules_action_mail_to_moderators',
1987 1987
             '#settings' => array(
1988
-              'from' => '',
1989
-              'subject' => 'Comment at [:global:site-name] converted to new forum topic',
1990
-              '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')); ?>",
1991
-              '#eval input' => array(
1988
+                'from' => '',
1989
+                'subject' => 'Comment at [:global:site-name] converted to new forum topic',
1990
+                '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')); ?>",
1991
+                '#eval input' => array(
1992 1992
                 'token_rules_input_evaluator' => array(
1993
-                  'subject' => array(
1993
+                    'subject' => array(
1994 1994
                     '0' => ':global',
1995
-                  ),
1996
-                  'message' => array(
1995
+                    ),
1996
+                    'message' => array(
1997 1997
                     '0' => 'user',
1998 1998
                     '1' => ':global',
1999
-                  ),
2000
-                  'from' => array(
1999
+                    ),
2000
+                    'from' => array(
2001 2001
                     '0' => ':global',
2002
-                  ),
2002
+                    ),
2003 2003
                 ),
2004 2004
                 'rules_input_evaluator_php' => array(
2005
-                  'message' => array(
2005
+                    'message' => array(
2006 2006
                     '0' => 'node',
2007
-                  ),
2007
+                    ),
2008
+                ),
2008 2009
                 ),
2009
-              ),
2010 2010
             ),
2011 2011
             '#type' => 'action',
2012 2012
             '#weight' => 0.0,
2013
-          ),
2013
+            ),
2014 2014
         ),
2015 2015
         '#version' => 6003,
2016
-      ),
2017
-      'rules_comment_deleted_by_admin' => array(
2016
+        ),
2017
+        'rules_comment_deleted_by_admin' => array(
2018 2018
         '#type' => 'rule',
2019 2019
         '#set' => 'event_comment_delete',
2020 2020
         '#label' => 'Comment deleted by admin',
2021 2021
         '#active' => 1,
2022 2022
         '#weight' => '0',
2023 2023
         '#categories' => array(
2024
-          '0' => 'moderator notification',
2025
-          '1' => 'boinc_standard',
2024
+            '0' => 'moderator notification',
2025
+            '1' => 'boinc_standard',
2026 2026
         ),
2027 2027
         '#status' => 'default',
2028 2028
         '#conditions' => array(),
2029 2029
         '#actions' => array(
2030
-          '0' => array(
2030
+            '0' => array(
2031 2031
             '#type' => 'action',
2032 2032
             '#settings' => array(
2033
-              'from' => '',
2034
-              'subject' => 'Comment deleted at [:global:site-name] by admin',
2035
-              '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')); ?>",
2036
-              '#eval input' => array(
2033
+                'from' => '',
2034
+                'subject' => 'Comment deleted at [:global:site-name] by admin',
2035
+                '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')); ?>",
2036
+                '#eval input' => array(
2037 2037
                 'token_rules_input_evaluator' => array(
2038
-                  'subject' => array(
2038
+                    'subject' => array(
2039 2039
                     '0' => ':global',
2040
-                  ),
2041
-                  'message' => array(
2040
+                    ),
2041
+                    'message' => array(
2042 2042
                     '0' => 'node',
2043 2043
                     '1' => 'user',
2044 2044
                     '2' => ':global',
2045
-                  ),
2046
-                  'from' => array(
2045
+                    ),
2046
+                    'from' => array(
2047 2047
                     '0' => ':global',
2048
-                  ),
2048
+                    ),
2049 2049
                 ),
2050 2050
                 'rules_input_evaluator_php' => array(
2051
-                  'message' => array(
2051
+                    'message' => array(
2052 2052
                     '0' => 'node',
2053
-                  ),
2053
+                    ),
2054
+                ),
2054 2055
                 ),
2055
-              ),
2056 2056
             ),
2057 2057
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2058 2058
             '#info' => array(
2059
-              'label' => 'Notify moderators via email',
2060
-              'module' => 'BOINC core',
2061
-              'eval input' => array(
2059
+                'label' => 'Notify moderators via email',
2060
+                'module' => 'BOINC core',
2061
+                'eval input' => array(
2062 2062
                 '0' => 'subject',
2063 2063
                 '1' => 'message',
2064 2064
                 '2' => 'from',
2065
-              ),
2065
+                ),
2066 2066
             ),
2067 2067
             '#weight' => 0.0,
2068
-          ),
2068
+            ),
2069 2069
         ),
2070 2070
         '#version' => 6003,
2071
-      ),
2072
-      'rules_comment_edited_by_moderator_or_admin' => array(
2071
+        ),
2072
+        'rules_comment_edited_by_moderator_or_admin' => array(
2073 2073
         '#type' => 'rule',
2074 2074
         '#set' => 'event_comment_update',
2075 2075
         '#label' => 'Comment is edited by moderator or admin',
2076 2076
         '#active' => 1,
2077 2077
         '#weight' => '0',
2078 2078
         '#categories' => array(
2079
-          '0' => 'boinc_standard',
2080
-          '1' => 'moderator notification',
2079
+            '0' => 'boinc_standard',
2080
+            '1' => 'moderator notification',
2081 2081
         ),
2082 2082
         '#status' => 'default',
2083 2083
         '#conditions' => array(
2084
-          '0' => array(
2084
+            '0' => array(
2085 2085
             '#negate' => 1,
2086 2086
             '#weight' => 0.0,
2087 2087
             '#info' => array(
2088
-              'label' => 'Compare two users: acting user (who edited the comment) is NOT the comment author',
2089
-              'label callback' => FALSE,
2090
-              'arguments' => array(
2088
+                'label' => 'Compare two users: acting user (who edited the comment) is NOT the comment author',
2089
+                'label callback' => FALSE,
2090
+                'arguments' => array(
2091 2091
                 'user1' => array(
2092
-                  'type' => 'user',
2093
-                  'label' => 'User account 1',
2092
+                    'type' => 'user',
2093
+                    'label' => 'User account 1',
2094 2094
                 ),
2095 2095
                 'user2' => array(
2096
-                  'type' => 'user',
2097
-                  'label' => 'User account 2',
2096
+                    'type' => 'user',
2097
+                    'label' => 'User account 2',
2098
+                ),
2098 2099
                 ),
2099
-              ),
2100
-              'module' => 'User',
2100
+                'module' => 'User',
2101 2101
             ),
2102 2102
             '#name' => 'rules_condition_user_comparison',
2103 2103
             '#settings' => array(
2104
-              '#argument map' => array(
2104
+                '#argument map' => array(
2105 2105
                 'user1' => 'user',
2106 2106
                 'user2' => 'comment_author',
2107
-              ),
2107
+                ),
2108 2108
             ),
2109 2109
             '#type' => 'condition',
2110
-          ),
2110
+            ),
2111 2111
         ),
2112 2112
         '#actions' => array(
2113
-          '0' => array(
2113
+            '0' => array(
2114 2114
             '#type' => 'action',
2115 2115
             '#settings' => array(
2116
-              'from' => '',
2117
-              'subject' => 'Comment edited at [:global:site-name] by moderator or admin',
2118
-              '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]",
2119
-              '#eval input' => array(
2116
+                'from' => '',
2117
+                'subject' => 'Comment edited at [:global:site-name] by moderator or admin',
2118
+                '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]",
2119
+                '#eval input' => array(
2120 2120
                 'token_rules_input_evaluator' => array(
2121
-                  'subject' => array(
2121
+                    'subject' => array(
2122 2122
                     '0' => ':global',
2123
-                  ),
2124
-                  'message' => array(
2123
+                    ),
2124
+                    'message' => array(
2125 2125
                     '0' => 'comment',
2126 2126
                     '1' => 'user',
2127 2127
                     '2' => ':global',
2128
-                  ),
2129
-                  'from' => array(
2128
+                    ),
2129
+                    'from' => array(
2130 2130
                     '0' => ':global',
2131
-                  ),
2131
+                    ),
2132 2132
                 ),
2133 2133
                 'rules_input_evaluator_php' => array(
2134
-                  'message' => array(),
2134
+                    'message' => array(),
2135
+                ),
2135 2136
                 ),
2136
-              ),
2137 2137
             ),
2138 2138
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2139 2139
             '#info' => array(
2140
-              'label' => 'Notify moderators via email',
2141
-              'module' => 'BOINC core',
2142
-              'eval input' => array(
2140
+                'label' => 'Notify moderators via email',
2141
+                'module' => 'BOINC core',
2142
+                'eval input' => array(
2143 2143
                 '0' => 'subject',
2144 2144
                 '1' => 'message',
2145 2145
                 '2' => 'from',
2146
-              ),
2146
+                ),
2147 2147
             ),
2148 2148
             '#weight' => 0.0,
2149
-          ),
2149
+            ),
2150 2150
         ),
2151 2151
         '#version' => 6003,
2152
-      ),
2153
-      'rules_comment_is_published_unhidden_by_moderator_or_admin' => array(
2152
+        ),
2153
+        'rules_comment_is_published_unhidden_by_moderator_or_admin' => array(
2154 2154
         '#type' => 'rule',
2155 2155
         '#set' => 'event_boinccore_comment_unhidden',
2156 2156
         '#label' => 'Comment is unhidden by moderator or admin',
2157 2157
         '#active' => 1,
2158 2158
         '#weight' => '0',
2159 2159
         '#categories' => array(
2160
-          '0' => 'boinc_standard',
2161
-          '1' => 'moderator notification',
2160
+            '0' => 'boinc_standard',
2161
+            '1' => 'moderator notification',
2162 2162
         ),
2163 2163
         '#status' => 'default',
2164 2164
         '#conditions' => array(
2165
-          '0' => array(
2165
+            '0' => array(
2166 2166
             '#type' => 'condition',
2167 2167
             '#settings' => array(
2168
-              '#argument map' => array(
2168
+                '#argument map' => array(
2169 2169
                 'user1' => 'user',
2170 2170
                 'user2' => 'comment_author',
2171
-              ),
2171
+                ),
2172 2172
             ),
2173 2173
             '#name' => 'rules_condition_user_comparison',
2174 2174
             '#info' => array(
2175
-              'label' => 'Compare two users: acting user (who unhid the comment) is NOT the comment author',
2176
-              'label callback' => FALSE,
2177
-              'arguments' => array(
2175
+                'label' => 'Compare two users: acting user (who unhid the comment) is NOT the comment author',
2176
+                'label callback' => FALSE,
2177
+                'arguments' => array(
2178 2178
                 'user1' => array(
2179
-                  'type' => 'user',
2180
-                  'label' => 'User account 1',
2179
+                    'type' => 'user',
2180
+                    'label' => 'User account 1',
2181 2181
                 ),
2182 2182
                 'user2' => array(
2183
-                  'type' => 'user',
2184
-                  'label' => 'User account 2',
2183
+                    'type' => 'user',
2184
+                    'label' => 'User account 2',
2185 2185
                 ),
2186
-              ),
2187
-              'module' => 'User',
2186
+                ),
2187
+                'module' => 'User',
2188 2188
             ),
2189 2189
             '#negate' => 1,
2190 2190
             '#weight' => 0.0,
2191
-          ),
2191
+            ),
2192 2192
         ),
2193 2193
         '#actions' => array(
2194
-          '0' => array(
2194
+            '0' => array(
2195 2195
             '#info' => array(
2196
-              'label' => 'Notify moderators via email',
2197
-              'module' => 'BOINC core',
2198
-              'eval input' => array(
2196
+                'label' => 'Notify moderators via email',
2197
+                'module' => 'BOINC core',
2198
+                'eval input' => array(
2199 2199
                 '0' => 'subject',
2200 2200
                 '1' => 'message',
2201 2201
                 '2' => 'from',
2202
-              ),
2202
+                ),
2203 2203
             ),
2204 2204
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2205 2205
             '#settings' => array(
2206
-              'from' => '',
2207
-              'subject' => 'Comment at [:global:site-name] unhidden by moderator or admin',
2208
-              '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]",
2209
-              '#eval input' => array(
2206
+                'from' => '',
2207
+                'subject' => 'Comment at [:global:site-name] unhidden by moderator or admin',
2208
+                '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]",
2209
+                '#eval input' => array(
2210 2210
                 'token_rules_input_evaluator' => array(
2211
-                  'subject' => array(
2211
+                    'subject' => array(
2212 2212
                     '0' => ':global',
2213
-                  ),
2214
-                  'message' => array(
2213
+                    ),
2214
+                    'message' => array(
2215 2215
                     '0' => 'comment',
2216 2216
                     '1' => 'user',
2217 2217
                     '2' => ':global',
2218
-                  ),
2219
-                  'from' => array(
2218
+                    ),
2219
+                    'from' => array(
2220 2220
                     '0' => ':global',
2221
-                  ),
2221
+                    ),
2222 2222
                 ),
2223 2223
                 'rules_input_evaluator_php' => array(
2224
-                  'message' => array(),
2224
+                    'message' => array(),
2225
+                ),
2225 2226
                 ),
2226
-              ),
2227 2227
             ),
2228 2228
             '#type' => 'action',
2229 2229
             '#weight' => 0.0,
2230
-          ),
2230
+            ),
2231 2231
         ),
2232 2232
         '#version' => 6003,
2233
-      ),
2234
-      'rules_comment_is_unpublished_hidden_by_moderator_or_admin' => array(
2233
+        ),
2234
+        'rules_comment_is_unpublished_hidden_by_moderator_or_admin' => array(
2235 2235
         '#type' => 'rule',
2236 2236
         '#set' => 'event_comment_unpublish',
2237 2237
         '#label' => 'Comment is hidden by moderator or admin',
2238 2238
         '#active' => 1,
2239 2239
         '#weight' => '0',
2240 2240
         '#categories' => array(
2241
-          '0' => 'boinc_standard',
2242
-          '1' => 'moderator notification',
2241
+            '0' => 'boinc_standard',
2242
+            '1' => 'moderator notification',
2243 2243
         ),
2244 2244
         '#status' => 'default',
2245 2245
         '#conditions' => array(
2246
-          '0' => array(
2246
+            '0' => array(
2247 2247
             '#weight' => 0.0,
2248 2248
             '#negate' => 1,
2249 2249
             '#info' => array(
2250
-              'label' => 'Compare two users: acting user (who hid the comment) is NOT the comment author',
2251
-              'label callback' => FALSE,
2252
-              'arguments' => array(
2250
+                'label' => 'Compare two users: acting user (who hid the comment) is NOT the comment author',
2251
+                'label callback' => FALSE,
2252
+                'arguments' => array(
2253 2253
                 'user1' => array(
2254
-                  'type' => 'user',
2255
-                  'label' => 'User account 1',
2254
+                    'type' => 'user',
2255
+                    'label' => 'User account 1',
2256 2256
                 ),
2257 2257
                 'user2' => array(
2258
-                  'type' => 'user',
2259
-                  'label' => 'User account 2',
2258
+                    'type' => 'user',
2259
+                    'label' => 'User account 2',
2260
+                ),
2260 2261
                 ),
2261
-              ),
2262
-              'module' => 'User',
2262
+                'module' => 'User',
2263 2263
             ),
2264 2264
             '#name' => 'rules_condition_user_comparison',
2265 2265
             '#type' => 'condition',
2266 2266
             '#settings' => array(
2267
-              '#argument map' => array(
2267
+                '#argument map' => array(
2268 2268
                 'user1' => 'user',
2269 2269
                 'user2' => 'comment_author',
2270
-              ),
2270
+                ),
2271
+            ),
2271 2272
             ),
2272
-          ),
2273 2273
         ),
2274 2274
         '#actions' => array(
2275
-          '0' => array(
2275
+            '0' => array(
2276 2276
             '#type' => 'action',
2277 2277
             '#settings' => array(
2278
-              'from' => '',
2279
-              'subject' => 'Comment at [:global:site-name] hidden by moderator or admin',
2280
-              '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]",
2281
-              '#eval input' => array(
2278
+                'from' => '',
2279
+                'subject' => 'Comment at [:global:site-name] hidden by moderator or admin',
2280
+                '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]",
2281
+                '#eval input' => array(
2282 2282
                 'token_rules_input_evaluator' => array(
2283
-                  'subject' => array(
2283
+                    'subject' => array(
2284 2284
                     '0' => ':global',
2285
-                  ),
2286
-                  'message' => array(
2285
+                    ),
2286
+                    'message' => array(
2287 2287
                     '0' => 'comment',
2288 2288
                     '1' => 'user',
2289 2289
                     '2' => ':global',
2290
-                  ),
2291
-                  'from' => array(
2290
+                    ),
2291
+                    'from' => array(
2292 2292
                     '0' => ':global',
2293
-                  ),
2293
+                    ),
2294 2294
                 ),
2295 2295
                 'rules_input_evaluator_php' => array(
2296
-                  'message' => array(),
2296
+                    'message' => array(),
2297
+                ),
2297 2298
                 ),
2298
-              ),
2299 2299
             ),
2300 2300
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2301 2301
             '#info' => array(
2302
-              'label' => 'Notify moderators via email',
2303
-              'module' => 'BOINC core',
2304
-              'eval input' => array(
2302
+                'label' => 'Notify moderators via email',
2303
+                'module' => 'BOINC core',
2304
+                'eval input' => array(
2305 2305
                 '0' => 'subject',
2306 2306
                 '1' => 'message',
2307 2307
                 '2' => 'from',
2308
-              ),
2308
+                ),
2309 2309
             ),
2310 2310
             '#weight' => 0.0,
2311
-          ),
2311
+            ),
2312 2312
         ),
2313 2313
         '#version' => 6003,
2314
-      ),
2315
-      'rules_forum_topic_is_edited_by_moderator_or_admin' => array(
2314
+        ),
2315
+        'rules_forum_topic_is_edited_by_moderator_or_admin' => array(
2316 2316
         '#type' => 'rule',
2317 2317
         '#set' => 'event_node_update',
2318 2318
         '#label' => 'Forum topic is edited by moderator or admin',
2319 2319
         '#active' => 1,
2320 2320
         '#weight' => '0',
2321 2321
         '#categories' => array(
2322
-          '0' => 'boinc_standard',
2323
-          '1' => 'moderator notification',
2322
+            '0' => 'boinc_standard',
2323
+            '1' => 'moderator notification',
2324 2324
         ),
2325 2325
         '#status' => 'default',
2326 2326
         '#conditions' => array(
2327
-          '0' => array(
2327
+            '0' => array(
2328 2328
             '#weight' => 0.0,
2329 2329
             '#type' => 'condition',
2330 2330
             '#settings' => array(
2331
-              'roles' => array(
2331
+                'roles' => array(
2332 2332
                 '0' => 3519698132,
2333 2333
                 '1' => 1271379760,
2334
-              ),
2335
-              'operation' => 'OR',
2336
-              '#argument map' => array(
2334
+                ),
2335
+                'operation' => 'OR',
2336
+                '#argument map' => array(
2337 2337
                 'user' => 'user',
2338
-              ),
2338
+                ),
2339 2339
             ),
2340 2340
             '#name' => 'rules_condition_user_hasrole',
2341 2341
             '#info' => array(
2342
-              'label' => 'User has role(s): administrator or moderator',
2343
-              'label callback' => FALSE,
2344
-              'arguments' => array(
2342
+                'label' => 'User has role(s): administrator or moderator',
2343
+                'label callback' => FALSE,
2344
+                'arguments' => array(
2345 2345
                 'user' => array(
2346
-                  'type' => 'user',
2347
-                  'label' => 'User',
2346
+                    'type' => 'user',
2347
+                    'label' => 'User',
2348 2348
                 ),
2349
-              ),
2350
-              'module' => 'User',
2349
+                ),
2350
+                'module' => 'User',
2351
+            ),
2351 2352
             ),
2352
-          ),
2353
-          '1' => array(
2353
+            '1' => array(
2354 2354
             '#weight' => 0.0,
2355 2355
             '0' => array(
2356
-              '#weight' => 0.0,
2357
-              '#info' => array(
2356
+                '#weight' => 0.0,
2357
+                '#info' => array(
2358 2358
                 'label' => 'Updated content is Forum topic',
2359 2359
                 'arguments' => array(
2360
-                  'node' => array(
2360
+                    'node' => array(
2361 2361
                     'type' => 'node',
2362 2362
                     'label' => 'Content',
2363
-                  ),
2363
+                    ),
2364 2364
                 ),
2365 2365
                 'module' => 'Node',
2366
-              ),
2367
-              '#name' => 'rules_condition_content_is_type',
2368
-              '#settings' => array(
2366
+                ),
2367
+                '#name' => 'rules_condition_content_is_type',
2368
+                '#settings' => array(
2369 2369
                 'type' => array(
2370
-                  'forum' => 'forum',
2370
+                    'forum' => 'forum',
2371 2371
                 ),
2372 2372
                 '#argument map' => array(
2373
-                  'node' => 'node',
2373
+                    'node' => 'node',
2374
+                ),
2374 2375
                 ),
2375
-              ),
2376
-              '#type' => 'condition',
2376
+                '#type' => 'condition',
2377 2377
             ),
2378 2378
             '#type' => 'OR',
2379 2379
             '1' => array(
2380
-              '#type' => 'condition',
2381
-              '#settings' => array(
2380
+                '#type' => 'condition',
2381
+                '#settings' => array(
2382 2382
                 'type' => array(
2383
-                  'team_forum' => 'team_forum',
2383
+                    'team_forum' => 'team_forum',
2384 2384
                 ),
2385 2385
                 '#argument map' => array(
2386
-                  'node' => 'node',
2386
+                    'node' => 'node',
2387
+                ),
2387 2388
                 ),
2388
-              ),
2389
-              '#name' => 'rules_condition_content_is_type',
2390
-              '#info' => array(
2389
+                '#name' => 'rules_condition_content_is_type',
2390
+                '#info' => array(
2391 2391
                 'label' => 'Updated content is Team forum topic',
2392 2392
                 'arguments' => array(
2393
-                  'node' => array(
2393
+                    'node' => array(
2394 2394
                     'type' => 'node',
2395 2395
                     'label' => 'Content',
2396
-                  ),
2396
+                    ),
2397 2397
                 ),
2398 2398
                 'module' => 'Node',
2399
-              ),
2400
-              '#weight' => 0.0,
2399
+                ),
2400
+                '#weight' => 0.0,
2401
+            ),
2401 2402
             ),
2402
-          ),
2403
-          '2' => array(
2403
+            '2' => array(
2404 2404
             '#weight' => 0.0,
2405 2405
             '#info' => array(
2406
-              'label' => 'PHP code: content changed',
2407
-              'label callback' => FALSE,
2408
-              'module' => 'PHP',
2409
-              'eval input' => array(
2406
+                'label' => 'PHP code: content changed',
2407
+                'label callback' => FALSE,
2408
+                'module' => 'PHP',
2409
+                'eval input' => array(
2410 2410
                 '0' => 'code',
2411
-              ),
2411
+                ),
2412 2412
             ),
2413 2413
             '#name' => 'rules_condition_custom_php',
2414 2414
             '#settings' => array(
2415
-              'code' => 'return ($node->body != $node_unchanged->body);',
2416
-              'vars' => array(
2415
+                'code' => 'return ($node->body != $node_unchanged->body);',
2416
+                'vars' => array(
2417 2417
                 '0' => 'node',
2418 2418
                 '1' => 'node_unchanged',
2419
-              ),
2420
-              '#eval input' => array(
2419
+                ),
2420
+                '#eval input' => array(
2421 2421
                 'token_rules_input_evaluator' => array(
2422
-                  'code' => array(
2422
+                    'code' => array(
2423 2423
                     '0' => ':global',
2424
-                  ),
2424
+                    ),
2425
+                ),
2425 2426
                 ),
2426
-              ),
2427 2427
             ),
2428 2428
             '#type' => 'condition',
2429
-          ),
2429
+            ),
2430 2430
         ),
2431 2431
         '#actions' => array(
2432
-          '0' => array(
2432
+            '0' => array(
2433 2433
             '#type' => 'action',
2434 2434
             '#settings' => array(
2435
-              'from' => '',
2436
-              'subject' => 'Forum topic at [:global:site-name] edited by moderator/admin',
2437
-              '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')); ?>",
2438
-              '#eval input' => array(
2435
+                'from' => '',
2436
+                'subject' => 'Forum topic at [:global:site-name] edited by moderator/admin',
2437
+                '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')); ?>",
2438
+                '#eval input' => array(
2439 2439
                 'token_rules_input_evaluator' => array(
2440
-                  'subject' => array(
2440
+                    'subject' => array(
2441 2441
                     '0' => ':global',
2442
-                  ),
2443
-                  'message' => array(
2442
+                    ),
2443
+                    'message' => array(
2444 2444
                     '0' => 'node',
2445 2445
                     '1' => 'user',
2446 2446
                     '2' => ':global',
2447
-                  ),
2448
-                  'from' => array(
2447
+                    ),
2448
+                    'from' => array(
2449 2449
                     '0' => ':global',
2450
-                  ),
2450
+                    ),
2451 2451
                 ),
2452 2452
                 'rules_input_evaluator_php' => array(
2453
-                  'message' => array(
2453
+                    'message' => array(
2454 2454
                     '0' => 'node',
2455
-                  ),
2455
+                    ),
2456
+                ),
2456 2457
                 ),
2457
-              ),
2458 2458
             ),
2459 2459
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2460 2460
             '#info' => array(
2461
-              'label' => 'Notify moderators via email',
2462
-              'module' => 'BOINC core',
2463
-              'eval input' => array(
2461
+                'label' => 'Notify moderators via email',
2462
+                'module' => 'BOINC core',
2463
+                'eval input' => array(
2464 2464
                 '0' => 'subject',
2465 2465
                 '1' => 'message',
2466 2466
                 '2' => 'from',
2467
-              ),
2467
+                ),
2468 2468
             ),
2469 2469
             '#weight' => 0.0,
2470
-          ),
2470
+            ),
2471 2471
         ),
2472 2472
         '#version' => 6003,
2473
-      ),
2474
-      'rules_forum_topic_is_hidden_by_moderator_admin' => array(
2473
+        ),
2474
+        'rules_forum_topic_is_hidden_by_moderator_admin' => array(
2475 2475
         '#type' => 'rule',
2476 2476
         '#set' => 'event_node_update',
2477 2477
         '#label' => 'Forum topic is hidden by moderator/admin',
2478 2478
         '#active' => 1,
2479 2479
         '#weight' => '0',
2480 2480
         '#categories' => array(
2481
-          '0' => 'boinc_standard',
2482
-          '1' => 'moderator notification',
2481
+            '0' => 'boinc_standard',
2482
+            '1' => 'moderator notification',
2483 2483
         ),
2484 2484
         '#status' => 'default',
2485 2485
         '#conditions' => array(
2486
-          '0' => array(
2486
+            '0' => array(
2487 2487
             '#type' => 'condition',
2488 2488
             '#settings' => array(
2489
-              'roles' => array(
2489
+                'roles' => array(
2490 2490
                 '0' => 3519698132,
2491 2491
                 '1' => 1271379760,
2492
-              ),
2493
-              'operation' => 'OR',
2494
-              '#argument map' => array(
2492
+                ),
2493
+                'operation' => 'OR',
2494
+                '#argument map' => array(
2495 2495
                 'user' => 'user',
2496
-              ),
2496
+                ),
2497 2497
             ),
2498 2498
             '#name' => 'rules_condition_user_hasrole',
2499 2499
             '#info' => array(
2500
-              'label' => 'User has role(s): administrator or moderator',
2501
-              'label callback' => FALSE,
2502
-              'arguments' => array(
2500
+                'label' => 'User has role(s): administrator or moderator',
2501
+                'label callback' => FALSE,
2502
+                'arguments' => array(
2503 2503
                 'user' => array(
2504
-                  'type' => 'user',
2505
-                  'label' => 'User',
2504
+                    'type' => 'user',
2505
+                    'label' => 'User',
2506
+                ),
2506 2507
                 ),
2507
-              ),
2508
-              'module' => 'User',
2508
+                'module' => 'User',
2509 2509
             ),
2510 2510
             '#weight' => 0.0,
2511
-          ),
2512
-          '1' => array(
2511
+            ),
2512
+            '1' => array(
2513 2513
             '#weight' => 0.0,
2514 2514
             '0' => array(
2515
-              '#weight' => 0.0,
2516
-              '#type' => 'condition',
2517
-              '#settings' => array(
2515
+                '#weight' => 0.0,
2516
+                '#type' => 'condition',
2517
+                '#settings' => array(
2518 2518
                 'type' => array(
2519
-                  'forum' => 'forum',
2519
+                    'forum' => 'forum',
2520 2520
                 ),
2521 2521
                 '#argument map' => array(
2522
-                  'node' => 'node',
2522
+                    'node' => 'node',
2523
+                ),
2523 2524
                 ),
2524
-              ),
2525
-              '#name' => 'rules_condition_content_is_type',
2526
-              '#info' => array(
2525
+                '#name' => 'rules_condition_content_is_type',
2526
+                '#info' => array(
2527 2527
                 'label' => 'Updated content is Forum topic',
2528 2528
                 'arguments' => array(
2529
-                  'node' => array(
2529
+                    'node' => array(
2530 2530
                     'type' => 'node',
2531 2531
                     'label' => 'Content',
2532
-                  ),
2532
+                    ),
2533 2533
                 ),
2534 2534
                 'module' => 'Node',
2535
-              ),
2535
+                ),
2536 2536
             ),
2537 2537
             '#type' => 'OR',
2538 2538
             '1' => array(
2539
-              '#type' => 'condition',
2540
-              '#settings' => array(
2539
+                '#type' => 'condition',
2540
+                '#settings' => array(
2541 2541
                 'type' => array(
2542
-                  'team_forum' => 'team_forum',
2542
+                    'team_forum' => 'team_forum',
2543 2543
                 ),
2544 2544
                 '#argument map' => array(
2545
-                  'node' => 'node',
2545
+                    'node' => 'node',
2546
+                ),
2546 2547
                 ),
2547
-              ),
2548
-              '#name' => 'rules_condition_content_is_type',
2549
-              '#info' => array(
2548
+                '#name' => 'rules_condition_content_is_type',
2549
+                '#info' => array(
2550 2550
                 'label' => 'Updated content is Team forum topic',
2551 2551
                 'arguments' => array(
2552
-                  'node' => array(
2552
+                    'node' => array(
2553 2553
                     'type' => 'node',
2554 2554
                     'label' => 'Content',
2555
-                  ),
2555
+                    ),
2556 2556
                 ),
2557 2557
                 'module' => 'Node',
2558
-              ),
2559
-              '#weight' => 0.0,
2558
+                ),
2559
+                '#weight' => 0.0,
2560
+            ),
2560 2561
             ),
2561
-          ),
2562
-          '3' => array(
2562
+            '3' => array(
2563 2563
             '#weight' => 0.0,
2564 2564
             '#info' => array(
2565
-              'label' => 'PHP code: node content unchanged',
2566
-              'label callback' => FALSE,
2567
-              'module' => 'PHP',
2568
-              'eval input' => array(
2565
+                'label' => 'PHP code: node content unchanged',
2566
+                'label callback' => FALSE,
2567
+                'module' => 'PHP',
2568
+                'eval input' => array(
2569 2569
                 '0' => 'code',
2570
-              ),
2570
+                ),
2571 2571
             ),
2572 2572
             '#name' => 'rules_condition_custom_php',
2573 2573
             '#settings' => array(
2574
-              'code' => 'return $node->body == $node_unchanged->body;',
2575
-              'vars' => array(
2574
+                'code' => 'return $node->body == $node_unchanged->body;',
2575
+                'vars' => array(
2576 2576
                 '0' => 'node',
2577 2577
                 '1' => 'node_unchanged',
2578
-              ),
2579
-              '#eval input' => array(
2578
+                ),
2579
+                '#eval input' => array(
2580 2580
                 'token_rules_input_evaluator' => array(
2581
-                  'code' => array(
2581
+                    'code' => array(
2582 2582
                     '0' => ':global',
2583
-                  ),
2583
+                    ),
2584
+                ),
2584 2585
                 ),
2585
-              ),
2586 2586
             ),
2587 2587
             '#type' => 'condition',
2588
-          ),
2589
-          '4' => array(
2588
+            ),
2589
+            '4' => array(
2590 2590
             '#weight' => 0.0,
2591 2591
             '#info' => array(
2592
-              'label' => 'PHP code: node status changed to hidden',
2593
-              'label callback' => FALSE,
2594
-              'module' => 'PHP',
2595
-              'eval input' => array(
2592
+                'label' => 'PHP code: node status changed to hidden',
2593
+                'label callback' => FALSE,
2594
+                'module' => 'PHP',
2595
+                'eval input' => array(
2596 2596
                 '0' => 'code',
2597
-              ),
2597
+                ),
2598 2598
             ),
2599 2599
             '#name' => 'rules_condition_custom_php',
2600 2600
             '#type' => 'condition',
2601 2601
             '#settings' => array(
2602
-              'code' => 'return $node_unchanged->status == 1 && $node->status == 0;',
2603
-              'vars' => array(
2602
+                'code' => 'return $node_unchanged->status == 1 && $node->status == 0;',
2603
+                'vars' => array(
2604 2604
                 '0' => 'node',
2605 2605
                 '1' => 'node_unchanged',
2606
-              ),
2607
-              '#eval input' => array(
2606
+                ),
2607
+                '#eval input' => array(
2608 2608
                 'token_rules_input_evaluator' => array(
2609
-                  'code' => array(
2609
+                    'code' => array(
2610 2610
                     '0' => ':global',
2611
-                  ),
2611
+                    ),
2612
+                ),
2612 2613
                 ),
2613
-              ),
2614 2614
             ),
2615
-          ),
2615
+            ),
2616 2616
         ),
2617 2617
         '#actions' => array(
2618
-          '0' => array(
2618
+            '0' => array(
2619 2619
             '#info' => array(
2620
-              'label' => 'Notify moderators via email',
2621
-              'module' => 'BOINC core',
2622
-              'eval input' => array(
2620
+                'label' => 'Notify moderators via email',
2621
+                'module' => 'BOINC core',
2622
+                'eval input' => array(
2623 2623
                 '0' => 'subject',
2624 2624
                 '1' => 'message',
2625 2625
                 '2' => 'from',
2626
-              ),
2626
+                ),
2627 2627
             ),
2628 2628
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2629 2629
             '#settings' => array(
2630
-              'from' => '',
2631
-              'subject' => 'Forum topic at [:global:site-name] hidden by moderator/admin',
2632
-              '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')); ?>",
2633
-              '#eval input' => array(
2630
+                'from' => '',
2631
+                'subject' => 'Forum topic at [:global:site-name] hidden by moderator/admin',
2632
+                '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')); ?>",
2633
+                '#eval input' => array(
2634 2634
                 'token_rules_input_evaluator' => array(
2635
-                  'subject' => array(
2635
+                    'subject' => array(
2636 2636
                     '0' => ':global',
2637
-                  ),
2638
-                  'message' => array(
2637
+                    ),
2638
+                    'message' => array(
2639 2639
                     '0' => 'node',
2640 2640
                     '1' => 'user',
2641 2641
                     '2' => ':global',
2642
-                  ),
2643
-                  'from' => array(
2642
+                    ),
2643
+                    'from' => array(
2644 2644
                     '0' => ':global',
2645
-                  ),
2645
+                    ),
2646 2646
                 ),
2647 2647
                 'rules_input_evaluator_php' => array(
2648
-                  'message' => array(
2648
+                    'message' => array(
2649 2649
                     '0' => 'node',
2650
-                  ),
2650
+                    ),
2651
+                ),
2651 2652
                 ),
2652
-              ),
2653 2653
             ),
2654 2654
             '#type' => 'action',
2655 2655
             '#weight' => 0.0,
2656
-          ),
2656
+            ),
2657 2657
         ),
2658 2658
         '#version' => 6003,
2659
-      ),
2660
-      'rules_forum_topic_is_moved_to_a_different_forum_by_moderator_or_admin' => array(
2659
+        ),
2660
+        'rules_forum_topic_is_moved_to_a_different_forum_by_moderator_or_admin' => array(
2661 2661
         '#type' => 'rule',
2662 2662
         '#set' => 'event_node_update',
2663 2663
         '#label' => 'Forum topic is moved to a different forum by moderator or admin',
2664 2664
         '#active' => 1,
2665 2665
         '#weight' => '0',
2666 2666
         '#categories' => array(
2667
-          '0' => 'boinc_standard',
2668
-          '1' => 'moderator notification',
2667
+            '0' => 'boinc_standard',
2668
+            '1' => 'moderator notification',
2669 2669
         ),
2670 2670
         '#status' => 'default',
2671 2671
         '#conditions' => array(
2672
-          '0' => array(
2672
+            '0' => array(
2673 2673
             '#weight' => 0.0,
2674 2674
             '#type' => 'condition',
2675 2675
             '#settings' => array(
2676
-              'roles' => array(
2676
+                'roles' => array(
2677 2677
                 '0' => 3519698132,
2678 2678
                 '1' => 1271379760,
2679
-              ),
2680
-              'operation' => 'OR',
2681
-              '#argument map' => array(
2679
+                ),
2680
+                'operation' => 'OR',
2681
+                '#argument map' => array(
2682 2682
                 'user' => 'user',
2683
-              ),
2683
+                ),
2684 2684
             ),
2685 2685
             '#name' => 'rules_condition_user_hasrole',
2686 2686
             '#info' => array(
2687
-              'label' => 'User has role(s): administrator or moderator',
2688
-              'label callback' => FALSE,
2689
-              'arguments' => array(
2687
+                'label' => 'User has role(s): administrator or moderator',
2688
+                'label callback' => FALSE,
2689
+                'arguments' => array(
2690 2690
                 'user' => array(
2691
-                  'type' => 'user',
2692
-                  'label' => 'User',
2691
+                    'type' => 'user',
2692
+                    'label' => 'User',
2693 2693
                 ),
2694
-              ),
2695
-              'module' => 'User',
2694
+                ),
2695
+                'module' => 'User',
2696
+            ),
2696 2697
             ),
2697
-          ),
2698
-          '1' => array(
2698
+            '1' => array(
2699 2699
             '#weight' => 0.0,
2700 2700
             '0' => array(
2701
-              '#weight' => 0.0,
2702
-              '#info' => array(
2701
+                '#weight' => 0.0,
2702
+                '#info' => array(
2703 2703
                 'label' => 'Updated content is Forum topic',
2704 2704
                 'arguments' => array(
2705
-                  'node' => array(
2705
+                    'node' => array(
2706 2706
                     'type' => 'node',
2707 2707
                     'label' => 'Content',
2708
-                  ),
2708
+                    ),
2709 2709
                 ),
2710 2710
                 'module' => 'Node',
2711
-              ),
2712
-              '#name' => 'rules_condition_content_is_type',
2713
-              '#settings' => array(
2711
+                ),
2712
+                '#name' => 'rules_condition_content_is_type',
2713
+                '#settings' => array(
2714 2714
                 'type' => array(
2715
-                  'forum' => 'forum',
2715
+                    'forum' => 'forum',
2716 2716
                 ),
2717 2717
                 '#argument map' => array(
2718
-                  'node' => 'node',
2718
+                    'node' => 'node',
2719
+                ),
2719 2720
                 ),
2720
-              ),
2721
-              '#type' => 'condition',
2721
+                '#type' => 'condition',
2722 2722
             ),
2723 2723
             '#type' => 'OR',
2724 2724
             '1' => array(
2725
-              '#type' => 'condition',
2726
-              '#settings' => array(
2725
+                '#type' => 'condition',
2726
+                '#settings' => array(
2727 2727
                 'type' => array(
2728
-                  'team_forum' => 'team_forum',
2728
+                    'team_forum' => 'team_forum',
2729 2729
                 ),
2730 2730
                 '#argument map' => array(
2731
-                  'node' => 'node',
2731
+                    'node' => 'node',
2732 2732
                 ),
2733
-              ),
2734
-              '#name' => 'rules_condition_content_is_type',
2735
-              '#info' => array(
2733
+                ),
2734
+                '#name' => 'rules_condition_content_is_type',
2735
+                '#info' => array(
2736 2736
                 'label' => 'Updated content is Team forum topic',
2737 2737
                 'arguments' => array(
2738
-                  'node' => array(
2738
+                    'node' => array(
2739 2739
                     'type' => 'node',
2740 2740
                     'label' => 'Content',
2741
-                  ),
2741
+                    ),
2742 2742
                 ),
2743 2743
                 'module' => 'Node',
2744
-              ),
2745
-              '#weight' => 0.0,
2744
+                ),
2745
+                '#weight' => 0.0,
2746 2746
             ),
2747
-          ),
2748
-          '2' => array(
2747
+            ),
2748
+            '2' => array(
2749 2749
             '#weight' => 0.0,
2750 2750
             '#info' => array(
2751
-              'label' => 'PHP code: node moved to new forum parent',
2752
-              'label callback' => FALSE,
2753
-              'module' => 'PHP',
2754
-              'eval input' => array(
2751
+                'label' => 'PHP code: node moved to new forum parent',
2752
+                'label callback' => FALSE,
2753
+                'module' => 'PHP',
2754
+                'eval input' => array(
2755 2755
                 '0' => 'code',
2756
-              ),
2756
+                ),
2757 2757
             ),
2758 2758
             '#name' => 'rules_condition_custom_php',
2759 2759
             '#settings' => array(
2760
-              'code' => 'return ($node->tid != $node_unchanged->tid);',
2761
-              'vars' => array(
2760
+                'code' => 'return ($node->tid != $node_unchanged->tid);',
2761
+                'vars' => array(
2762 2762
                 '0' => 'node',
2763 2763
                 '1' => 'node_unchanged',
2764
-              ),
2765
-              '#eval input' => array(
2764
+                ),
2765
+                '#eval input' => array(
2766 2766
                 'token_rules_input_evaluator' => array(
2767
-                  'code' => array(
2767
+                    'code' => array(
2768 2768
                     '0' => ':global',
2769
-                  ),
2769
+                    ),
2770
+                ),
2770 2771
                 ),
2771
-              ),
2772 2772
             ),
2773 2773
             '#type' => 'condition',
2774
-          ),
2774
+            ),
2775 2775
         ),
2776 2776
         '#actions' => array(
2777
-          '0' => array(
2777
+            '0' => array(
2778 2778
             '#type' => 'action',
2779 2779
             '#settings' => array(
2780
-              'from' => '',
2781
-              'subject' => 'Forum topic at [:global:site-name] moved by moderator/admin',
2782
-              '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')); ?>",
2783
-              '#eval input' => array(
2780
+                'from' => '',
2781
+                'subject' => 'Forum topic at [:global:site-name] moved by moderator/admin',
2782
+                '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')); ?>",
2783
+                '#eval input' => array(
2784 2784
                 'token_rules_input_evaluator' => array(
2785
-                  'subject' => array(
2785
+                    'subject' => array(
2786 2786
                     '0' => ':global',
2787
-                  ),
2788
-                  'message' => array(
2787
+                    ),
2788
+                    'message' => array(
2789 2789
                     '0' => 'node',
2790 2790
                     '1' => 'user',
2791 2791
                     '2' => ':global',
2792
-                  ),
2793
-                  'from' => array(
2792
+                    ),
2793
+                    'from' => array(
2794 2794
                     '0' => ':global',
2795
-                  ),
2795
+                    ),
2796 2796
                 ),
2797 2797
                 'rules_input_evaluator_php' => array(
2798
-                  'message' => array(
2798
+                    'message' => array(
2799 2799
                     '0' => 'node',
2800
-                  ),
2800
+                    ),
2801
+                ),
2801 2802
                 ),
2802
-              ),
2803 2803
             ),
2804 2804
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2805 2805
             '#info' => array(
2806
-              'label' => 'Notify moderators via email',
2807
-              'module' => 'BOINC core',
2808
-              'eval input' => array(
2806
+                'label' => 'Notify moderators via email',
2807
+                'module' => 'BOINC core',
2808
+                'eval input' => array(
2809 2809
                 '0' => 'subject',
2810 2810
                 '1' => 'message',
2811 2811
                 '2' => 'from',
2812
-              ),
2812
+                ),
2813 2813
             ),
2814 2814
             '#weight' => 0.0,
2815
-          ),
2815
+            ),
2816 2816
         ),
2817 2817
         '#version' => 6003,
2818
-      ),
2819
-      'rules_forum_topic_is_unhidden_by_moderator_admin' => array(
2818
+        ),
2819
+        'rules_forum_topic_is_unhidden_by_moderator_admin' => array(
2820 2820
         '#type' => 'rule',
2821 2821
         '#set' => 'event_node_update',
2822 2822
         '#label' => 'Forum topic is unhidden by moderator/admin',
2823 2823
         '#active' => 1,
2824 2824
         '#weight' => '0',
2825 2825
         '#categories' => array(
2826
-          '0' => 'boinc_standard',
2827
-          '1' => 'moderator notification',
2826
+            '0' => 'boinc_standard',
2827
+            '1' => 'moderator notification',
2828 2828
         ),
2829 2829
         '#status' => 'default',
2830 2830
         '#conditions' => array(
2831
-          '0' => array(
2831
+            '0' => array(
2832 2832
             '#type' => 'condition',
2833 2833
             '#settings' => array(
2834
-              'roles' => array(
2834
+                'roles' => array(
2835 2835
                 '0' => 3519698132,
2836 2836
                 '1' => 1271379760,
2837
-              ),
2838
-              'operation' => 'OR',
2839
-              '#argument map' => array(
2837
+                ),
2838
+                'operation' => 'OR',
2839
+                '#argument map' => array(
2840 2840
                 'user' => 'user',
2841
-              ),
2841
+                ),
2842 2842
             ),
2843 2843
             '#name' => 'rules_condition_user_hasrole',
2844 2844
             '#info' => array(
2845
-              'label' => 'User has role(s): administrator or moderator',
2846
-              'label callback' => FALSE,
2847
-              'arguments' => array(
2845
+                'label' => 'User has role(s): administrator or moderator',
2846
+                'label callback' => FALSE,
2847
+                'arguments' => array(
2848 2848
                 'user' => array(
2849
-                  'type' => 'user',
2850
-                  'label' => 'User',
2849
+                    'type' => 'user',
2850
+                    'label' => 'User',
2851 2851
                 ),
2852
-              ),
2853
-              'module' => 'User',
2852
+                ),
2853
+                'module' => 'User',
2854 2854
             ),
2855 2855
             '#weight' => 0.0,
2856
-          ),
2857
-          '1' => array(
2856
+            ),
2857
+            '1' => array(
2858 2858
             '#type' => 'OR',
2859 2859
             '0' => array(
2860
-              '#info' => array(
2860
+                '#info' => array(
2861 2861
                 'label' => 'Updated content is Forum topic',
2862 2862
                 'arguments' => array(
2863
-                  'node' => array(
2863
+                    'node' => array(
2864 2864
                     'type' => 'node',
2865 2865
                     'label' => 'Content',
2866
-                  ),
2866
+                    ),
2867 2867
                 ),
2868 2868
                 'module' => 'Node',
2869
-              ),
2870
-              '#name' => 'rules_condition_content_is_type',
2871
-              '#settings' => array(
2869
+                ),
2870
+                '#name' => 'rules_condition_content_is_type',
2871
+                '#settings' => array(
2872 2872
                 'type' => array(
2873
-                  'forum' => 'forum',
2873
+                    'forum' => 'forum',
2874 2874
                 ),
2875 2875
                 '#argument map' => array(
2876
-                  'node' => 'node',
2876
+                    'node' => 'node',
2877
+                ),
2877 2878
                 ),
2878
-              ),
2879
-              '#type' => 'condition',
2880
-              '#weight' => 0.0,
2879
+                '#type' => 'condition',
2880
+                '#weight' => 0.0,
2881 2881
             ),
2882 2882
             '#weight' => 0.0,
2883 2883
             '1' => array(
2884
-              '#weight' => 0.0,
2885
-              '#info' => array(
2884
+                '#weight' => 0.0,
2885
+                '#info' => array(
2886 2886
                 'label' => 'Updated content is Team forum topic',
2887 2887
                 'arguments' => array(
2888
-                  'node' => array(
2888
+                    'node' => array(
2889 2889
                     'type' => 'node',
2890 2890
                     'label' => 'Content',
2891
-                  ),
2891
+                    ),
2892 2892
                 ),
2893 2893
                 'module' => 'Node',
2894
-              ),
2895
-              '#name' => 'rules_condition_content_is_type',
2896
-              '#settings' => array(
2894
+                ),
2895
+                '#name' => 'rules_condition_content_is_type',
2896
+                '#settings' => array(
2897 2897
                 'type' => array(
2898
-                  'team_forum' => 'team_forum',
2898
+                    'team_forum' => 'team_forum',
2899 2899
                 ),
2900 2900
                 '#argument map' => array(
2901
-                  'node' => 'node',
2901
+                    'node' => 'node',
2902
+                ),
2902 2903
                 ),
2903
-              ),
2904
-              '#type' => 'condition',
2904
+                '#type' => 'condition',
2905 2905
             ),
2906
-          ),
2907
-          '3' => array(
2906
+            ),
2907
+            '3' => array(
2908 2908
             '#type' => 'condition',
2909 2909
             '#settings' => array(
2910
-              'code' => 'return $node->body == $node_unchanged->body;',
2911
-              'vars' => array(
2910
+                'code' => 'return $node->body == $node_unchanged->body;',
2911
+                'vars' => array(
2912 2912
                 '0' => 'node',
2913 2913
                 '1' => 'node_unchanged',
2914
-              ),
2915
-              '#eval input' => array(
2914
+                ),
2915
+                '#eval input' => array(
2916 2916
                 'token_rules_input_evaluator' => array(
2917
-                  'code' => array(
2917
+                    'code' => array(
2918 2918
                     '0' => ':global',
2919
-                  ),
2919
+                    ),
2920
+                ),
2920 2921
                 ),
2921
-              ),
2922 2922
             ),
2923 2923
             '#name' => 'rules_condition_custom_php',
2924 2924
             '#info' => array(
2925
-              'label' => 'PHP code: node content is unchanged',
2926
-              'label callback' => FALSE,
2927
-              'module' => 'PHP',
2928
-              'eval input' => array(
2925
+                'label' => 'PHP code: node content is unchanged',
2926
+                'label callback' => FALSE,
2927
+                'module' => 'PHP',
2928
+                'eval input' => array(
2929 2929
                 '0' => 'code',
2930
-              ),
2930
+                ),
2931 2931
             ),
2932 2932
             '#weight' => 0.0,
2933
-          ),
2934
-          '4' => array(
2933
+            ),
2934
+            '4' => array(
2935 2935
             '#type' => 'condition',
2936 2936
             '#settings' => array(
2937
-              'code' => 'return $node_unchanged->status == 0 && $node->status == 1;',
2938
-              'vars' => array(
2937
+                'code' => 'return $node_unchanged->status == 0 && $node->status == 1;',
2938
+                'vars' => array(
2939 2939
                 '0' => 'node',
2940 2940
                 '1' => 'node_unchanged',
2941
-              ),
2942
-              '#eval input' => array(
2941
+                ),
2942
+                '#eval input' => array(
2943 2943
                 'token_rules_input_evaluator' => array(
2944
-                  'code' => array(
2944
+                    'code' => array(
2945 2945
                     '0' => ':global',
2946
-                  ),
2946
+                    ),
2947
+                ),
2947 2948
                 ),
2948
-              ),
2949 2949
             ),
2950 2950
             '#name' => 'rules_condition_custom_php',
2951 2951
             '#info' => array(
2952
-              'label' => 'PHP code: node status changed to unhidden',
2953
-              'label callback' => FALSE,
2954
-              'module' => 'PHP',
2955
-              'eval input' => array(
2952
+                'label' => 'PHP code: node status changed to unhidden',
2953
+                'label callback' => FALSE,
2954
+                'module' => 'PHP',
2955
+                'eval input' => array(
2956 2956
                 '0' => 'code',
2957
-              ),
2957
+                ),
2958 2958
             ),
2959 2959
             '#weight' => 0.0,
2960
-          ),
2960
+            ),
2961 2961
         ),
2962 2962
         '#actions' => array(
2963
-          '0' => array(
2963
+            '0' => array(
2964 2964
             '#info' => array(
2965
-              'label' => 'Notify moderators via email',
2966
-              'module' => 'BOINC core',
2967
-              'eval input' => array(
2965
+                'label' => 'Notify moderators via email',
2966
+                'module' => 'BOINC core',
2967
+                'eval input' => array(
2968 2968
                 '0' => 'subject',
2969 2969
                 '1' => 'message',
2970 2970
                 '2' => 'from',
2971
-              ),
2971
+                ),
2972 2972
             ),
2973 2973
             '#name' => 'boinccore_rules_action_mail_to_moderators',
2974 2974
             '#settings' => array(
2975
-              'from' => '',
2976
-              'subject' => 'Forum topic at [:global:site-name] unhidden by moderator/admin',
2977
-              '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')); ?>",
2978
-              '#eval input' => array(
2975
+                'from' => '',
2976
+                'subject' => 'Forum topic at [:global:site-name] unhidden by moderator/admin',
2977
+                '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')); ?>",
2978
+                '#eval input' => array(
2979 2979
                 'token_rules_input_evaluator' => array(
2980
-                  'subject' => array(
2980
+                    'subject' => array(
2981 2981
                     '0' => ':global',
2982
-                  ),
2983
-                  'message' => array(
2982
+                    ),
2983
+                    'message' => array(
2984 2984
                     '0' => 'node',
2985 2985
                     '1' => 'user',
2986 2986
                     '2' => ':global',
2987
-                  ),
2988
-                  'from' => array(
2987
+                    ),
2988
+                    'from' => array(
2989 2989
                     '0' => ':global',
2990
-                  ),
2990
+                    ),
2991 2991
                 ),
2992 2992
                 'rules_input_evaluator_php' => array(
2993
-                  'message' => array(
2993
+                    'message' => array(
2994 2994
                     '0' => 'node',
2995
-                  ),
2995
+                    ),
2996
+                ),
2996 2997
                 ),
2997
-              ),
2998 2998
             ),
2999 2999
             '#type' => 'action',
3000 3000
             '#weight' => 0.0,
3001
-          ),
3001
+            ),
3002 3002
         ),
3003 3003
         '#version' => 6003,
3004
-      ),
3005
-      'rules_forum_topic_locked_by_moderator_admin' => array(
3004
+        ),
3005
+        'rules_forum_topic_locked_by_moderator_admin' => array(
3006 3006
         '#type' => 'rule',
3007 3007
         '#set' => 'event_node_update',
3008 3008
         '#label' => 'Forum topic locked by moderator/admin',
3009 3009
         '#active' => 1,
3010 3010
         '#weight' => '0',
3011 3011
         '#categories' => array(
3012
-          '0' => 'boinc_standard',
3013
-          '1' => 'moderator notification',
3012
+            '0' => 'boinc_standard',
3013
+            '1' => 'moderator notification',
3014 3014
         ),
3015 3015
         '#status' => 'default',
3016 3016
         '#conditions' => array(
3017
-          '0' => array(
3017
+            '0' => array(
3018 3018
             '#type' => 'condition',
3019 3019
             '#settings' => array(
3020
-              'roles' => array(
3020
+                'roles' => array(
3021 3021
                 '0' => 3519698132,
3022 3022
                 '1' => 1271379760,
3023
-              ),
3024
-              'operation' => 'OR',
3025
-              '#argument map' => array(
3023
+                ),
3024
+                'operation' => 'OR',
3025
+                '#argument map' => array(
3026 3026
                 'user' => 'user',
3027
-              ),
3027
+                ),
3028 3028
             ),
3029 3029
             '#name' => 'rules_condition_user_hasrole',
3030 3030
             '#info' => array(
3031
-              'label' => 'User has role(s): administrator or moderator',
3032
-              'label callback' => FALSE,
3033
-              'arguments' => array(
3031
+                'label' => 'User has role(s): administrator or moderator',
3032
+                'label callback' => FALSE,
3033
+                'arguments' => array(
3034 3034
                 'user' => array(
3035
-                  'type' => 'user',
3036
-                  'label' => 'User',
3035
+                    'type' => 'user',
3036
+                    'label' => 'User',
3037
+                ),
3037 3038
                 ),
3038
-              ),
3039
-              'module' => 'User',
3039
+                'module' => 'User',
3040 3040
             ),
3041 3041
             '#weight' => 0.0,
3042
-          ),
3043
-          '1' => array(
3042
+            ),
3043
+            '1' => array(
3044 3044
             '#weight' => 0.0,
3045 3045
             '0' => array(
3046
-              '#weight' => 0.0,
3047
-              '#type' => 'condition',
3048
-              '#settings' => array(
3046
+                '#weight' => 0.0,
3047
+                '#type' => 'condition',
3048
+                '#settings' => array(
3049 3049
                 'type' => array(
3050
-                  'forum' => 'forum',
3050
+                    'forum' => 'forum',
3051 3051
                 ),
3052 3052
                 '#argument map' => array(
3053
-                  'node' => 'node',
3053
+                    'node' => 'node',
3054
+                ),
3054 3055
                 ),
3055
-              ),
3056
-              '#name' => 'rules_condition_content_is_type',
3057
-              '#info' => array(
3056
+                '#name' => 'rules_condition_content_is_type',
3057
+                '#info' => array(
3058 3058
                 'label' => 'Updated content is Forum topic',
3059 3059
                 'arguments' => array(
3060
-                  'node' => array(
3060
+                    'node' => array(
3061 3061
                     'type' => 'node',
3062 3062
                     'label' => 'Content',
3063
-                  ),
3063
+                    ),
3064 3064
                 ),
3065 3065
                 'module' => 'Node',
3066
-              ),
3066
+                ),
3067 3067
             ),
3068 3068
             '#type' => 'OR',
3069 3069
             '1' => array(
3070
-              '#type' => 'condition',
3071
-              '#settings' => array(
3070
+                '#type' => 'condition',
3071
+                '#settings' => array(
3072 3072
                 'type' => array(
3073
-                  'team_forum' => 'team_forum',
3073
+                    'team_forum' => 'team_forum',
3074 3074
                 ),
3075 3075
                 '#argument map' => array(
3076
-                  'node' => 'node',
3076
+                    'node' => 'node',
3077
+                ),
3077 3078
                 ),
3078
-              ),
3079
-              '#name' => 'rules_condition_content_is_type',
3080
-              '#info' => array(
3079
+                '#name' => 'rules_condition_content_is_type',
3080
+                '#info' => array(
3081 3081
                 'label' => 'Updated content is Team forum topic',
3082 3082
                 'arguments' => array(
3083
-                  'node' => array(
3083
+                    'node' => array(
3084 3084
                     'type' => 'node',
3085 3085
                     'label' => 'Content',
3086
-                  ),
3086
+                    ),
3087 3087
                 ),
3088 3088
                 'module' => 'Node',
3089
-              ),
3090
-              '#weight' => 0.0,
3089
+                ),
3090
+                '#weight' => 0.0,
3091
+            ),
3091 3092
             ),
3092
-          ),
3093
-          '3' => array(
3093
+            '3' => array(
3094 3094
             '#weight' => 0.0,
3095 3095
             '#info' => array(
3096
-              'label' => 'PHP code: node content unchanged',
3097
-              'label callback' => FALSE,
3098
-              'module' => 'PHP',
3099
-              'eval input' => array(
3096
+                'label' => 'PHP code: node content unchanged',
3097
+                'label callback' => FALSE,
3098
+                'module' => 'PHP',
3099
+                'eval input' => array(
3100 3100
                 '0' => 'code',
3101
-              ),
3101
+                ),
3102 3102
             ),
3103 3103
             '#name' => 'rules_condition_custom_php',
3104 3104
             '#settings' => array(
3105
-              'code' => 'return $node->body == $node_unchanged->body;',
3106
-              'vars' => array(
3105
+                'code' => 'return $node->body == $node_unchanged->body;',
3106
+                'vars' => array(
3107 3107
                 '0' => 'node',
3108 3108
                 '1' => 'node_unchanged',
3109
-              ),
3110
-              '#eval input' => array(
3109
+                ),
3110
+                '#eval input' => array(
3111 3111
                 'token_rules_input_evaluator' => array(
3112
-                  'code' => array(
3112
+                    'code' => array(
3113 3113
                     '0' => ':global',
3114
-                  ),
3114
+                    ),
3115
+                ),
3115 3116
                 ),
3116
-              ),
3117 3117
             ),
3118 3118
             '#type' => 'condition',
3119
-          ),
3120
-          '4' => array(
3119
+            ),
3120
+            '4' => array(
3121 3121
             '#weight' => 0.0,
3122 3122
             '#info' => array(
3123
-              'label' => 'PHP code: node locked',
3124
-              'label callback' => FALSE,
3125
-              'module' => 'PHP',
3126
-              'eval input' => array(
3123
+                'label' => 'PHP code: node locked',
3124
+                'label callback' => FALSE,
3125
+                'module' => 'PHP',
3126
+                'eval input' => array(
3127 3127
                 '0' => 'code',
3128
-              ),
3128
+                ),
3129 3129
             ),
3130 3130
             '#name' => 'rules_condition_custom_php',
3131 3131
             '#type' => 'condition',
3132 3132
             '#settings' => array(
3133
-              'code' => 'return $node_unchanged->comment == 2 && $node->comment == 1;',
3134
-              'vars' => array(
3133
+                'code' => 'return $node_unchanged->comment == 2 && $node->comment == 1;',
3134
+                'vars' => array(
3135 3135
                 '0' => 'node',
3136 3136
                 '1' => 'node_unchanged',
3137
-              ),
3138
-              '#eval input' => array(
3137
+                ),
3138
+                '#eval input' => array(
3139 3139
                 'token_rules_input_evaluator' => array(
3140
-                  'code' => array(
3140
+                    'code' => array(
3141 3141
                     '0' => ':global',
3142
-                  ),
3142
+                    ),
3143 3143
                 ),
3144
-              ),
3144
+                ),
3145
+            ),
3145 3146
             ),
3146
-          ),
3147 3147
         ),
3148 3148
         '#actions' => array(
3149
-          '0' => array(
3149
+            '0' => array(
3150 3150
             '#info' => array(
3151
-              'label' => 'Notify moderators via email',
3152
-              'module' => 'BOINC core',
3153
-              'eval input' => array(
3151
+                'label' => 'Notify moderators via email',
3152
+                'module' => 'BOINC core',
3153
+                'eval input' => array(
3154 3154
                 '0' => 'subject',
3155 3155
                 '1' => 'message',
3156 3156
                 '2' => 'from',
3157
-              ),
3157
+                ),
3158 3158
             ),
3159 3159
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3160 3160
             '#settings' => array(
3161
-              'from' => '',
3162
-              'subject' => 'Forum topic at [:global:site-name] locked by moderator/admin',
3163
-              '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')); ?>",
3164
-              '#eval input' => array(
3161
+                'from' => '',
3162
+                'subject' => 'Forum topic at [:global:site-name] locked by moderator/admin',
3163
+                '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')); ?>",
3164
+                '#eval input' => array(
3165 3165
                 'token_rules_input_evaluator' => array(
3166
-                  'subject' => array(
3166
+                    'subject' => array(
3167 3167
                     '0' => ':global',
3168
-                  ),
3169
-                  'message' => array(
3168
+                    ),
3169
+                    'message' => array(
3170 3170
                     '0' => 'node',
3171 3171
                     '1' => 'user',
3172 3172
                     '2' => ':global',
3173
-                  ),
3174
-                  'from' => array(
3173
+                    ),
3174
+                    'from' => array(
3175 3175
                     '0' => ':global',
3176
-                  ),
3176
+                    ),
3177 3177
                 ),
3178 3178
                 'rules_input_evaluator_php' => array(
3179
-                  'message' => array(
3179
+                    'message' => array(
3180 3180
                     '0' => 'node',
3181
-                  ),
3181
+                    ),
3182
+                ),
3182 3183
                 ),
3183
-              ),
3184 3184
             ),
3185 3185
             '#type' => 'action',
3186 3186
             '#weight' => 0.0,
3187
-          ),
3187
+            ),
3188 3188
         ),
3189 3189
         '#version' => 6003,
3190
-      ),
3191
-      'rules_forum_topic_marked_sticky_by_moderator_admin' => array(
3190
+        ),
3191
+        'rules_forum_topic_marked_sticky_by_moderator_admin' => array(
3192 3192
         '#type' => 'rule',
3193 3193
         '#set' => 'event_node_update',
3194 3194
         '#label' => 'Forum topic marked sticky by moderator/admin',
3195 3195
         '#active' => 1,
3196 3196
         '#weight' => '0',
3197 3197
         '#categories' => array(
3198
-          '0' => 'boinc_standard',
3199
-          '1' => 'moderator notification',
3198
+            '0' => 'boinc_standard',
3199
+            '1' => 'moderator notification',
3200 3200
         ),
3201 3201
         '#status' => 'default',
3202 3202
         '#conditions' => array(
3203
-          '0' => array(
3203
+            '0' => array(
3204 3204
             '#type' => 'condition',
3205 3205
             '#settings' => array(
3206
-              'roles' => array(
3206
+                'roles' => array(
3207 3207
                 '0' => 3519698132,
3208 3208
                 '1' => 1271379760,
3209
-              ),
3210
-              'operation' => 'OR',
3211
-              '#argument map' => array(
3209
+                ),
3210
+                'operation' => 'OR',
3211
+                '#argument map' => array(
3212 3212
                 'user' => 'user',
3213
-              ),
3213
+                ),
3214 3214
             ),
3215 3215
             '#name' => 'rules_condition_user_hasrole',
3216 3216
             '#info' => array(
3217
-              'label' => 'User has role(s): administrator or moderator',
3218
-              'label callback' => FALSE,
3219
-              'arguments' => array(
3217
+                'label' => 'User has role(s): administrator or moderator',
3218
+                'label callback' => FALSE,
3219
+                'arguments' => array(
3220 3220
                 'user' => array(
3221
-                  'type' => 'user',
3222
-                  'label' => 'User',
3221
+                    'type' => 'user',
3222
+                    'label' => 'User',
3223
+                ),
3223 3224
                 ),
3224
-              ),
3225
-              'module' => 'User',
3225
+                'module' => 'User',
3226 3226
             ),
3227 3227
             '#weight' => 0.0,
3228
-          ),
3229
-          '1' => array(
3228
+            ),
3229
+            '1' => array(
3230 3230
             '#weight' => 0.0,
3231 3231
             '0' => array(
3232
-              '#weight' => 0.0,
3233
-              '#type' => 'condition',
3234
-              '#settings' => array(
3232
+                '#weight' => 0.0,
3233
+                '#type' => 'condition',
3234
+                '#settings' => array(
3235 3235
                 'type' => array(
3236
-                  'forum' => 'forum',
3236
+                    'forum' => 'forum',
3237 3237
                 ),
3238 3238
                 '#argument map' => array(
3239
-                  'node' => 'node',
3239
+                    'node' => 'node',
3240
+                ),
3240 3241
                 ),
3241
-              ),
3242
-              '#name' => 'rules_condition_content_is_type',
3243
-              '#info' => array(
3242
+                '#name' => 'rules_condition_content_is_type',
3243
+                '#info' => array(
3244 3244
                 'label' => 'Updated content is Forum topic',
3245 3245
                 'arguments' => array(
3246
-                  'node' => array(
3246
+                    'node' => array(
3247 3247
                     'type' => 'node',
3248 3248
                     'label' => 'Content',
3249
-                  ),
3249
+                    ),
3250 3250
                 ),
3251 3251
                 'module' => 'Node',
3252
-              ),
3252
+                ),
3253 3253
             ),
3254 3254
             '#type' => 'OR',
3255 3255
             '1' => array(
3256
-              '#type' => 'condition',
3257
-              '#settings' => array(
3256
+                '#type' => 'condition',
3257
+                '#settings' => array(
3258 3258
                 'type' => array(
3259
-                  'team_forum' => 'team_forum',
3259
+                    'team_forum' => 'team_forum',
3260 3260
                 ),
3261 3261
                 '#argument map' => array(
3262
-                  'node' => 'node',
3262
+                    'node' => 'node',
3263
+                ),
3263 3264
                 ),
3264
-              ),
3265
-              '#name' => 'rules_condition_content_is_type',
3266
-              '#info' => array(
3265
+                '#name' => 'rules_condition_content_is_type',
3266
+                '#info' => array(
3267 3267
                 'label' => 'Updated content is Team forum topic',
3268 3268
                 'arguments' => array(
3269
-                  'node' => array(
3269
+                    'node' => array(
3270 3270
                     'type' => 'node',
3271 3271
                     'label' => 'Content',
3272
-                  ),
3272
+                    ),
3273 3273
                 ),
3274 3274
                 'module' => 'Node',
3275
-              ),
3276
-              '#weight' => 0.0,
3275
+                ),
3276
+                '#weight' => 0.0,
3277
+            ),
3277 3278
             ),
3278
-          ),
3279
-          '3' => array(
3279
+            '3' => array(
3280 3280
             '#weight' => 0.0,
3281 3281
             '#info' => array(
3282
-              'label' => 'PHP code: node content unchanged',
3283
-              'label callback' => FALSE,
3284
-              'module' => 'PHP',
3285
-              'eval input' => array(
3282
+                'label' => 'PHP code: node content unchanged',
3283
+                'label callback' => FALSE,
3284
+                'module' => 'PHP',
3285
+                'eval input' => array(
3286 3286
                 '0' => 'code',
3287
-              ),
3287
+                ),
3288 3288
             ),
3289 3289
             '#name' => 'rules_condition_custom_php',
3290 3290
             '#settings' => array(
3291
-              'code' => 'return $node->body == $node_unchanged->body;',
3292
-              'vars' => array(
3291
+                'code' => 'return $node->body == $node_unchanged->body;',
3292
+                'vars' => array(
3293 3293
                 '0' => 'node',
3294 3294
                 '1' => 'node_unchanged',
3295
-              ),
3296
-              '#eval input' => array(
3295
+                ),
3296
+                '#eval input' => array(
3297 3297
                 'token_rules_input_evaluator' => array(
3298
-                  'code' => array(
3298
+                    'code' => array(
3299 3299
                     '0' => ':global',
3300
-                  ),
3300
+                    ),
3301
+                ),
3301 3302
                 ),
3302
-              ),
3303 3303
             ),
3304 3304
             '#type' => 'condition',
3305
-          ),
3306
-          '4' => array(
3305
+            ),
3306
+            '4' => array(
3307 3307
             '#weight' => 0.0,
3308 3308
             '#info' => array(
3309
-              'label' => 'PHP code: node made sticky',
3310
-              'label callback' => FALSE,
3311
-              'module' => 'PHP',
3312
-              'eval input' => array(
3309
+                'label' => 'PHP code: node made sticky',
3310
+                'label callback' => FALSE,
3311
+                'module' => 'PHP',
3312
+                'eval input' => array(
3313 3313
                 '0' => 'code',
3314
-              ),
3314
+                ),
3315 3315
             ),
3316 3316
             '#name' => 'rules_condition_custom_php',
3317 3317
             '#type' => 'condition',
3318 3318
             '#settings' => array(
3319
-              'code' => 'return $node_unchanged->sticky == 0 && $node->sticky == 1;',
3320
-              'vars' => array(
3319
+                'code' => 'return $node_unchanged->sticky == 0 && $node->sticky == 1;',
3320
+                'vars' => array(
3321 3321
                 '0' => 'node',
3322 3322
                 '1' => 'node_unchanged',
3323
-              ),
3324
-              '#eval input' => array(
3323
+                ),
3324
+                '#eval input' => array(
3325 3325
                 'token_rules_input_evaluator' => array(
3326
-                  'code' => array(
3326
+                    'code' => array(
3327 3327
                     '0' => ':global',
3328
-                  ),
3328
+                    ),
3329
+                ),
3329 3330
                 ),
3330
-              ),
3331 3331
             ),
3332
-          ),
3332
+            ),
3333 3333
         ),
3334 3334
         '#actions' => array(
3335
-          '0' => array(
3335
+            '0' => array(
3336 3336
             '#info' => array(
3337
-              'label' => 'Notify moderators via email',
3338
-              'module' => 'BOINC core',
3339
-              'eval input' => array(
3337
+                'label' => 'Notify moderators via email',
3338
+                'module' => 'BOINC core',
3339
+                'eval input' => array(
3340 3340
                 '0' => 'subject',
3341 3341
                 '1' => 'message',
3342 3342
                 '2' => 'from',
3343
-              ),
3343
+                ),
3344 3344
             ),
3345 3345
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3346 3346
             '#settings' => array(
3347
-              'from' => '',
3348
-              'subject' => 'Forum topic at [:global:site-name] marked sticky by moderator/admin',
3349
-              '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')); ?>",
3350
-              '#eval input' => array(
3347
+                'from' => '',
3348
+                'subject' => 'Forum topic at [:global:site-name] marked sticky by moderator/admin',
3349
+                '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')); ?>",
3350
+                '#eval input' => array(
3351 3351
                 'token_rules_input_evaluator' => array(
3352
-                  'subject' => array(
3352
+                    'subject' => array(
3353 3353
                     '0' => ':global',
3354
-                  ),
3355
-                  'message' => array(
3354
+                    ),
3355
+                    'message' => array(
3356 3356
                     '0' => 'node',
3357 3357
                     '1' => 'user',
3358 3358
                     '2' => ':global',
3359
-                  ),
3360
-                  'from' => array(
3359
+                    ),
3360
+                    'from' => array(
3361 3361
                     '0' => ':global',
3362
-                  ),
3362
+                    ),
3363 3363
                 ),
3364 3364
                 'rules_input_evaluator_php' => array(
3365
-                  'message' => array(
3365
+                    'message' => array(
3366 3366
                     '0' => 'node',
3367
-                  ),
3367
+                    ),
3368
+                ),
3368 3369
                 ),
3369
-              ),
3370 3370
             ),
3371 3371
             '#type' => 'action',
3372 3372
             '#weight' => 0.0,
3373
-          ),
3373
+            ),
3374 3374
         ),
3375 3375
         '#version' => 6003,
3376
-      ),
3377
-      'rules_forum_topic_marked_unsticky_by_moderator_admin' => array(
3376
+        ),
3377
+        'rules_forum_topic_marked_unsticky_by_moderator_admin' => array(
3378 3378
         '#type' => 'rule',
3379 3379
         '#set' => 'event_node_update',
3380 3380
         '#label' => 'Forum topic marked unsticky by moderator/admin',
3381 3381
         '#active' => 1,
3382 3382
         '#weight' => '0',
3383 3383
         '#categories' => array(
3384
-          '0' => 'boinc_standard',
3385
-          '1' => 'moderator notification',
3384
+            '0' => 'boinc_standard',
3385
+            '1' => 'moderator notification',
3386 3386
         ),
3387 3387
         '#status' => 'default',
3388 3388
         '#conditions' => array(
3389
-          '0' => array(
3389
+            '0' => array(
3390 3390
             '#type' => 'condition',
3391 3391
             '#settings' => array(
3392
-              'roles' => array(
3392
+                'roles' => array(
3393 3393
                 '0' => 3519698132,
3394 3394
                 '1' => 1271379760,
3395
-              ),
3396
-              'operation' => 'OR',
3397
-              '#argument map' => array(
3395
+                ),
3396
+                'operation' => 'OR',
3397
+                '#argument map' => array(
3398 3398
                 'user' => 'user',
3399
-              ),
3399
+                ),
3400 3400
             ),
3401 3401
             '#name' => 'rules_condition_user_hasrole',
3402 3402
             '#info' => array(
3403
-              'label' => 'User has role(s): administrator or moderator',
3404
-              'label callback' => FALSE,
3405
-              'arguments' => array(
3403
+                'label' => 'User has role(s): administrator or moderator',
3404
+                'label callback' => FALSE,
3405
+                'arguments' => array(
3406 3406
                 'user' => array(
3407
-                  'type' => 'user',
3408
-                  'label' => 'User',
3407
+                    'type' => 'user',
3408
+                    'label' => 'User',
3409
+                ),
3409 3410
                 ),
3410
-              ),
3411
-              'module' => 'User',
3411
+                'module' => 'User',
3412 3412
             ),
3413 3413
             '#weight' => 0.0,
3414
-          ),
3415
-          '1' => array(
3414
+            ),
3415
+            '1' => array(
3416 3416
             '#weight' => 0.0,
3417 3417
             '0' => array(
3418
-              '#weight' => 0.0,
3419
-              '#type' => 'condition',
3420
-              '#settings' => array(
3418
+                '#weight' => 0.0,
3419
+                '#type' => 'condition',
3420
+                '#settings' => array(
3421 3421
                 'type' => array(
3422
-                  'forum' => 'forum',
3422
+                    'forum' => 'forum',
3423 3423
                 ),
3424 3424
                 '#argument map' => array(
3425
-                  'node' => 'node',
3425
+                    'node' => 'node',
3426
+                ),
3426 3427
                 ),
3427
-              ),
3428
-              '#name' => 'rules_condition_content_is_type',
3429
-              '#info' => array(
3428
+                '#name' => 'rules_condition_content_is_type',
3429
+                '#info' => array(
3430 3430
                 'label' => 'Updated content is Forum topic',
3431 3431
                 'arguments' => array(
3432
-                  'node' => array(
3432
+                    'node' => array(
3433 3433
                     'type' => 'node',
3434 3434
                     'label' => 'Content',
3435
-                  ),
3435
+                    ),
3436 3436
                 ),
3437 3437
                 'module' => 'Node',
3438
-              ),
3438
+                ),
3439 3439
             ),
3440 3440
             '#type' => 'OR',
3441 3441
             '1' => array(
3442
-              '#type' => 'condition',
3443
-              '#settings' => array(
3442
+                '#type' => 'condition',
3443
+                '#settings' => array(
3444 3444
                 'type' => array(
3445
-                  'team_forum' => 'team_forum',
3445
+                    'team_forum' => 'team_forum',
3446 3446
                 ),
3447 3447
                 '#argument map' => array(
3448
-                  'node' => 'node',
3448
+                    'node' => 'node',
3449 3449
                 ),
3450
-              ),
3451
-              '#name' => 'rules_condition_content_is_type',
3452
-              '#info' => array(
3450
+                ),
3451
+                '#name' => 'rules_condition_content_is_type',
3452
+                '#info' => array(
3453 3453
                 'label' => 'Updated content is Team forum topic',
3454 3454
                 'arguments' => array(
3455
-                  'node' => array(
3455
+                    'node' => array(
3456 3456
                     'type' => 'node',
3457 3457
                     'label' => 'Content',
3458
-                  ),
3458
+                    ),
3459 3459
                 ),
3460 3460
                 'module' => 'Node',
3461
-              ),
3462
-              '#weight' => 0.0,
3461
+                ),
3462
+                '#weight' => 0.0,
3463 3463
             ),
3464
-          ),
3465
-          '3' => array(
3464
+            ),
3465
+            '3' => array(
3466 3466
             '#weight' => 0.0,
3467 3467
             '#info' => array(
3468
-              'label' => 'PHP code: node content unchanged',
3469
-              'label callback' => FALSE,
3470
-              'module' => 'PHP',
3471
-              'eval input' => array(
3468
+                'label' => 'PHP code: node content unchanged',
3469
+                'label callback' => FALSE,
3470
+                'module' => 'PHP',
3471
+                'eval input' => array(
3472 3472
                 '0' => 'code',
3473
-              ),
3473
+                ),
3474 3474
             ),
3475 3475
             '#name' => 'rules_condition_custom_php',
3476 3476
             '#settings' => array(
3477
-              'code' => 'return $node->body == $node_unchanged->body;',
3478
-              'vars' => array(
3477
+                'code' => 'return $node->body == $node_unchanged->body;',
3478
+                'vars' => array(
3479 3479
                 '0' => 'node',
3480 3480
                 '1' => 'node_unchanged',
3481
-              ),
3482
-              '#eval input' => array(
3481
+                ),
3482
+                '#eval input' => array(
3483 3483
                 'token_rules_input_evaluator' => array(
3484
-                  'code' => array(
3484
+                    'code' => array(
3485 3485
                     '0' => ':global',
3486
-                  ),
3486
+                    ),
3487
+                ),
3487 3488
                 ),
3488
-              ),
3489 3489
             ),
3490 3490
             '#type' => 'condition',
3491
-          ),
3492
-          '4' => array(
3491
+            ),
3492
+            '4' => array(
3493 3493
             '#weight' => 0.0,
3494 3494
             '#info' => array(
3495
-              'label' => 'PHP code: node made sticky',
3496
-              'label callback' => FALSE,
3497
-              'module' => 'PHP',
3498
-              'eval input' => array(
3495
+                'label' => 'PHP code: node made sticky',
3496
+                'label callback' => FALSE,
3497
+                'module' => 'PHP',
3498
+                'eval input' => array(
3499 3499
                 '0' => 'code',
3500
-              ),
3500
+                ),
3501 3501
             ),
3502 3502
             '#name' => 'rules_condition_custom_php',
3503 3503
             '#type' => 'condition',
3504 3504
             '#settings' => array(
3505
-              'code' => 'return $node_unchanged->sticky == 1 && $node->sticky == 0;',
3506
-              'vars' => array(
3505
+                'code' => 'return $node_unchanged->sticky == 1 && $node->sticky == 0;',
3506
+                'vars' => array(
3507 3507
                 '0' => 'node',
3508 3508
                 '1' => 'node_unchanged',
3509
-              ),
3510
-              '#eval input' => array(
3509
+                ),
3510
+                '#eval input' => array(
3511 3511
                 'token_rules_input_evaluator' => array(
3512
-                  'code' => array(
3512
+                    'code' => array(
3513 3513
                     '0' => ':global',
3514
-                  ),
3514
+                    ),
3515
+                ),
3515 3516
                 ),
3516
-              ),
3517 3517
             ),
3518
-          ),
3518
+            ),
3519 3519
         ),
3520 3520
         '#actions' => array(
3521
-          '0' => array(
3521
+            '0' => array(
3522 3522
             '#info' => array(
3523
-              'label' => 'Notify moderators via email',
3524
-              'module' => 'BOINC core',
3525
-              'eval input' => array(
3523
+                'label' => 'Notify moderators via email',
3524
+                'module' => 'BOINC core',
3525
+                'eval input' => array(
3526 3526
                 '0' => 'subject',
3527 3527
                 '1' => 'message',
3528 3528
                 '2' => 'from',
3529
-              ),
3529
+                ),
3530 3530
             ),
3531 3531
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3532 3532
             '#settings' => array(
3533
-              'from' => '',
3534
-              'subject' => 'Forum topic at [:global:site-name] marked unsticky by moderator/admin',
3535
-              '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')); ?>",
3536
-              '#eval input' => array(
3533
+                'from' => '',
3534
+                'subject' => 'Forum topic at [:global:site-name] marked unsticky by moderator/admin',
3535
+                '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')); ?>",
3536
+                '#eval input' => array(
3537 3537
                 'token_rules_input_evaluator' => array(
3538
-                  'subject' => array(
3538
+                    'subject' => array(
3539 3539
                     '0' => ':global',
3540
-                  ),
3541
-                  'message' => array(
3540
+                    ),
3541
+                    'message' => array(
3542 3542
                     '0' => 'node',
3543 3543
                     '1' => 'user',
3544 3544
                     '2' => ':global',
3545
-                  ),
3546
-                  'from' => array(
3545
+                    ),
3546
+                    'from' => array(
3547 3547
                     '0' => ':global',
3548
-                  ),
3548
+                    ),
3549 3549
                 ),
3550 3550
                 'rules_input_evaluator_php' => array(
3551
-                  'message' => array(
3551
+                    'message' => array(
3552 3552
                     '0' => 'node',
3553
-                  ),
3553
+                    ),
3554
+                ),
3554 3555
                 ),
3555
-              ),
3556 3556
             ),
3557 3557
             '#type' => 'action',
3558 3558
             '#weight' => 0.0,
3559
-          ),
3559
+            ),
3560 3560
         ),
3561 3561
         '#version' => 6003,
3562
-      ),
3563
-      'rules_forum_topic_nenamed_title_by_moderator_or_admin' => array(
3562
+        ),
3563
+        'rules_forum_topic_nenamed_title_by_moderator_or_admin' => array(
3564 3564
         '#type' => 'rule',
3565 3565
         '#set' => 'event_node_update',
3566 3566
         '#label' => 'Forum topic renamed title by moderator or admin',
3567 3567
         '#active' => 1,
3568 3568
         '#weight' => '0',
3569 3569
         '#categories' => array(
3570
-          '0' => 'boinc_standard',
3571
-          '1' => 'moderator notification',
3570
+            '0' => 'boinc_standard',
3571
+            '1' => 'moderator notification',
3572 3572
         ),
3573 3573
         '#status' => 'default',
3574 3574
         '#conditions' => array(
3575
-          '0' => array(
3575
+            '0' => array(
3576 3576
             '#weight' => 0.0,
3577 3577
             '#type' => 'condition',
3578 3578
             '#settings' => array(
3579
-              'roles' => array(
3579
+                'roles' => array(
3580 3580
                 '0' => 3519698132,
3581 3581
                 '1' => 1271379760,
3582
-              ),
3583
-              'operation' => 'OR',
3584
-              '#argument map' => array(
3582
+                ),
3583
+                'operation' => 'OR',
3584
+                '#argument map' => array(
3585 3585
                 'user' => 'user',
3586
-              ),
3586
+                ),
3587 3587
             ),
3588 3588
             '#name' => 'rules_condition_user_hasrole',
3589 3589
             '#info' => array(
3590
-              'label' => 'User has role(s): administrator or moderator',
3591
-              'label callback' => FALSE,
3592
-              'arguments' => array(
3590
+                'label' => 'User has role(s): administrator or moderator',
3591
+                'label callback' => FALSE,
3592
+                'arguments' => array(
3593 3593
                 'user' => array(
3594
-                  'type' => 'user',
3595
-                  'label' => 'User',
3594
+                    'type' => 'user',
3595
+                    'label' => 'User',
3596
+                ),
3596 3597
                 ),
3597
-              ),
3598
-              'module' => 'User',
3598
+                'module' => 'User',
3599
+            ),
3599 3600
             ),
3600
-          ),
3601
-          '1' => array(
3601
+            '1' => array(
3602 3602
             '#weight' => 0.0,
3603 3603
             '0' => array(
3604
-              '#weight' => 0.0,
3605
-              '#info' => array(
3604
+                '#weight' => 0.0,
3605
+                '#info' => array(
3606 3606
                 'label' => 'Updated content is Forum topic',
3607 3607
                 'arguments' => array(
3608
-                  'node' => array(
3608
+                    'node' => array(
3609 3609
                     'type' => 'node',
3610 3610
                     'label' => 'Content',
3611
-                  ),
3611
+                    ),
3612 3612
                 ),
3613 3613
                 'module' => 'Node',
3614
-              ),
3615
-              '#name' => 'rules_condition_content_is_type',
3616
-              '#settings' => array(
3614
+                ),
3615
+                '#name' => 'rules_condition_content_is_type',
3616
+                '#settings' => array(
3617 3617
                 'type' => array(
3618
-                  'forum' => 'forum',
3618
+                    'forum' => 'forum',
3619 3619
                 ),
3620 3620
                 '#argument map' => array(
3621
-                  'node' => 'node',
3621
+                    'node' => 'node',
3622
+                ),
3622 3623
                 ),
3623
-              ),
3624
-              '#type' => 'condition',
3624
+                '#type' => 'condition',
3625 3625
             ),
3626 3626
             '#type' => 'OR',
3627 3627
             '1' => array(
3628
-              '#type' => 'condition',
3629
-              '#settings' => array(
3628
+                '#type' => 'condition',
3629
+                '#settings' => array(
3630 3630
                 'type' => array(
3631
-                  'team_forum' => 'team_forum',
3631
+                    'team_forum' => 'team_forum',
3632 3632
                 ),
3633 3633
                 '#argument map' => array(
3634
-                  'node' => 'node',
3634
+                    'node' => 'node',
3635 3635
                 ),
3636
-              ),
3637
-              '#name' => 'rules_condition_content_is_type',
3638
-              '#info' => array(
3636
+                ),
3637
+                '#name' => 'rules_condition_content_is_type',
3638
+                '#info' => array(
3639 3639
                 'label' => 'Updated content is Team forum topic',
3640 3640
                 'arguments' => array(
3641
-                  'node' => array(
3641
+                    'node' => array(
3642 3642
                     'type' => 'node',
3643 3643
                     'label' => 'Content',
3644
-                  ),
3644
+                    ),
3645 3645
                 ),
3646 3646
                 'module' => 'Node',
3647
-              ),
3648
-              '#weight' => 0.0,
3647
+                ),
3648
+                '#weight' => 0.0,
3649 3649
             ),
3650
-          ),
3651
-          '2' => array(
3650
+            ),
3651
+            '2' => array(
3652 3652
             '#weight' => 0.0,
3653 3653
             '#info' => array(
3654
-              'label' => 'PHP code: title changed',
3655
-              'label callback' => FALSE,
3656
-              'module' => 'PHP',
3657
-              'eval input' => array(
3654
+                'label' => 'PHP code: title changed',
3655
+                'label callback' => FALSE,
3656
+                'module' => 'PHP',
3657
+                'eval input' => array(
3658 3658
                 '0' => 'code',
3659
-              ),
3659
+                ),
3660 3660
             ),
3661 3661
             '#name' => 'rules_condition_custom_php',
3662 3662
             '#settings' => array(
3663
-              'code' => 'return ($node->title != $node_unchanged->title);',
3664
-              'vars' => array(
3663
+                'code' => 'return ($node->title != $node_unchanged->title);',
3664
+                'vars' => array(
3665 3665
                 '0' => 'node',
3666 3666
                 '1' => 'node_unchanged',
3667
-              ),
3668
-              '#eval input' => array(
3667
+                ),
3668
+                '#eval input' => array(
3669 3669
                 'token_rules_input_evaluator' => array(
3670
-                  'code' => array(
3670
+                    'code' => array(
3671 3671
                     '0' => ':global',
3672
-                  ),
3672
+                    ),
3673
+                ),
3673 3674
                 ),
3674
-              ),
3675 3675
             ),
3676 3676
             '#type' => 'condition',
3677
-          ),
3677
+            ),
3678 3678
         ),
3679 3679
         '#actions' => array(
3680
-          '0' => array(
3680
+            '0' => array(
3681 3681
             '#type' => 'action',
3682 3682
             '#settings' => array(
3683
-              'from' => '',
3684
-              'subject' => 'Forum topic at [:global:site-name] renamed by moderator/admin',
3685
-              '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')); ?>",
3686
-              '#eval input' => array(
3683
+                'from' => '',
3684
+                'subject' => 'Forum topic at [:global:site-name] renamed by moderator/admin',
3685
+                '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')); ?>",
3686
+                '#eval input' => array(
3687 3687
                 'token_rules_input_evaluator' => array(
3688
-                  'subject' => array(
3688
+                    'subject' => array(
3689 3689
                     '0' => ':global',
3690
-                  ),
3691
-                  'message' => array(
3690
+                    ),
3691
+                    'message' => array(
3692 3692
                     '0' => 'node',
3693 3693
                     '1' => 'user',
3694 3694
                     '2' => ':global',
3695
-                  ),
3696
-                  'from' => array(
3695
+                    ),
3696
+                    'from' => array(
3697 3697
                     '0' => ':global',
3698
-                  ),
3698
+                    ),
3699 3699
                 ),
3700 3700
                 'rules_input_evaluator_php' => array(
3701
-                  'message' => array(
3701
+                    'message' => array(
3702 3702
                     '0' => 'node',
3703
-                  ),
3703
+                    ),
3704
+                ),
3704 3705
                 ),
3705
-              ),
3706 3706
             ),
3707 3707
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3708 3708
             '#info' => array(
3709
-              'label' => 'Notify moderators via email',
3710
-              'module' => 'BOINC core',
3711
-              'eval input' => array(
3709
+                'label' => 'Notify moderators via email',
3710
+                'module' => 'BOINC core',
3711
+                'eval input' => array(
3712 3712
                 '0' => 'subject',
3713 3713
                 '1' => 'message',
3714 3714
                 '2' => 'from',
3715
-              ),
3715
+                ),
3716 3716
             ),
3717 3717
             '#weight' => 0.0,
3718
-          ),
3718
+            ),
3719 3719
         ),
3720 3720
         '#version' => 6003,
3721
-      ),
3722
-      'rules_forum_topic_unlocked_by_moderator_admin' => array(
3721
+        ),
3722
+        'rules_forum_topic_unlocked_by_moderator_admin' => array(
3723 3723
         '#type' => 'rule',
3724 3724
         '#set' => 'event_node_update',
3725 3725
         '#label' => 'Forum topic unlocked by moderator/admin',
3726 3726
         '#active' => 1,
3727 3727
         '#weight' => '0',
3728 3728
         '#categories' => array(
3729
-          '0' => 'boinc_standard',
3730
-          '1' => 'moderator notification',
3729
+            '0' => 'boinc_standard',
3730
+            '1' => 'moderator notification',
3731 3731
         ),
3732 3732
         '#status' => 'default',
3733 3733
         '#conditions' => array(
3734
-          '0' => array(
3734
+            '0' => array(
3735 3735
             '#type' => 'condition',
3736 3736
             '#settings' => array(
3737
-              'roles' => array(
3737
+                'roles' => array(
3738 3738
                 '0' => 3519698132,
3739 3739
                 '1' => 1271379760,
3740
-              ),
3741
-              'operation' => 'OR',
3742
-              '#argument map' => array(
3740
+                ),
3741
+                'operation' => 'OR',
3742
+                '#argument map' => array(
3743 3743
                 'user' => 'user',
3744
-              ),
3744
+                ),
3745 3745
             ),
3746 3746
             '#name' => 'rules_condition_user_hasrole',
3747 3747
             '#info' => array(
3748
-              'label' => 'User has role(s): administrator or moderator',
3749
-              'label callback' => FALSE,
3750
-              'arguments' => array(
3748
+                'label' => 'User has role(s): administrator or moderator',
3749
+                'label callback' => FALSE,
3750
+                'arguments' => array(
3751 3751
                 'user' => array(
3752
-                  'type' => 'user',
3753
-                  'label' => 'User',
3752
+                    'type' => 'user',
3753
+                    'label' => 'User',
3754
+                ),
3754 3755
                 ),
3755
-              ),
3756
-              'module' => 'User',
3756
+                'module' => 'User',
3757 3757
             ),
3758 3758
             '#weight' => 0.0,
3759
-          ),
3760
-          '1' => array(
3759
+            ),
3760
+            '1' => array(
3761 3761
             '#weight' => 0.0,
3762 3762
             '0' => array(
3763
-              '#weight' => 0.0,
3764
-              '#type' => 'condition',
3765
-              '#settings' => array(
3763
+                '#weight' => 0.0,
3764
+                '#type' => 'condition',
3765
+                '#settings' => array(
3766 3766
                 'type' => array(
3767
-                  'forum' => 'forum',
3767
+                    'forum' => 'forum',
3768 3768
                 ),
3769 3769
                 '#argument map' => array(
3770
-                  'node' => 'node',
3770
+                    'node' => 'node',
3771
+                ),
3771 3772
                 ),
3772
-              ),
3773
-              '#name' => 'rules_condition_content_is_type',
3774
-              '#info' => array(
3773
+                '#name' => 'rules_condition_content_is_type',
3774
+                '#info' => array(
3775 3775
                 'label' => 'Updated content is Forum topic',
3776 3776
                 'arguments' => array(
3777
-                  'node' => array(
3777
+                    'node' => array(
3778 3778
                     'type' => 'node',
3779 3779
                     'label' => 'Content',
3780
-                  ),
3780
+                    ),
3781 3781
                 ),
3782 3782
                 'module' => 'Node',
3783
-              ),
3783
+                ),
3784 3784
             ),
3785 3785
             '#type' => 'OR',
3786 3786
             '1' => array(
3787
-              '#type' => 'condition',
3788
-              '#settings' => array(
3787
+                '#type' => 'condition',
3788
+                '#settings' => array(
3789 3789
                 'type' => array(
3790
-                  'team_forum' => 'team_forum',
3790
+                    'team_forum' => 'team_forum',
3791 3791
                 ),
3792 3792
                 '#argument map' => array(
3793
-                  'node' => 'node',
3793
+                    'node' => 'node',
3794
+                ),
3794 3795
                 ),
3795
-              ),
3796
-              '#name' => 'rules_condition_content_is_type',
3797
-              '#info' => array(
3796
+                '#name' => 'rules_condition_content_is_type',
3797
+                '#info' => array(
3798 3798
                 'label' => 'Updated content is Team forum topic',
3799 3799
                 'arguments' => array(
3800
-                  'node' => array(
3800
+                    'node' => array(
3801 3801
                     'type' => 'node',
3802 3802
                     'label' => 'Content',
3803
-                  ),
3803
+                    ),
3804 3804
                 ),
3805 3805
                 'module' => 'Node',
3806
-              ),
3807
-              '#weight' => 0.0,
3806
+                ),
3807
+                '#weight' => 0.0,
3808 3808
             ),
3809
-          ),
3810
-          '3' => array(
3809
+            ),
3810
+            '3' => array(
3811 3811
             '#weight' => 0.0,
3812 3812
             '#info' => array(
3813
-              'label' => 'PHP code: node content unchanged',
3814
-              'label callback' => FALSE,
3815
-              'module' => 'PHP',
3816
-              'eval input' => array(
3813
+                'label' => 'PHP code: node content unchanged',
3814
+                'label callback' => FALSE,
3815
+                'module' => 'PHP',
3816
+                'eval input' => array(
3817 3817
                 '0' => 'code',
3818
-              ),
3818
+                ),
3819 3819
             ),
3820 3820
             '#name' => 'rules_condition_custom_php',
3821 3821
             '#settings' => array(
3822
-              'code' => 'return $node->body == $node_unchanged->body;',
3823
-              'vars' => array(
3822
+                'code' => 'return $node->body == $node_unchanged->body;',
3823
+                'vars' => array(
3824 3824
                 '0' => 'node',
3825 3825
                 '1' => 'node_unchanged',
3826
-              ),
3827
-              '#eval input' => array(
3826
+                ),
3827
+                '#eval input' => array(
3828 3828
                 'token_rules_input_evaluator' => array(
3829
-                  'code' => array(
3829
+                    'code' => array(
3830 3830
                     '0' => ':global',
3831
-                  ),
3831
+                    ),
3832
+                ),
3832 3833
                 ),
3833
-              ),
3834 3834
             ),
3835 3835
             '#type' => 'condition',
3836
-          ),
3837
-          '4' => array(
3836
+            ),
3837
+            '4' => array(
3838 3838
             '#weight' => 0.0,
3839 3839
             '#info' => array(
3840
-              'label' => 'PHP code: node unlocked',
3841
-              'label callback' => FALSE,
3842
-              'module' => 'PHP',
3843
-              'eval input' => array(
3840
+                'label' => 'PHP code: node unlocked',
3841
+                'label callback' => FALSE,
3842
+                'module' => 'PHP',
3843
+                'eval input' => array(
3844 3844
                 '0' => 'code',
3845
-              ),
3845
+                ),
3846 3846
             ),
3847 3847
             '#name' => 'rules_condition_custom_php',
3848 3848
             '#type' => 'condition',
3849 3849
             '#settings' => array(
3850
-              'code' => 'return $node_unchanged->comment == 1 && $node->comment == 2;',
3851
-              'vars' => array(
3850
+                'code' => 'return $node_unchanged->comment == 1 && $node->comment == 2;',
3851
+                'vars' => array(
3852 3852
                 '0' => 'node',
3853 3853
                 '1' => 'node_unchanged',
3854
-              ),
3855
-              '#eval input' => array(
3854
+                ),
3855
+                '#eval input' => array(
3856 3856
                 'token_rules_input_evaluator' => array(
3857
-                  'code' => array(
3857
+                    'code' => array(
3858 3858
                     '0' => ':global',
3859
-                  ),
3859
+                    ),
3860 3860
                 ),
3861
-              ),
3861
+                ),
3862
+            ),
3862 3863
             ),
3863
-          ),
3864 3864
         ),
3865 3865
         '#actions' => array(
3866
-          '0' => array(
3866
+            '0' => array(
3867 3867
             '#info' => array(
3868
-              'label' => 'Notify moderators via email',
3869
-              'module' => 'BOINC core',
3870
-              'eval input' => array(
3868
+                'label' => 'Notify moderators via email',
3869
+                'module' => 'BOINC core',
3870
+                'eval input' => array(
3871 3871
                 '0' => 'subject',
3872 3872
                 '1' => 'message',
3873 3873
                 '2' => 'from',
3874
-              ),
3874
+                ),
3875 3875
             ),
3876 3876
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3877 3877
             '#settings' => array(
3878
-              'from' => '',
3879
-              'subject' => 'Forum topic at [:global:site-name] unlocked by moderator/admin',
3880
-              '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')); ?>",
3881
-              '#eval input' => array(
3878
+                'from' => '',
3879
+                'subject' => 'Forum topic at [:global:site-name] unlocked by moderator/admin',
3880
+                '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')); ?>",
3881
+                '#eval input' => array(
3882 3882
                 'token_rules_input_evaluator' => array(
3883
-                  'subject' => array(
3883
+                    'subject' => array(
3884 3884
                     '0' => ':global',
3885
-                  ),
3886
-                  'message' => array(
3885
+                    ),
3886
+                    'message' => array(
3887 3887
                     '0' => 'node',
3888 3888
                     '1' => 'user',
3889 3889
                     '2' => ':global',
3890
-                  ),
3891
-                  'from' => array(
3890
+                    ),
3891
+                    'from' => array(
3892 3892
                     '0' => ':global',
3893
-                  ),
3893
+                    ),
3894 3894
                 ),
3895 3895
                 'rules_input_evaluator_php' => array(
3896
-                  'message' => array(
3896
+                    'message' => array(
3897 3897
                     '0' => 'node',
3898
-                  ),
3898
+                    ),
3899
+                ),
3899 3900
                 ),
3900
-              ),
3901 3901
             ),
3902 3902
             '#type' => 'action',
3903 3903
             '#weight' => 0.0,
3904
-          ),
3904
+            ),
3905 3905
         ),
3906 3906
         '#version' => 6003,
3907
-      ),
3908
-      'rules_offensive_comment_reported' => array(
3907
+        ),
3908
+        'rules_offensive_comment_reported' => array(
3909 3909
         '#type' => 'rule',
3910 3910
         '#set' => 'event_flag_flagged_abuse_comment',
3911 3911
         '#label' => 'Offensive comment reported',
3912 3912
         '#active' => 1,
3913 3913
         '#weight' => '0',
3914 3914
         '#categories' => array(
3915
-          '0' => 'moderator notification',
3916
-          '1' => 'boinc_standard',
3915
+            '0' => 'moderator notification',
3916
+            '1' => 'boinc_standard',
3917 3917
         ),
3918 3918
         '#status' => 'default',
3919 3919
         '#conditions' => array(),
3920 3920
         '#actions' => array(
3921
-          '1' => array(
3921
+            '1' => array(
3922 3922
             '#info' => array(
3923
-              'label' => 'Notify moderators via email',
3924
-              'module' => 'BOINC core',
3925
-              'eval input' => array(
3923
+                'label' => 'Notify moderators via email',
3924
+                'module' => 'BOINC core',
3925
+                'eval input' => array(
3926 3926
                 '0' => 'subject',
3927 3927
                 '1' => 'message',
3928 3928
                 '2' => 'from',
3929
-              ),
3929
+                ),
3930 3930
             ),
3931 3931
             '#name' => 'boinccore_rules_action_mail_to_moderators',
3932 3932
             '#settings' => array(
3933
-              'from' => '',
3934
-              'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
3935
-              '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]",
3936
-              '#eval input' => array(
3933
+                'from' => '',
3934
+                'subject' => 'Report of offensive [node:type] comment at [:global:site-name]',
3935
+                '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]",
3936
+                '#eval input' => array(
3937 3937
                 'token_rules_input_evaluator' => array(
3938
-                  'subject' => array(
3938
+                    'subject' => array(
3939 3939
                     '0' => 'node',
3940 3940
                     '1' => ':global',
3941
-                  ),
3942
-                  'message' => array(
3941
+                    ),
3942
+                    'message' => array(
3943 3943
                     '0' => 'flagging_user',
3944 3944
                     '1' => 'comment',
3945 3945
                     '2' => 'node',
3946 3946
                     '3' => ':global',
3947
-                  ),
3948
-                  'from' => array(
3947
+                    ),
3948
+                    'from' => array(
3949 3949
                     '0' => ':global',
3950
-                  ),
3950
+                    ),
3951 3951
                 ),
3952 3952
                 'rules_input_evaluator_php' => array(
3953
-                  'message' => array(),
3953
+                    'message' => array(),
3954
+                ),
3954 3955
                 ),
3955
-              ),
3956 3956
             ),
3957 3957
             '#type' => 'action',
3958 3958
             '#weight' => 0.0,
3959
-          ),
3959
+            ),
3960 3960
         ),
3961 3961
         '#version' => 6003,
3962
-      ),
3963
-      'rules_offensive_content_reported' => array(
3962
+        ),
3963
+        'rules_offensive_content_reported' => array(
3964 3964
         '#type' => 'rule',
3965 3965
         '#set' => 'event_flag_flagged_abuse_node',
3966 3966
         '#label' => 'Offensive content reported',
3967 3967
         '#active' => 1,
3968 3968
         '#weight' => '0',
3969 3969
         '#categories' => array(
3970
-          '0' => 'moderator notification',
3971
-          'boinc_standard' => 'boinc_standard',
3970
+            '0' => 'moderator notification',
3971
+            'boinc_standard' => 'boinc_standard',
3972 3972
         ),
3973 3973
         '#status' => 'default',
3974 3974
         '#conditions' => array(),
3975 3975
         '#actions' => array(
3976
-          '1' => array(
3976
+            '1' => array(
3977 3977
             '#type' => 'action',
3978 3978
             '#settings' => array(
3979
-              'from' => '',
3980
-              'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
3981
-              '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]",
3982
-              '#eval input' => array(
3979
+                'from' => '',
3980
+                'subject' => 'Report of offensive [node:type] content at [:global:site-name]',
3981
+                '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]",
3982
+                '#eval input' => array(
3983 3983
                 'token_rules_input_evaluator' => array(
3984
-                  'subject' => array(
3984
+                    'subject' => array(
3985 3985
                     '0' => 'node',
3986 3986
                     '1' => ':global',
3987
-                  ),
3988
-                  'message' => array(
3987
+                    ),
3988
+                    'message' => array(
3989 3989
                     '0' => 'flagging_user',
3990 3990
                     '1' => 'node',
3991 3991
                     '2' => ':global',
3992
-                  ),
3993
-                  'from' => array(
3992
+                    ),
3993
+                    'from' => array(
3994 3994
                     '0' => ':global',
3995
-                  ),
3995
+                    ),
3996 3996
                 ),
3997 3997
                 'rules_input_evaluator_php' => array(
3998
-                  'message' => array(
3998
+                    'message' => array(
3999 3999
                     '0' => 'node',
4000
-                  ),
4000
+                    ),
4001
+                ),
4001 4002
                 ),
4002
-              ),
4003 4003
             ),
4004 4004
             '#name' => 'boinccore_rules_action_mail_to_moderators',
4005 4005
             '#info' => array(
4006
-              'label' => 'Notify moderators via email',
4007
-              'module' => 'BOINC core',
4008
-              'eval input' => array(
4006
+                'label' => 'Notify moderators via email',
4007
+                'module' => 'BOINC core',
4008
+                'eval input' => array(
4009 4009
                 '0' => 'subject',
4010 4010
                 '1' => 'message',
4011 4011
                 '2' => 'from',
4012
-              ),
4012
+                ),
4013 4013
             ),
4014 4014
             '#weight' => 0.0,
4015
-          ),
4015
+            ),
4016 4016
         ),
4017 4017
         '#version' => 6003,
4018
-      ),
4019
-      'rules_offensive_user_reported' => array(
4018
+        ),
4019
+        'rules_offensive_user_reported' => array(
4020 4020
         '#type' => 'rule',
4021 4021
         '#set' => 'event_flag_flagged_abuse_user',
4022 4022
         '#label' => 'Offensive user reported',
4023 4023
         '#active' => 1,
4024 4024
         '#weight' => '0',
4025 4025
         '#categories' => array(
4026
-          '0' => 'moderator notification',
4027
-          'boinc_standard' => 'boinc_standard',
4026
+            '0' => 'moderator notification',
4027
+            'boinc_standard' => 'boinc_standard',
4028 4028
         ),
4029 4029
         '#status' => 'default',
4030 4030
         '#conditions' => array(),
4031 4031
         '#actions' => array(
4032
-          '1' => array(
4032
+            '1' => array(
4033 4033
             '#type' => 'action',
4034 4034
             '#settings' => array(
4035
-              'from' => '',
4036
-              'subject' => 'Report of offensive user at [:global:site-name]',
4037
-              '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]",
4038
-              '#eval input' => array(
4035
+                'from' => '',
4036
+                'subject' => 'Report of offensive user at [:global:site-name]',
4037
+                '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]",
4038
+                '#eval input' => array(
4039 4039
                 'token_rules_input_evaluator' => array(
4040
-                  'subject' => array(
4040
+                    'subject' => array(
4041 4041
                     '0' => ':global',
4042
-                  ),
4043
-                  'message' => array(
4042
+                    ),
4043
+                    'message' => array(
4044 4044
                     '0' => 'flagging_user',
4045 4045
                     '1' => 'account',
4046 4046
                     '2' => ':global',
4047
-                  ),
4048
-                  'from' => array(
4047
+                    ),
4048
+                    'from' => array(
4049 4049
                     '0' => ':global',
4050
-                  ),
4050
+                    ),
4051 4051
                 ),
4052 4052
                 'rules_input_evaluator_php' => array(
4053
-                  'message' => array(),
4053
+                    'message' => array(),
4054
+                ),
4054 4055
                 ),
4055
-              ),
4056 4056
             ),
4057 4057
             '#name' => 'boinccore_rules_action_mail_to_moderators',
4058 4058
             '#info' => array(
4059
-              'label' => 'Notify moderators via email',
4060
-              'module' => 'BOINC core',
4061
-              'eval input' => array(
4059
+                'label' => 'Notify moderators via email',
4060
+                'module' => 'BOINC core',
4061
+                'eval input' => array(
4062 4062
                 '0' => 'subject',
4063 4063
                 '1' => 'message',
4064 4064
                 '2' => 'from',
4065
-              ),
4065
+                ),
4066 4066
             ),
4067 4067
             '#weight' => 0.0,
4068
-          ),
4068
+            ),
4069 4069
         ),
4070 4070
         '#version' => 6003,
4071
-      ),
4071
+        ),
4072 4072
     ),
4073
-  );
4073
+    );
4074 4074
 }
4075 4075
 
4076 4076
 /**
4077 4077
  * Implementation of hook_views_api().
4078 4078
  */
4079 4079
 function boinc_standard_views_api() {
4080
-  return array(
4080
+    return array(
4081 4081
     'api' => '2',
4082
-  );
4082
+    );
4083 4083
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.pages_default.inc 1 patch
Indentation   +327 added lines, -327 removed lines patch added patch discarded remove patch
@@ -4,113 +4,113 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_default_page_manager_pages().
5 5
  */
6 6
 function boinc_standard_default_page_manager_pages() {
7
-  $page = new stdClass;
8
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
9
-  $page->api_version = 1;
10
-  $page->name = 'about_us';
11
-  $page->task = 'page';
12
-  $page->admin_title = 'About Us';
13
-  $page->admin_description = '';
14
-  $page->path = 'about.fail';
15
-  $page->access = array(
7
+    $page = new stdClass;
8
+    $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
9
+    $page->api_version = 1;
10
+    $page->name = 'about_us';
11
+    $page->task = 'page';
12
+    $page->admin_title = 'About Us';
13
+    $page->admin_description = '';
14
+    $page->path = 'about.fail';
15
+    $page->access = array(
16 16
     'type' => 'none',
17 17
     'settings' => NULL,
18
-  );
19
-  $page->menu = array();
20
-  $page->arguments = array();
21
-  $page->conf = array();
22
-  $page->default_handlers = array();
23
-  $pages['about_us'] = $page;
18
+    );
19
+    $page->menu = array();
20
+    $page->arguments = array();
21
+    $page->conf = array();
22
+    $page->default_handlers = array();
23
+    $pages['about_us'] = $page;
24 24
 
25
-  $page = new stdClass;
26
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
27
-  $page->api_version = 1;
28
-  $page->name = 'account_dashboard';
29
-  $page->task = 'page';
30
-  $page->admin_title = 'Dashboard';
31
-  $page->admin_description = '';
32
-  $page->path = 'dashboard';
33
-  $page->access = array(
25
+    $page = new stdClass;
26
+    $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
27
+    $page->api_version = 1;
28
+    $page->name = 'account_dashboard';
29
+    $page->task = 'page';
30
+    $page->admin_title = 'Dashboard';
31
+    $page->admin_description = '';
32
+    $page->path = 'dashboard';
33
+    $page->access = array(
34 34
     'plugins' => array(
35
-      1 => array(
35
+        1 => array(
36 36
         'name' => 'role',
37 37
         'settings' => array(
38
-          'rids' => array(
38
+            'rids' => array(
39 39
             0 => 2,
40
-          ),
40
+            ),
41 41
         ),
42 42
         'context' => 'logged-in-user',
43 43
         'not' => FALSE,
44
-      ),
44
+        ),
45 45
     ),
46 46
     'logic' => 'and',
47 47
     'type' => 'none',
48 48
     'settings' => NULL,
49
-  );
50
-  $page->menu = array(
49
+    );
50
+    $page->menu = array(
51 51
     'type' => 'none',
52 52
     'title' => 'Dashboard',
53 53
     'name' => 'navigation',
54 54
     'weight' => '0',
55 55
     'parent' => array(
56
-      'type' => 'normal',
57
-      'title' => 'Account',
58
-      'name' => 'navigation',
59
-      'weight' => '0',
56
+        'type' => 'normal',
57
+        'title' => 'Account',
58
+        'name' => 'navigation',
59
+        'weight' => '0',
60 60
     ),
61
-  );
62
-  $page->arguments = array();
63
-  $page->conf = array();
64
-  $page->default_handlers = array();
65
-  $handler = new stdClass;
66
-  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
67
-  $handler->api_version = 1;
68
-  $handler->name = 'page_account_dashboard_panel_context';
69
-  $handler->task = 'page';
70
-  $handler->subtask = 'account_dashboard';
71
-  $handler->handler = 'panel_context';
72
-  $handler->weight = 0;
73
-  $handler->conf = array(
61
+    );
62
+    $page->arguments = array();
63
+    $page->conf = array();
64
+    $page->default_handlers = array();
65
+    $handler = new stdClass;
66
+    $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
67
+    $handler->api_version = 1;
68
+    $handler->name = 'page_account_dashboard_panel_context';
69
+    $handler->task = 'page';
70
+    $handler->subtask = 'account_dashboard';
71
+    $handler->handler = 'panel_context';
72
+    $handler->weight = 0;
73
+    $handler->conf = array(
74 74
     'title' => 'Landing page',
75 75
     'no_blocks' => FALSE,
76 76
     'pipeline' => 'ipe',
77 77
     'css_id' => '',
78 78
     'css' => '',
79 79
     'contexts' => array(
80
-      0 => array(
80
+        0 => array(
81 81
         'name' => 'user',
82 82
         'id' => 1,
83 83
         'identifier' => 'User',
84 84
         'keyword' => 'user',
85 85
         'context_settings' => array(
86
-          'type' => 'current',
87
-          'user' => '',
88
-          'uid' => '',
86
+            'type' => 'current',
87
+            'user' => '',
88
+            'uid' => '',
89
+        ),
89 90
         ),
90
-      ),
91 91
     ),
92 92
     'relationships' => array(),
93 93
     'access' => array(
94
-      'plugins' => array(),
95
-      'logic' => 'and',
94
+        'plugins' => array(),
95
+        'logic' => 'and',
96 96
     ),
97
-  );
98
-  $display = new panels_display;
99
-  $display->layout = 'one_sidebar_second';
100
-  $display->layout_settings = array();
101
-  $display->panel_settings = array(
97
+    );
98
+    $display = new panels_display;
99
+    $display->layout = 'one_sidebar_second';
100
+    $display->layout_settings = array();
101
+    $display->panel_settings = array(
102 102
     'style_settings' => array(
103
-      'default' => NULL,
104
-      'content' => NULL,
105
-      'sidebar_first' => NULL,
103
+        'default' => NULL,
104
+        'content' => NULL,
105
+        'sidebar_first' => NULL,
106 106
     ),
107
-  );
108
-  $display->cache = array();
109
-  $display->title = 'Dashboard';
110
-  $display->storage_type = 'page_manager';
111
-  $display->storage_id = 'page_account_dashboard_panel_context';
112
-  $display->content = array();
113
-  $display->panels = array();
107
+    );
108
+    $display->cache = array();
109
+    $display->title = 'Dashboard';
110
+    $display->storage_type = 'page_manager';
111
+    $display->storage_id = 'page_account_dashboard_panel_context';
112
+    $display->content = array();
113
+    $display->panels = array();
114 114
     $pane = new stdClass;
115 115
     $pane->pid = 'new-1';
116 116
     $pane->panel = 'content';
@@ -119,16 +119,16 @@  discard block
 block discarded – undo
119 119
     $pane->shown = TRUE;
120 120
     $pane->access = array();
121 121
     $pane->configuration = array(
122
-      'override_title' => 1,
123
-      'override_title_text' => 'My stats',
122
+        'override_title' => 1,
123
+        'override_title_text' => 'My stats',
124 124
     );
125 125
     $pane->cache = array();
126 126
     $pane->style = array(
127
-      'settings' => NULL,
127
+        'settings' => NULL,
128 128
     );
129 129
     $pane->css = array(
130
-      'css_id' => '',
131
-      'css_class' => 'panel-primary container shadow',
130
+        'css_id' => '',
131
+        'css_class' => 'panel-primary container shadow',
132 132
     );
133 133
     $pane->extras = array();
134 134
     $pane->position = 0;
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
     $pane->configuration = array();
145 145
     $pane->cache = array();
146 146
     $pane->style = array(
147
-      'settings' => NULL,
147
+        'settings' => NULL,
148 148
     );
149 149
     $pane->css = array(
150
-      'css_id' => '',
151
-      'css_class' => 'panel-primary container shadow',
150
+        'css_id' => '',
151
+        'css_class' => 'panel-primary container shadow',
152 152
     );
153 153
     $pane->extras = array();
154 154
     $pane->position = 1;
@@ -161,31 +161,31 @@  discard block
 block discarded – undo
161 161
     $pane->subtype = 'custom';
162 162
     $pane->shown = TRUE;
163 163
     $pane->access = array(
164
-      'plugins' => array(
164
+        'plugins' => array(
165 165
         1 => array(
166
-          'name' => 'perm',
167
-          'settings' => array(
166
+            'name' => 'perm',
167
+            'settings' => array(
168 168
             'perm' => 'edit any profile content',
169
-          ),
170
-          'context' => 'context_user_1',
171
-          'not' => FALSE,
169
+            ),
170
+            'context' => 'context_user_1',
171
+            'not' => FALSE,
172
+        ),
172 173
         ),
173
-      ),
174 174
     );
175 175
     $pane->configuration = array(
176
-      'admin_title' => 'Moderation overview',
177
-      'title' => '',
178
-      'body' => '<?php print boinccore_moderation_overview_panel(); ?>',
179
-      'format' => '3',
180
-      'substitute' => 1,
176
+        'admin_title' => 'Moderation overview',
177
+        'title' => '',
178
+        'body' => '<?php print boinccore_moderation_overview_panel(); ?>',
179
+        'format' => '3',
180
+        'substitute' => 1,
181 181
     );
182 182
     $pane->cache = array();
183 183
     $pane->style = array(
184
-      'settings' => NULL,
184
+        'settings' => NULL,
185 185
     );
186 186
     $pane->css = array(
187
-      'css_id' => '',
188
-      'css_class' => 'panel-secondary container shadow',
187
+        'css_id' => '',
188
+        'css_class' => 'panel-secondary container shadow',
189 189
     );
190 190
     $pane->extras = array();
191 191
     $pane->position = 0;
@@ -199,16 +199,16 @@  discard block
 block discarded – undo
199 199
     $pane->shown = TRUE;
200 200
     $pane->access = array();
201 201
     $pane->configuration = array(
202
-      'override_title' => 0,
203
-      'override_title_text' => '',
202
+        'override_title' => 0,
203
+        'override_title_text' => '',
204 204
     );
205 205
     $pane->cache = array();
206 206
     $pane->style = array(
207
-      'settings' => NULL,
207
+        'settings' => NULL,
208 208
     );
209 209
     $pane->css = array(
210
-      'css_id' => '',
211
-      'css_class' => 'panel-secondary container shadow',
210
+        'css_id' => '',
211
+        'css_class' => 'panel-secondary container shadow',
212 212
     );
213 213
     $pane->extras = array();
214 214
     $pane->position = 1;
@@ -222,23 +222,23 @@  discard block
 block discarded – undo
222 222
     $pane->shown = TRUE;
223 223
     $pane->access = array();
224 224
     $pane->configuration = array(
225
-      'admin_title' => 'Team summary',
226
-      'title' => '',
227
-      'body' => '<?php
225
+        'admin_title' => 'Team summary',
226
+        'title' => '',
227
+        'body' => '<?php
228 228
 if (module_exists(\'boincteam\')) {
229 229
   echo boincteam_dashboard_panel();
230 230
 }
231 231
 ?>',
232
-      'format' => '3',
233
-      'substitute' => 1,
232
+        'format' => '3',
233
+        'substitute' => 1,
234 234
     );
235 235
     $pane->cache = array();
236 236
     $pane->style = array(
237
-      'settings' => NULL,
237
+        'settings' => NULL,
238 238
     );
239 239
     $pane->css = array(
240
-      'css_id' => 'team-dashboard-pane',
241
-      'css_class' => 'panel-secondary container shadow',
240
+        'css_id' => 'team-dashboard-pane',
241
+        'css_class' => 'panel-secondary container shadow',
242 242
     );
243 243
     $pane->extras = array();
244 244
     $pane->position = 2;
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
     $pane->shown = TRUE;
253 253
     $pane->access = array();
254 254
     $pane->configuration = array(
255
-      'admin_title' => 'User activity summary',
256
-      'title' => '',
257
-      'body' => '<?php
255
+        'admin_title' => 'User activity summary',
256
+        'title' => '',
257
+        'body' => '<?php
258 258
 
259 259
 global $user;
260 260
 $uid = $user->uid;
@@ -263,16 +263,16 @@  discard block
 block discarded – undo
263 263
 echo \'<div class="item-count-wrapper"><div class="item-count">\' . $account->post_count . \'</div></div>\';
264 264
 
265 265
 ?>',
266
-      'format' => '3',
267
-      'substitute' => 1,
266
+        'format' => '3',
267
+        'substitute' => 1,
268 268
     );
269 269
     $pane->cache = array();
270 270
     $pane->style = array(
271
-      'settings' => NULL,
271
+        'settings' => NULL,
272 272
     );
273 273
     $pane->css = array(
274
-      'css_id' => '',
275
-      'css_class' => 'panel-secondary container shadow',
274
+        'css_id' => '',
275
+        'css_class' => 'panel-secondary container shadow',
276 276
     );
277 277
     $pane->extras = array();
278 278
     $pane->position = 3;
@@ -286,74 +286,74 @@  discard block
 block discarded – undo
286 286
     $pane->shown = TRUE;
287 287
     $pane->access = array();
288 288
     $pane->configuration = array(
289
-      'override_pager_settings' => 0,
290
-      'use_pager' => 0,
291
-      'nodes_per_page' => '6',
292
-      'pager_id' => '',
293
-      'offset' => '0',
294
-      'more_link' => 1,
295
-      'feed_icons' => 0,
296
-      'panel_args' => 0,
297
-      'link_to_view' => 0,
298
-      'args' => '',
299
-      'url' => '',
300
-      'display' => 'block_1',
301
-      'context' => array(
289
+        'override_pager_settings' => 0,
290
+        'use_pager' => 0,
291
+        'nodes_per_page' => '6',
292
+        'pager_id' => '',
293
+        'offset' => '0',
294
+        'more_link' => 1,
295
+        'feed_icons' => 0,
296
+        'panel_args' => 0,
297
+        'link_to_view' => 0,
298
+        'args' => '',
299
+        'url' => '',
300
+        'display' => 'block_1',
301
+        'context' => array(
302 302
         0 => 'context_user_1.uid',
303
-      ),
304
-      'override_title' => 0,
305
-      'override_title_text' => '',
303
+        ),
304
+        'override_title' => 0,
305
+        'override_title_text' => '',
306 306
     );
307 307
     $pane->cache = array();
308 308
     $pane->style = array(
309
-      'settings' => NULL,
309
+        'settings' => NULL,
310 310
     );
311 311
     $pane->css = array(
312
-      'css_id' => '',
313
-      'css_class' => 'panel-secondary container shadow',
312
+        'css_id' => '',
313
+        'css_class' => 'panel-secondary container shadow',
314 314
     );
315 315
     $pane->extras = array();
316 316
     $pane->position = 4;
317 317
     $display->content['new-7'] = $pane;
318 318
     $display->panels['sidebar_first'][4] = 'new-7';
319
-  $display->hide_title = PANELS_TITLE_FIXED;
320
-  $display->title_pane = 'new-1';
321
-  $handler->conf['display'] = $display;
322
-  $page->default_handlers[$handler->name] = $handler;
323
-  $pages['account_dashboard'] = $page;
319
+    $display->hide_title = PANELS_TITLE_FIXED;
320
+    $display->title_pane = 'new-1';
321
+    $handler->conf['display'] = $display;
322
+    $page->default_handlers[$handler->name] = $handler;
323
+    $pages['account_dashboard'] = $page;
324 324
 
325
-  $page = new stdClass;
326
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
327
-  $page->api_version = 1;
328
-  $page->name = 'boinc_user';
329
-  $page->task = 'page';
330
-  $page->admin_title = 'User profile template (boinc)';
331
-  $page->admin_description = '';
332
-  $page->path = 'account/%user';
333
-  $page->access = array(
325
+    $page = new stdClass;
326
+    $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
327
+    $page->api_version = 1;
328
+    $page->name = 'boinc_user';
329
+    $page->task = 'page';
330
+    $page->admin_title = 'User profile template (boinc)';
331
+    $page->admin_description = '';
332
+    $page->path = 'account/%user';
333
+    $page->access = array(
334 334
     'type' => 'none',
335 335
     'settings' => NULL,
336
-  );
337
-  $page->menu = array();
338
-  $page->arguments = array(
336
+    );
337
+    $page->menu = array();
338
+    $page->arguments = array(
339 339
     'user' => array(
340
-      'id' => 1,
341
-      'identifier' => 'User: ID',
342
-      'name' => 'uid',
343
-      'settings' => array(),
340
+        'id' => 1,
341
+        'identifier' => 'User: ID',
342
+        'name' => 'uid',
343
+        'settings' => array(),
344 344
     ),
345
-  );
346
-  $page->conf = array();
347
-  $page->default_handlers = array();
348
-  $handler = new stdClass;
349
-  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
350
-  $handler->api_version = 1;
351
-  $handler->name = 'page_boinc_user_panel_context_2';
352
-  $handler->task = 'page';
353
-  $handler->subtask = 'boinc_user';
354
-  $handler->handler = 'panel_context';
355
-  $handler->weight = 1;
356
-  $handler->conf = array(
345
+    );
346
+    $page->conf = array();
347
+    $page->default_handlers = array();
348
+    $handler = new stdClass;
349
+    $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
350
+    $handler->api_version = 1;
351
+    $handler->name = 'page_boinc_user_panel_context_2';
352
+    $handler->task = 'page';
353
+    $handler->subtask = 'boinc_user';
354
+    $handler->handler = 'panel_context';
355
+    $handler->weight = 1;
356
+    $handler->conf = array(
357 357
     'title' => 'Panel',
358 358
     'no_blocks' => 0,
359 359
     'pipeline' => 'standard',
@@ -362,37 +362,37 @@  discard block
 block discarded – undo
362 362
     'contexts' => array(),
363 363
     'relationships' => array(),
364 364
     'access' => array(
365
-      'plugins' => array(
365
+        'plugins' => array(
366 366
         0 => array(
367
-          'name' => 'php',
368
-          'settings' => array(
367
+            'name' => 'php',
368
+            'settings' => array(
369 369
             'description' => 'if user status then show profile',
370 370
             'php' => '$account = $contexts[\'argument_uid_1\']->data;
371 371
 return ($account->status);
372 372
 ',
373
-          ),
374
-          'not' => FALSE,
373
+            ),
374
+            'not' => FALSE,
375
+        ),
375 376
         ),
376
-      ),
377
-      'logic' => 'and',
377
+        'logic' => 'and',
378 378
     ),
379
-  );
380
-  $display = new panels_display;
381
-  $display->layout = 'one_sidebar_second';
382
-  $display->layout_settings = array();
383
-  $display->panel_settings = array(
379
+    );
380
+    $display = new panels_display;
381
+    $display->layout = 'one_sidebar_second';
382
+    $display->layout_settings = array();
383
+    $display->panel_settings = array(
384 384
     'style_settings' => array(
385
-      'default' => NULL,
386
-      'content' => NULL,
387
-      'sidebar_first' => NULL,
385
+        'default' => NULL,
386
+        'content' => NULL,
387
+        'sidebar_first' => NULL,
388 388
     ),
389
-  );
390
-  $display->cache = array();
391
-  $display->title = 'Account';
392
-  $display->storage_type = 'page_manager';
393
-  $display->storage_id = 'page_boinc_user_panel_context_2';
394
-  $display->content = array();
395
-  $display->panels = array();
389
+    );
390
+    $display->cache = array();
391
+    $display->title = 'Account';
392
+    $display->storage_type = 'page_manager';
393
+    $display->storage_id = 'page_boinc_user_panel_context_2';
394
+    $display->content = array();
395
+    $display->panels = array();
396 396
     $pane = new stdClass;
397 397
     $pane->pid = 'new-1';
398 398
     $pane->panel = 'content';
@@ -401,19 +401,19 @@  discard block
 block discarded – undo
401 401
     $pane->shown = TRUE;
402 402
     $pane->access = array();
403 403
     $pane->configuration = array(
404
-      'context' => array(
404
+        'context' => array(
405 405
         0 => 'argument_uid_1',
406
-      ),
407
-      'override_title' => 0,
408
-      'override_title_text' => '',
406
+        ),
407
+        'override_title' => 0,
408
+        'override_title_text' => '',
409 409
     );
410 410
     $pane->cache = array();
411 411
     $pane->style = array(
412
-      'settings' => NULL,
412
+        'settings' => NULL,
413 413
     );
414 414
     $pane->css = array(
415
-      'css_id' => '',
416
-      'css_class' => 'panel-primary container shadow',
415
+        'css_id' => '',
416
+        'css_class' => 'panel-primary container shadow',
417 417
     );
418 418
     $pane->extras = array();
419 419
     $pane->position = 0;
@@ -427,16 +427,16 @@  discard block
 block discarded – undo
427 427
     $pane->shown = TRUE;
428 428
     $pane->access = array();
429 429
     $pane->configuration = array(
430
-      'override_title' => 0,
431
-      'override_title_text' => '',
430
+        'override_title' => 0,
431
+        'override_title_text' => '',
432 432
     );
433 433
     $pane->cache = array();
434 434
     $pane->style = array(
435
-      'settings' => NULL,
435
+        'settings' => NULL,
436 436
     );
437 437
     $pane->css = array(
438
-      'css_id' => '',
439
-      'css_class' => 'panel-secondary container shadow',
438
+        'css_id' => '',
439
+        'css_class' => 'panel-secondary container shadow',
440 440
     );
441 441
     $pane->extras = array();
442 442
     $pane->position = 0;
@@ -450,23 +450,23 @@  discard block
 block discarded – undo
450 450
     $pane->shown = TRUE;
451 451
     $pane->access = array();
452 452
     $pane->configuration = array(
453
-      'admin_title' => 'Team summary',
454
-      'title' => '',
455
-      'body' => '<?php
453
+        'admin_title' => 'Team summary',
454
+        'title' => '',
455
+        'body' => '<?php
456 456
 if (module_exists(\'boincteam\')) {
457 457
   echo boincteam_dashboard_panel(%user:uid);
458 458
 }
459 459
 ?>',
460
-      'format' => '3',
461
-      'substitute' => 1,
460
+        'format' => '3',
461
+        'substitute' => 1,
462 462
     );
463 463
     $pane->cache = array();
464 464
     $pane->style = array(
465
-      'settings' => NULL,
465
+        'settings' => NULL,
466 466
     );
467 467
     $pane->css = array(
468
-      'css_id' => 'team-dashboard-pane',
469
-      'css_class' => 'panel-secondary container shadow',
468
+        'css_id' => 'team-dashboard-pane',
469
+        'css_class' => 'panel-secondary container shadow',
470 470
     );
471 471
     $pane->extras = array();
472 472
     $pane->position = 1;
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
     $pane->shown = TRUE;
481 481
     $pane->access = array();
482 482
     $pane->configuration = array(
483
-      'admin_title' => 'User activity summary',
484
-      'title' => '',
485
-      'body' => '<?php
483
+        'admin_title' => 'User activity summary',
484
+        'title' => '',
485
+        'body' => '<?php
486 486
 
487 487
 $uid = arg(1);
488 488
 $account = user_load($uid);
@@ -490,16 +490,16 @@  discard block
 block discarded – undo
490 490
 echo \'<div class="item-count-wrapper"><div class="item-count">\' . $account->post_count . \'</div></div>\';
491 491
 
492 492
 ?>',
493
-      'format' => '3',
494
-      'substitute' => 0,
493
+        'format' => '3',
494
+        'substitute' => 0,
495 495
     );
496 496
     $pane->cache = array();
497 497
     $pane->style = array(
498
-      'settings' => NULL,
498
+        'settings' => NULL,
499 499
     );
500 500
     $pane->css = array(
501
-      'css_id' => '',
502
-      'css_class' => 'panel-secondary container shadow',
501
+        'css_id' => '',
502
+        'css_class' => 'panel-secondary container shadow',
503 503
     );
504 504
     $pane->extras = array();
505 505
     $pane->position = 2;
@@ -513,31 +513,31 @@  discard block
 block discarded – undo
513 513
     $pane->shown = TRUE;
514 514
     $pane->access = array();
515 515
     $pane->configuration = array(
516
-      'override_pager_settings' => 0,
517
-      'use_pager' => 0,
518
-      'nodes_per_page' => '6',
519
-      'pager_id' => '',
520
-      'offset' => '0',
521
-      'more_link' => 0,
522
-      'feed_icons' => 0,
523
-      'panel_args' => 0,
524
-      'link_to_view' => 0,
525
-      'args' => '',
526
-      'url' => '',
527
-      'display' => 'block_1',
528
-      'context' => array(
516
+        'override_pager_settings' => 0,
517
+        'use_pager' => 0,
518
+        'nodes_per_page' => '6',
519
+        'pager_id' => '',
520
+        'offset' => '0',
521
+        'more_link' => 0,
522
+        'feed_icons' => 0,
523
+        'panel_args' => 0,
524
+        'link_to_view' => 0,
525
+        'args' => '',
526
+        'url' => '',
527
+        'display' => 'block_1',
528
+        'context' => array(
529 529
         0 => 'argument_uid_1.uid',
530
-      ),
531
-      'override_title' => 0,
532
-      'override_title_text' => '',
530
+        ),
531
+        'override_title' => 0,
532
+        'override_title_text' => '',
533 533
     );
534 534
     $pane->cache = array();
535 535
     $pane->style = array(
536
-      'settings' => NULL,
536
+        'settings' => NULL,
537 537
     );
538 538
     $pane->css = array(
539
-      'css_id' => '',
540
-      'css_class' => 'panel-secondary container shadow',
539
+        'css_id' => '',
540
+        'css_class' => 'panel-secondary container shadow',
541 541
     );
542 542
     $pane->extras = array();
543 543
     $pane->position = 3;
@@ -551,66 +551,66 @@  discard block
 block discarded – undo
551 551
     $pane->shown = TRUE;
552 552
     $pane->access = array();
553 553
     $pane->configuration = array(
554
-      'admin_title' => 'Project list',
555
-      'title' => 'Projects',
556
-      'body' => '<?php echo boincuser_get_projects_table(%user:uid); ?>',
557
-      'format' => '3',
558
-      'substitute' => 1,
554
+        'admin_title' => 'Project list',
555
+        'title' => 'Projects',
556
+        'body' => '<?php echo boincuser_get_projects_table(%user:uid); ?>',
557
+        'format' => '3',
558
+        'substitute' => 1,
559 559
     );
560 560
     $pane->cache = array();
561 561
     $pane->style = array(
562
-      'settings' => NULL,
562
+        'settings' => NULL,
563 563
     );
564 564
     $pane->css = array(
565
-      'css_id' => '',
566
-      'css_class' => 'panel-secondary container shadow',
565
+        'css_id' => '',
566
+        'css_class' => 'panel-secondary container shadow',
567 567
     );
568 568
     $pane->extras = array();
569 569
     $pane->position = 4;
570 570
     $display->content['new-6'] = $pane;
571 571
     $display->panels['sidebar_first'][4] = 'new-6';
572
-  $display->hide_title = PANELS_TITLE_FIXED;
573
-  $display->title_pane = '0';
574
-  $handler->conf['display'] = $display;
575
-  $page->default_handlers[$handler->name] = $handler;
576
-  $pages['boinc_user'] = $page;
572
+    $display->hide_title = PANELS_TITLE_FIXED;
573
+    $display->title_pane = '0';
574
+    $handler->conf['display'] = $display;
575
+    $page->default_handlers[$handler->name] = $handler;
576
+    $pages['boinc_user'] = $page;
577 577
 
578
-  $page = new stdClass;
579
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
580
-  $page->api_version = 1;
581
-  $page->name = 'home';
582
-  $page->task = 'page';
583
-  $page->admin_title = 'Home page';
584
-  $page->admin_description = '';
585
-  $page->path = 'home';
586
-  $page->access = array(
578
+    $page = new stdClass;
579
+    $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
580
+    $page->api_version = 1;
581
+    $page->name = 'home';
582
+    $page->task = 'page';
583
+    $page->admin_title = 'Home page';
584
+    $page->admin_description = '';
585
+    $page->path = 'home';
586
+    $page->access = array(
587 587
     'type' => 'none',
588 588
     'settings' => NULL,
589
-  );
590
-  $page->menu = array(
589
+    );
590
+    $page->menu = array(
591 591
     'type' => 'normal',
592 592
     'title' => 'Home',
593 593
     'name' => 'navigation',
594 594
     'weight' => '0',
595 595
     'parent' => array(
596
-      'type' => 'none',
597
-      'title' => '',
598
-      'name' => 'navigation',
599
-      'weight' => '0',
596
+        'type' => 'none',
597
+        'title' => '',
598
+        'name' => 'navigation',
599
+        'weight' => '0',
600 600
     ),
601
-  );
602
-  $page->arguments = array();
603
-  $page->conf = array();
604
-  $page->default_handlers = array();
605
-  $handler = new stdClass;
606
-  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
607
-  $handler->api_version = 1;
608
-  $handler->name = 'page_home_panel_context';
609
-  $handler->task = 'page';
610
-  $handler->subtask = 'home';
611
-  $handler->handler = 'panel_context';
612
-  $handler->weight = 0;
613
-  $handler->conf = array(
601
+    );
602
+    $page->arguments = array();
603
+    $page->conf = array();
604
+    $page->default_handlers = array();
605
+    $handler = new stdClass;
606
+    $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
607
+    $handler->api_version = 1;
608
+    $handler->name = 'page_home_panel_context';
609
+    $handler->task = 'page';
610
+    $handler->subtask = 'home';
611
+    $handler->handler = 'panel_context';
612
+    $handler->weight = 0;
613
+    $handler->conf = array(
614 614
     'title' => 'Landing page',
615 615
     'no_blocks' => FALSE,
616 616
     'pipeline' => 'ipe',
@@ -618,23 +618,23 @@  discard block
 block discarded – undo
618 618
     'css' => '',
619 619
     'contexts' => array(),
620 620
     'relationships' => array(),
621
-  );
622
-  $display = new panels_display;
623
-  $display->layout = 'one_sidebar_second';
624
-  $display->layout_settings = array();
625
-  $display->panel_settings = array(
621
+    );
622
+    $display = new panels_display;
623
+    $display->layout = 'one_sidebar_second';
624
+    $display->layout_settings = array();
625
+    $display->panel_settings = array(
626 626
     'style_settings' => array(
627
-      'default' => NULL,
628
-      'content' => NULL,
629
-      'sidebar_first' => NULL,
627
+        'default' => NULL,
628
+        'content' => NULL,
629
+        'sidebar_first' => NULL,
630 630
     ),
631
-  );
632
-  $display->cache = array();
633
-  $display->title = '';
634
-  $display->storage_type = 'page_manager';
635
-  $display->storage_id = 'page_home_panel_context';
636
-  $display->content = array();
637
-  $display->panels = array();
631
+    );
632
+    $display->cache = array();
633
+    $display->title = '';
634
+    $display->storage_type = 'page_manager';
635
+    $display->storage_id = 'page_home_panel_context';
636
+    $display->content = array();
637
+    $display->panels = array();
638 638
     $pane = new stdClass;
639 639
     $pane->pid = 'new-1';
640 640
     $pane->panel = 'content';
@@ -642,22 +642,22 @@  discard block
 block discarded – undo
642 642
     $pane->subtype = 'custom';
643 643
     $pane->shown = TRUE;
644 644
     $pane->access = array(
645
-      'plugins' => array(),
645
+        'plugins' => array(),
646 646
     );
647 647
     $pane->configuration = array(
648
-      'admin_title' => 'BOINC overview',
649
-      'title' => '',
650
-      'body' => '<?php print boincuser_home_page(); ?>',
651
-      'format' => '3',
652
-      'substitute' => TRUE,
648
+        'admin_title' => 'BOINC overview',
649
+        'title' => '',
650
+        'body' => '<?php print boincuser_home_page(); ?>',
651
+        'format' => '3',
652
+        'substitute' => TRUE,
653 653
     );
654 654
     $pane->cache = array();
655 655
     $pane->style = array(
656
-      'settings' => NULL,
656
+        'settings' => NULL,
657 657
     );
658 658
     $pane->css = array(
659
-      'css_id' => '',
660
-      'css_class' => 'panel-primary container shadow',
659
+        'css_id' => '',
660
+        'css_class' => 'panel-primary container shadow',
661 661
     );
662 662
     $pane->extras = array();
663 663
     $pane->position = 0;
@@ -671,16 +671,16 @@  discard block
 block discarded – undo
671 671
     $pane->shown = TRUE;
672 672
     $pane->access = array();
673 673
     $pane->configuration = array(
674
-      'override_title' => 0,
675
-      'override_title_text' => '',
674
+        'override_title' => 0,
675
+        'override_title_text' => '',
676 676
     );
677 677
     $pane->cache = array();
678 678
     $pane->style = array(
679
-      'settings' => NULL,
679
+        'settings' => NULL,
680 680
     );
681 681
     $pane->css = array(
682
-      'css_id' => '',
683
-      'css_class' => 'panel-secondary container shadow balance-height-front no-resize',
682
+        'css_id' => '',
683
+        'css_class' => 'panel-secondary container shadow balance-height-front no-resize',
684 684
     );
685 685
     $pane->extras = array();
686 686
     $pane->position = 0;
@@ -694,39 +694,39 @@  discard block
 block discarded – undo
694 694
     $pane->shown = TRUE;
695 695
     $pane->access = array();
696 696
     $pane->configuration = array(
697
-      'override_pager_settings' => 1,
698
-      'use_pager' => 0,
699
-      'nodes_per_page' => '2',
700
-      'pager_id' => '',
701
-      'offset' => '0',
702
-      'more_link' => 1,
703
-      'feed_icons' => 1,
704
-      'panel_args' => 0,
705
-      'link_to_view' => 0,
706
-      'args' => '',
707
-      'url' => '',
708
-      'display' => 'page_2',
709
-      'override_title' => 1,
710
-      'override_title_text' => '',
697
+        'override_pager_settings' => 1,
698
+        'use_pager' => 0,
699
+        'nodes_per_page' => '2',
700
+        'pager_id' => '',
701
+        'offset' => '0',
702
+        'more_link' => 1,
703
+        'feed_icons' => 1,
704
+        'panel_args' => 0,
705
+        'link_to_view' => 0,
706
+        'args' => '',
707
+        'url' => '',
708
+        'display' => 'page_2',
709
+        'override_title' => 1,
710
+        'override_title_text' => '',
711 711
     );
712 712
     $pane->cache = array();
713 713
     $pane->style = array(
714
-      'settings' => NULL,
714
+        'settings' => NULL,
715 715
     );
716 716
     $pane->css = array(
717
-      'css_id' => '',
718
-      'css_class' => 'panel-secondary container shadow balance-height-front',
717
+        'css_id' => '',
718
+        'css_class' => 'panel-secondary container shadow balance-height-front',
719 719
     );
720 720
     $pane->extras = array();
721 721
     $pane->position = 1;
722 722
     $display->content['new-3'] = $pane;
723 723
     $display->panels['sidebar_first'][1] = 'new-3';
724
-  $display->hide_title = PANELS_TITLE_NONE;
725
-  $display->title_pane = '0';
726
-  $handler->conf['display'] = $display;
727
-  $page->default_handlers[$handler->name] = $handler;
728
-  $pages['home'] = $page;
724
+    $display->hide_title = PANELS_TITLE_NONE;
725
+    $display->title_pane = '0';
726
+    $handler->conf['display'] = $display;
727
+    $page->default_handlers[$handler->name] = $handler;
728
+    $pages['home'] = $page;
729 729
 
730
- return $pages;
730
+    return $pages;
731 731
 
732 732
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/template.php 1 patch
Indentation   +321 added lines, -321 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
  * Implementation of HOOK_theme().
68 68
  */
69 69
 function boinc_theme(&$existing, $type, $theme, $path) {
70
-  $hooks = zen_theme($existing, $type, $theme, $path);
71
-  // Add your theme hooks like this:
72
-  /*
70
+    $hooks = zen_theme($existing, $type, $theme, $path);
71
+    // Add your theme hooks like this:
72
+    /*
73 73
   $hooks['hook_name_here'] = array( // Details go here );
74 74
   */
75
-  // @TODO: Needs detailed comments. Patches welcome!
76
-  return $hooks;
75
+    // @TODO: Needs detailed comments. Patches welcome!
76
+    return $hooks;
77 77
 }
78 78
 
79 79
 
@@ -81,44 +81,44 @@  discard block
 block discarded – undo
81 81
  * Adjust the rendering of the menu
82 82
  */
83 83
 function boinc_links__system_main_menu($links, $menu, $element) {
84
-  $html = '';
85
-  $html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
86
-  $item_count = count($links);
87
-  $i = 1;
88
-  foreach ($links as $key => $link) {
84
+    $html = '';
85
+    $html .= '<ul id="' . $menu['id'] . '" class="' . $menu['class'] . '">' . "\n";
86
+    $item_count = count($links);
87
+    $i = 1;
88
+    foreach ($links as $key => $link) {
89 89
     $classes = array($key);
90 90
     if (strpos($key, 'active-trail')) $classes[] = 'active';
91 91
     if ($i == 1) $classes[] = 'first';
92 92
     if ($i == $item_count) $classes[] = 'last';
93 93
     $html .= '<li class="' . implode(' ', $classes) .'">';
94 94
     if ($link['title'] == 'Home') {
95
-      $link['title'] = bts('Home', array(), NULL, 'boinc:menu-link');
95
+        $link['title'] = bts('Home', array(), NULL, 'boinc:menu-link');
96 96
     }
97 97
     if (module_exists('privatemsg')) {
98
-      // Put a new mail notification next to the Account menu item
99
-      if ($link['href'] == 'dashboard') {
98
+        // Put a new mail notification next to the Account menu item
99
+        if ($link['href'] == 'dashboard') {
100 100
         $item_count = privatemsg_unread_count();
101 101
         if ($item_count) {
102
-          $link['title'] .= '</a> <a href="' . url('messages') . '" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
103
-          $link['html'] = TRUE;
104
-          $link['attributes']['class'] = 'compound';
102
+            $link['title'] .= '</a> <a href="' . url('messages') . '" class="compound secondary"><div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
103
+            $link['html'] = TRUE;
104
+            $link['attributes']['class'] = 'compound';
105
+        }
105 106
         }
106
-      }
107 107
     }
108 108
     // Put a count of items on the Moderation menu item
109 109
     if ($link['href'] == 'moderate') {
110
-      $item_count = boincuser_moderation_queue_count();
111
-      if ($item_count) {
110
+        $item_count = boincuser_moderation_queue_count();
111
+        if ($item_count) {
112 112
         $link['title'] .= ' <div class="item-count-wrapper"><span class="item-count">' . $item_count . '</span></div>';
113 113
         $link['html'] = TRUE;
114
-      }
114
+        }
115 115
     }
116 116
     $html .= l($link['title'], $link['href'], $link);
117 117
     $html .= '</li>';
118 118
     $i++;
119
-  }
120
-  $html .= '</ul>' . "\n";
121
-  return $html;
119
+    }
120
+    $html .= '</ul>' . "\n";
121
+    return $html;
122 122
 }
123 123
 
124 124
 
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
  * Remove undesired local task tabs
127 127
  */
128 128
 function boinc_menu_local_task($link, $active = FALSE) {
129
-  if (strpos($link, 'admin/build/pages') !== FALSE
129
+    if (strpos($link, 'admin/build/pages') !== FALSE
130 130
   AND strpos($link, 'Edit Panel')) {
131 131
     // Remove Edit Panel tab
132 132
     return '';
133
-  }
134
-  else {
133
+    }
134
+    else {
135 135
     return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
136
-  }
136
+    }
137 137
 }
138 138
 
139 139
 
@@ -169,103 +169,103 @@  discard block
 block discarded – undo
169 169
  *   The name of the template being rendered ("page" in this case.)
170 170
  */
171 171
 function boinc_preprocess_page(&$vars, $hook) {
172
-  // Responsive Design: Add viewport meta tag to HTML head
173
-  drupal_set_html_head('<meta name="viewport" content="width=device-width, initial-scale=1.0" />');
174
-  $vars['head'] = drupal_get_html_head();
175
-  //dpm($vars['head'], "preprocess (all) vars[head]");
176
-
177
-  // Expose comments to template files; this is needed so that comments can be
178
-  // rendered in locations other than directly below the node content
179
-  $vars['comments'] = $vars['comment_form'] = '';
180
-  if (module_exists('comment') && isset($vars['node'])) {
172
+    // Responsive Design: Add viewport meta tag to HTML head
173
+    drupal_set_html_head('<meta name="viewport" content="width=device-width, initial-scale=1.0" />');
174
+    $vars['head'] = drupal_get_html_head();
175
+    //dpm($vars['head'], "preprocess (all) vars[head]");
176
+
177
+    // Expose comments to template files; this is needed so that comments can be
178
+    // rendered in locations other than directly below the node content
179
+    $vars['comments'] = $vars['comment_form'] = '';
180
+    if (module_exists('comment') && isset($vars['node'])) {
181 181
     $vars['comments'] = comment_render($vars['node']);
182 182
     $vars['comment_form'] = drupal_get_form('comment_form', array('nid' => $vars['node']->nid));
183
-  }
183
+    }
184 184
 
185
-  // Determine locale region code so the correct flag is displayed in footer
186
-  global $language;
187
-  global $theme_path;
188
-  $locality = $language->language;
189
-  if (strpos($language->language, '-')) {
185
+    // Determine locale region code so the correct flag is displayed in footer
186
+    global $language;
187
+    global $theme_path;
188
+    $locality = $language->language;
189
+    if (strpos($language->language, '-')) {
190 190
     $flag_icon = "{$theme_path}/images/flags/{$language->language}.png";
191 191
     if (!file_exists($flag_icon)) {
192
-      $lang_code = explode('-', $language->language);
193
-      $locality = $lang_code[0];
192
+        $lang_code = explode('-', $language->language);
193
+        $locality = $lang_code[0];
194 194
     }
195
-  }
196
-  // If there is no language set for some reason, default to English (en).
197
-  if (empty($locality)) {
195
+    }
196
+    // If there is no language set for some reason, default to English (en).
197
+    if (empty($locality)) {
198 198
     $locality = "en";
199
-  }
200
-  $vars['flag_path'] = base_path() . path_to_theme() . "/images/flags/{$locality}.png";
199
+    }
200
+    $vars['flag_path'] = base_path() . path_to_theme() . "/images/flags/{$locality}.png";
201 201
 
202
-  $server_status_url = variable_get('boinc_server_status_url', '');
203
-  if (!$server_status_url) {
202
+    $server_status_url = variable_get('boinc_server_status_url', '');
203
+    if (!$server_status_url) {
204 204
     $server_status_url = 'server_status.php';
205
-  }
206
-  $vars['server_status_url'] = $server_status_url;
205
+    }
206
+    $vars['server_status_url'] = $server_status_url;
207 207
 
208
-  $app_list_url = variable_get('boinc_app_list_url', '');
209
-  if (!$app_list_url) {
208
+    $app_list_url = variable_get('boinc_app_list_url', '');
209
+    if (!$app_list_url) {
210 210
     $app_list_url = 'apps.php';
211
-  }
212
-  $vars['app_list_url'] = $app_list_url;
213
-
214
-  // Remove title from certain pages using URL.
215
-  // This is a kludge to remove the title of the page but not the
216
-  // "head_title" which is placed in the HTML <head> section. Most of
217
-  // these pages are defined in the Page Manager module.
218
-  // See: https://dev.gridrepublic.org/browse/DBOINC-65
219
-  if (arg(0) == 'search') {
211
+    }
212
+    $vars['app_list_url'] = $app_list_url;
213
+
214
+    // Remove title from certain pages using URL.
215
+    // This is a kludge to remove the title of the page but not the
216
+    // "head_title" which is placed in the HTML <head> section. Most of
217
+    // these pages are defined in the Page Manager module.
218
+    // See: https://dev.gridrepublic.org/browse/DBOINC-65
219
+    if (arg(0) == 'search') {
220 220
     unset($vars['title']);
221
-  }
222
-  else if ( (arg(0)=='account') AND (is_numeric(arg(1))) AND (empty(arg(2))) ) {
221
+    }
222
+    else if ( (arg(0)=='account') AND (is_numeric(arg(1))) AND (empty(arg(2))) ) {
223 223
     unset($vars['title']);
224
-  }
225
-  else if ( (arg(0)=='account') AND (arg(1)=='profile') ) {
224
+    }
225
+    else if ( (arg(0)=='account') AND (arg(1)=='profile') ) {
226 226
     unset($vars['title']);
227
-  }
228
-  else if ( (arg(0)=='dashboard') ) {
227
+    }
228
+    else if ( (arg(0)=='dashboard') ) {
229 229
     unset($vars['title']);
230
-  }
231
-  else if ( (arg(0)=='community') AND ( (arg(1)=='teams') OR (arg(1)=='stats') ) ) {
230
+    }
231
+    else if ( (arg(0)=='community') AND ( (arg(1)=='teams') OR (arg(1)=='stats') ) ) {
232 232
     unset($vars['title']);
233
-  }
233
+    }
234 234
 
235
-  // Apply classes to tabs to allow for better styling options
236
-  $tabs = explode("\n", $vars['tabs']);
237
-  array_pop($tabs);
238
-  end($tabs);
239
-  $last_key = key($tabs);
240
-
241
-  foreach ($tabs as $key => &$tab) {
242
-      if (strpos($tab, 'li class=')) {
243
-          if ($key == 0) {
244
-              $tab = str_replace('li class="', 'li class="first ', $tab);
245
-          }
246
-          if ($key == $last_key) {
247
-              $tab = str_replace('li class="', 'li class="last ', $tab) . '</ul>';
248
-          }
249
-      }
250
-      elseif (strpos($tab, 'li ')) {
251
-          if ($key == 0) {
252
-              $tab = str_replace('li ', 'li class="first" ', $tab);
253
-          }
254
-          if ($key == $last_key) {
255
-              $tab = str_replace('li ', 'li class="last" ', $tab) . '</ul>';
256
-          }
257
-      }
258
-  }
259
-  $vars['tabs'] = implode("\n", $tabs);
235
+    // Apply classes to tabs to allow for better styling options
236
+    $tabs = explode("\n", $vars['tabs']);
237
+    array_pop($tabs);
238
+    end($tabs);
239
+    $last_key = key($tabs);
240
+
241
+    foreach ($tabs as $key => &$tab) {
242
+        if (strpos($tab, 'li class=')) {
243
+            if ($key == 0) {
244
+                $tab = str_replace('li class="', 'li class="first ', $tab);
245
+            }
246
+            if ($key == $last_key) {
247
+                $tab = str_replace('li class="', 'li class="last ', $tab) . '</ul>';
248
+            }
249
+        }
250
+        elseif (strpos($tab, 'li ')) {
251
+            if ($key == 0) {
252
+                $tab = str_replace('li ', 'li class="first" ', $tab);
253
+            }
254
+            if ($key == $last_key) {
255
+                $tab = str_replace('li ', 'li class="last" ', $tab) . '</ul>';
256
+            }
257
+        }
258
+    }
259
+    $vars['tabs'] = implode("\n", $tabs);
260 260
 
261
-  // Get the main menu but only for the branch the page is on.
262
-  $vars['menu_tree_onlyactive'] = menu_tree('primary-links');
261
+    // Get the main menu but only for the branch the page is on.
262
+    $vars['menu_tree_onlyactive'] = menu_tree('primary-links');
263 263
 
264
-  // Create tertiary menu
265
-  $vars['tertiary_links'] = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 2);
264
+    // Create tertiary menu
265
+    $vars['tertiary_links'] = menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 2);
266 266
 
267
-  // Create action links
268
-  $vars['action_links'] = _boinc_action_links();
267
+    // Create action links
268
+    $vars['action_links'] = _boinc_action_links();
269 269
 }
270 270
 
271 271
 /**
@@ -278,79 +278,79 @@  discard block
 block discarded – undo
278 278
  */
279 279
 function boinc_preprocess_node(&$vars, $hook) {
280 280
 
281
-  //$vars['sample_variable'] = t('Lorem ipsum.');
281
+    //$vars['sample_variable'] = t('Lorem ipsum.');
282 282
 
283
-  // Detach subscribe link from the links list. Subscribe link will be placed
284
-  // on page separately from links.
285
-  if (!empty($vars['node']->links['flag-subscriptions']['title'])) {
283
+    // Detach subscribe link from the links list. Subscribe link will be placed
284
+    // on page separately from links.
285
+    if (!empty($vars['node']->links['flag-subscriptions']['title'])) {
286 286
     $vars['subscribe_link'] = $vars['node']->links['flag-subscriptions']['title'];
287 287
     unset($vars['node']->links['flag-subscriptions']);
288
-  }
288
+    }
289 289
 
290
-  // Optionally, run node-type-specific preprocess functions, like
291
-  // boinc_preprocess_node_page() or boinc_preprocess_node_story().
292
-  $function = __FUNCTION__ . '_' . $vars['node']->type;
293
-  if (function_exists($function)) {
290
+    // Optionally, run node-type-specific preprocess functions, like
291
+    // boinc_preprocess_node_page() or boinc_preprocess_node_story().
292
+    $function = __FUNCTION__ . '_' . $vars['node']->type;
293
+    if (function_exists($function)) {
294 294
     $function($vars, $hook);
295
-  }
295
+    }
296 296
 }
297 297
 
298 298
 /**
299 299
  * Preprocessing for forum lists
300 300
  */
301 301
 function boinc_preprocess_forums(&$vars, $hook) {
302
-  // Add a link to mark all forums as read
303
-  module_load_include('inc', 'forum_tweaks', 'includes/mark-read');
304
-  forum_tweaks_get_mark_read_link($vars['tid'], $vars['links']);
305
-  if (!$vars['parents']) {
302
+    // Add a link to mark all forums as read
303
+    module_load_include('inc', 'forum_tweaks', 'includes/mark-read');
304
+    forum_tweaks_get_mark_read_link($vars['tid'], $vars['links']);
305
+    if (!$vars['parents']) {
306 306
     // Remove the "Post new forum topic" link from the top level forum list
307 307
     unset($vars['links']['forum']);
308 308
     // Add a link to manage subscriptions for the user
309 309
     $vars['links']['subscriptions'] = array(
310
-      'title' => bts('Manage subscriptions', array(), NULL, 'boinc:forum-footer'),
311
-      'href' => 'account/prefs/subscriptions',
310
+        'title' => bts('Manage subscriptions', array(), NULL, 'boinc:forum-footer'),
311
+        'href' => 'account/prefs/subscriptions',
312 312
     );
313
-  }
313
+    }
314 314
 }
315 315
 
316 316
 /**
317 317
  * Preprocessing for forum type nodes
318 318
  */
319 319
 function boinc_preprocess_node_forum(&$vars, $hook) {
320
-  global $language;
321
-  global $user;
320
+    global $language;
321
+    global $user;
322 322
 
323
-  // Locality
324
-  $vars['locality'] = $language->language;
323
+    // Locality
324
+    $vars['locality'] = $language->language;
325 325
 
326
-  // Get the author of the node
327
-  $account = user_load($vars['uid']);
328
-  $comments_per_page = ($user->comments_per_page) ? $user->comments_per_page : variable_get("comment_default_per_page_{$vars['node']->type}", 50);
326
+    // Get the author of the node
327
+    $account = user_load($vars['uid']);
328
+    $comments_per_page = ($user->comments_per_page) ? $user->comments_per_page : variable_get("comment_default_per_page_{$vars['node']->type}", 50);
329 329
 
330
-  // Add signature
331
-  $vars['signature'] = check_markup($account->signature, $vars['node']->format);
330
+    // Add signature
331
+    $vars['signature'] = check_markup($account->signature, $vars['node']->format);
332 332
 
333
-  // Show signatures based on user preference
334
-  $vars['show_signatures'] = ($user->hide_signatures) ? FALSE : TRUE;
333
+    // Show signatures based on user preference
334
+    $vars['show_signatures'] = ($user->hide_signatures) ? FALSE : TRUE;
335 335
 
336
-  // Expose comment sort order so that the template can put the topic node
337
-  // content (i.e. initial post) at the very end if "Newest post first" is the
338
-  // preference used by this user
339
-  $vars['oldest_post_first'] = ($user->sort != 1) ? TRUE : FALSE;
340
-  $vars['node']->comment = 0;
336
+    // Expose comment sort order so that the template can put the topic node
337
+    // content (i.e. initial post) at the very end if "Newest post first" is the
338
+    // preference used by this user
339
+    $vars['oldest_post_first'] = ($user->sort != 1) ? TRUE : FALSE;
340
+    $vars['node']->comment = 0;
341 341
 
342
-  $vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
343
-  $page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
344
-  $vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
342
+    $vars['first_page'] = (!isset($_GET['page']) OR ($_GET['page'] < 1));
343
+    $page_count = max(ceil($vars['comment_count'] / $comments_per_page), 1);
344
+    $vars['last_page'] = ($page_count == 1 OR ($page_count > 1 AND $_GET['page'] == $page_count - 1));
345 345
 
346
-  $links = $vars['links'];
347
-  $moderator_links = array();
348
-  _boinc_create_moderator_links($links, $moderator_links);
349
-  $vars['links'] = $links;
350
-  $vars['moderator_links'] = $moderator_links;
346
+    $links = $vars['links'];
347
+    $moderator_links = array();
348
+    _boinc_create_moderator_links($links, $moderator_links);
349
+    $vars['links'] = $links;
350
+    $vars['moderator_links'] = $moderator_links;
351 351
 
352
-  // Ignore user link
353
-  $vars['ignore_link'] = _boinc_ignore_user_link('node', $vars['node']);
352
+    // Ignore user link
353
+    $vars['ignore_link'] = _boinc_ignore_user_link('node', $vars['node']);
354 354
 }
355 355
 
356 356
 
@@ -371,48 +371,48 @@  discard block
 block discarded – undo
371 371
  *   The name of the template being rendered ("comment" in this case.)
372 372
  */
373 373
 function boinc_preprocess_comment(&$vars, $hook) {
374
-  global $language;
375
-  global $user;
374
+    global $language;
375
+    global $user;
376 376
 
377
-  // Locality
378
-  $vars['locality'] = $language->language;
377
+    // Locality
378
+    $vars['locality'] = $language->language;
379 379
 
380
-  // Show signatures based on user preference
381
-  $vars['show_signatures'] = ($user->hide_signatures) ? FALSE : TRUE;
380
+    // Show signatures based on user preference
381
+    $vars['show_signatures'] = ($user->hide_signatures) ? FALSE : TRUE;
382 382
 
383
-  $links = $vars['links'];
384
-  $moderator_links = array();
385
-  _boinc_create_moderator_links($links, $moderator_links);
386
-  $vars['links'] = $links;
387
-  $vars['moderator_links'] = $moderator_links;
383
+    $links = $vars['links'];
384
+    $moderator_links = array();
385
+    _boinc_create_moderator_links($links, $moderator_links);
386
+    $vars['links'] = $links;
387
+    $vars['moderator_links'] = $moderator_links;
388 388
 
389
-  // Ignore user link
390
-  $vars['ignore_link'] = _boinc_ignore_user_link('comment', $vars['comment']);
389
+    // Ignore user link
390
+    $vars['ignore_link'] = _boinc_ignore_user_link('comment', $vars['comment']);
391 391
 }
392 392
 
393 393
 /**
394 394
  *
395 395
  */
396 396
 function boinc_preprocess_forum_topic_list(&$variables) {
397
-  if (!empty($variables['topics'])) {
397
+    if (!empty($variables['topics'])) {
398 398
     foreach ($variables['topics'] as $id => $topic) {
399
-      if ($topic->new_replies) {
399
+        if ($topic->new_replies) {
400 400
         $cid = boincuser_get_first_unread_comment_id($topic->nid);
401 401
         if ($cid) {
402
-          $variables['topics'][$id]->new_url = url("goto/comment/{$cid}");
402
+            $variables['topics'][$id]->new_url = url("goto/comment/{$cid}");
403 403
         }
404 404
         else {
405
-          // User hasn't visited this topic before, so all replies are new...
406
-          $topic->new_replies = NULL;
405
+            // User hasn't visited this topic before, so all replies are new...
406
+            $topic->new_replies = NULL;
407
+        }
407 408
         }
408
-      }
409
-      // Use same logic in forum.module to change message if topic has
410
-      // moved. Changed link to match boinc path-added "community".
411
-      if ($topic->forum_tid != $variables['tid']) {
409
+        // Use same logic in forum.module to change message if topic has
410
+        // moved. Changed link to match boinc path-added "community".
411
+        if ($topic->forum_tid != $variables['tid']) {
412 412
         $variables['topics'][$id]->message = l(t('This topic has been moved'), "community/forum/$topic->forum_tid");
413
-      }
413
+        }
414
+    }
414 415
     }
415
-  }
416 416
 }
417 417
 
418 418
 /**
@@ -425,79 +425,79 @@  discard block
 block discarded – undo
425 425
  */
426 426
 ///* -- Delete this line if you want to use this function
427 427
 function boinc_preprocess_views_view(&$vars, $hook) {
428
-  switch ($vars['name']) {
429
-  case 'boinc_account_computers':
428
+    switch ($vars['name']) {
429
+    case 'boinc_account_computers':
430 430
     switch ($vars['display_id']) {
431 431
     case 'page_1':
432 432
     case 'panel_pane_1':
433 433
       $vars['empty'] = boincwork_views_host_list_empty_text();
434
-      break;
434
+        break;
435 435
     case 'page_2':
436 436
       $vars['empty'] = boincwork_views_host_list_empty_text('active');
437
-      break;
437
+        break;
438 438
     case 'block_1':
439 439
       $vars['empty'] = boincwork_views_host_list_empty_text('preferences');
440
-      break;
440
+        break;
441 441
     default:
442 442
     }
443 443
     break;
444
-  case 'boinc_account_tasks_all':
444
+    case 'boinc_account_tasks_all':
445 445
     $vars['empty'] = boincwork_views_task_list_empty_text();
446 446
     break;
447
-  case 'boinc_friends':
447
+    case 'boinc_friends':
448 448
     if ($vars['display_id'] == 'block_1') {
449
-      $vars['header'] = boincuser_views_friends_block_header();
449
+        $vars['header'] = boincuser_views_friends_block_header();
450 450
     }
451 451
     break;
452
-  case 'boinc_host':
452
+    case 'boinc_host':
453 453
       $view = views_get_current_view();
454
-      if (!($view->result)) {
454
+        if (!($view->result)) {
455 455
         $vars['footer'] = '<h3>' . bts ('Host not found in database.', array(), NULL, 'boinc:host-details') . '</h3>';
456
-      }
456
+        }
457 457
     break;
458
-  case 'boinc_host_list':
458
+    case 'boinc_host_list':
459 459
     if ($vars['display_id'] == 'page_2') {
460
-     $vars['empty'] = boincwork_views_host_list_empty_text();
460
+        $vars['empty'] = boincwork_views_host_list_empty_text();
461 461
     }
462 462
     elseif ($vars['display_id'] == 'page_1') {
463
-      $vars['empty'] = boincwork_views_host_list_empty_text('active');
463
+        $vars['empty'] = boincwork_views_host_list_empty_text('active');
464 464
     }
465 465
     break;
466
-  case 'boinc_task':
466
+    case 'boinc_task':
467 467
     // Load view object (view data is not available in header / footer); execute view query
468 468
     $view = views_get_current_view();
469 469
     $view->execute();
470 470
     $result = reset($view->result);
471 471
 
472 472
     if ($result) {
473
-      // Display the stderr output in the footer
474
-      $vars['footer'] = '<h3>' . bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog') .'</h3>';
475
-      $vars['footer'] .= '<pre>' . htmlspecialchars($result->result_stderr_out) . '</pre>';
473
+        // Display the stderr output in the footer
474
+        $vars['footer'] = '<h3>' . bts('Stderr output', array(), NULL, 'boinc:task-details-errorlog') .'</h3>';
475
+        $vars['footer'] .= '<pre>' . htmlspecialchars($result->result_stderr_out) . '</pre>';
476 476
     } else {
477
-      $vars['footer'] = '<h3>' . bts ('Task not found in database.', array(), NULL, 'boinc:task-details') . '</h3>';
477
+        $vars['footer'] = '<h3>' . bts ('Task not found in database.', array(), NULL, 'boinc:task-details') . '</h3>';
478 478
     }
479 479
     break;
480
-  case 'boinc_teams':
480
+    case 'boinc_teams':
481 481
     if ($vars['display_id'] == 'panel_pane_3') {
482
-      $team_id = arg(2);
483
-      $vars['header'] = boincteam_manage_admins_panel_header($team_id);
482
+        $team_id = arg(2);
483
+        $vars['header'] = boincteam_manage_admins_panel_header($team_id);
484 484
     }
485 485
     break;
486
-  case 'boinc_workunit':
486
+    case 'boinc_workunit':
487 487
     ob_start();
488 488
     // Get the workunit ID from the URL
489 489
     $result_id = arg(1);
490 490
     require_boinc(array('util','boinc_db'));
491 491
     $wu = BoincWorkunit::lookup_id($result_id);
492 492
     if ($wu) {
493
-      // Output from admin defined BOINC project-specific function
494
-      project_workunit($wu);
495
-      // Output of project_workunit() gets caught in the buffer
496
-      $vars['footer'] = ob_get_clean();
493
+        // Output from admin defined BOINC project-specific function
494
+        project_workunit($wu);
495
+        // Output of project_workunit() gets caught in the buffer
496
+        $vars['footer'] = ob_get_clean();
497 497
     } else {
498
-      $vars['footer'] = '<h3>' . bts ('Workunit not found in database.', array(), NULL, 'boinc:workunit-details') . '</h3>';
498
+        $vars['footer'] = '<h3>' . bts ('Workunit not found in database.', array(), NULL, 'boinc:workunit-details') . '</h3>';
499 499
     }
500
-  default:
500
+    default:
501 501
   }
502 502
 }
503 503
 // */
@@ -510,19 +510,19 @@  discard block
 block discarded – undo
510 510
  */
511 511
 ///* -- Delete this line if you want to use this function
512 512
 function boinc_preprocess_privatemsg_view(&$vars, $hook) {
513
-  $author_picture = '<div class="picture">';
514
-  $user_image = boincuser_get_user_profile_image($vars['message']['author']->uid);
515
-  if ($user_image) {
513
+    $author_picture = '<div class="picture">';
514
+    $user_image = boincuser_get_user_profile_image($vars['message']['author']->uid);
515
+    if ($user_image) {
516 516
     if (is_array($user_image) AND $user_image['image']['filepath']) {
517
-      $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
517
+        $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
518 518
     }
519 519
     elseif (is_string($user_image)) {
520
-      $author_picture .= '<img src="' . $user_image . '"/>';
520
+        $author_picture .= '<img src="' . $user_image . '"/>';
521 521
     }
522
-  }
523
-  $author_picture .= '</div>';
524
-  $vars['author_picture'] = $author_picture;
525
-  $vars['message_timestamp'] = date('j M Y G:i:s T', $vars['message']['timestamp']);
522
+    }
523
+    $author_picture .= '</div>';
524
+    $vars['author_picture'] = $author_picture;
525
+    $vars['message_timestamp'] = date('j M Y G:i:s T', $vars['message']['timestamp']);
526 526
 }
527 527
 // */
528 528
 
@@ -541,19 +541,19 @@  discard block
 block discarded – undo
541 541
 // */
542 542
 
543 543
 function boinc_preprocess_search_result(&$variables) {
544
-  global $language;
545
-  // Locality
546
-  $variables['locality'] = $language->language;
544
+    global $language;
545
+    // Locality
546
+    $variables['locality'] = $language->language;
547 547
 
548
-  // Change the format of the search result date/time in the info string.
549
-  if ($variables['result']['date']) {
548
+    // Change the format of the search result date/time in the info string.
549
+    if ($variables['result']['date']) {
550 550
     $variables['info_split']['date'] = date('j M Y G:i:s T', $variables['result']['date']);
551
-  }
552
-  $variables['info'] = implode(' - ', $variables['info_split']);
551
+    }
552
+    $variables['info'] = implode(' - ', $variables['info_split']);
553 553
 
554
-  $type = strtolower($variables['result']['bundle']);
555
-  switch ($type) {
556
-  case 'profile':
554
+    $type = strtolower($variables['result']['bundle']);
555
+    switch ($type) {
556
+    case 'profile':
557 557
   case 'user':
558 558
     $node = $variables['result']['node'];
559 559
     $variables['url'] = url('account/' . $node->is_uid);
@@ -561,20 +561,20 @@  discard block
 block discarded – undo
561 561
     $variables['user_image'] = boincuser_get_user_profile_image($node->is_uid);
562 562
     $variables['account'] = user_load($node->is_uid);
563 563
     break;
564
-  case 'team':
564
+    case 'team':
565 565
     $node = $variables['result']['node'];
566 566
     $variables['url'] = url('/community/teams/' . $node->entity_id);;
567 567
     break;
568
-  case 'forum':
568
+    case 'forum':
569 569
     $node = $variables['result']['node'];
570 570
     $drupalnode = node_load($node->entity_id);
571 571
     // Get the taxonomy for the node, creates a link to the parent forum
572 572
     $taxonomy = reset($drupalnode->taxonomy);
573 573
     if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
574
-      $variables['parent_forum'] = l($taxonomy->name, "community/forum/{$taxonomy->tid}");
574
+        $variables['parent_forum'] = l($taxonomy->name, "community/forum/{$taxonomy->tid}");
575 575
     }
576 576
     break;
577
-  case 'comment':
577
+    case 'comment':
578 578
     // Get the node id for this comment
579 579
     $nid = $variables['result']['fields']['tos_content_extra'];
580 580
     $drupalnode = node_load($nid);
@@ -585,21 +585,21 @@  discard block
 block discarded – undo
585 585
     // Get the taxonomy for the node, creates a link to the parent forum
586 586
     $taxonomy = reset($drupalnode->taxonomy);
587 587
     if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
588
-      $variables['parent_forum'] = l($taxonomy->name, "community/forum/{$taxonomy->tid}");
588
+        $variables['parent_forum'] = l($taxonomy->name, "community/forum/{$taxonomy->tid}");
589 589
     }
590
-  break;
591
-  default:
590
+    break;
591
+    default:
592 592
   }
593 593
 }
594 594
 
595 595
 // Remove the mess of text under the search form and don't display "no results"
596 596
 // if a search hasn't even been submitted
597 597
 function boinc_apachesolr_search_noresults() {
598
-  $message = bts('No results found...', array(), NULL, 'boinc:search-with-no-results');
599
-  if (!arg(2)) {
598
+    $message = bts('No results found...', array(), NULL, 'boinc:search-with-no-results');
599
+    if (!arg(2)) {
600 600
     $message = '';
601
-  }
602
-  return '<p>' . $message . '</p>';
601
+    }
602
+    return '<p>' . $message . '</p>';
603 603
 }
604 604
 
605 605
 /**
@@ -608,42 +608,42 @@  discard block
 block discarded – undo
608 608
  */
609 609
 function phptemplate_username($object) {
610 610
 
611
-  if ($object->uid && $object->name) {
611
+    if ($object->uid && $object->name) {
612 612
 
613 613
     // Show the profile name in general, not the username
614 614
     $name = user_load($object->uid)->boincuser_name;
615 615
 
616 616
     // Shorten the name when it is too long or it will break many tables.
617 617
     if (drupal_strlen($name) > 20) {
618
-      $name = drupal_substr($name, 0, 15) . '...';
618
+        $name = drupal_substr($name, 0, 15) . '...';
619 619
     }
620 620
 
621 621
     if (user_access('access user profiles')) {
622
-      $output = l($name, 'account/' . $object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
622
+        $output = l($name, 'account/' . $object->uid, array('attributes' => array('title' => bts('View user profile.', array(), NULL, 'boinc:users-table'))));
623 623
     }
624 624
     else {
625
-      $output = check_plain($name);
625
+        $output = check_plain($name);
626 626
     }
627
-  }
628
-  else if ($object->name) {
627
+    }
628
+    else if ($object->name) {
629 629
     // Sometimes modules display content composed by people who are
630 630
     // not registered members of the site (e.g. mailing list or news
631 631
     // aggregator modules). This clause enables modules to display
632 632
     // the true author of the content.
633 633
     if (!empty($object->homepage)) {
634
-      $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
634
+        $output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
635 635
     }
636 636
     else {
637
-      $output = check_plain($object->name);
637
+        $output = check_plain($object->name);
638 638
     }
639 639
 
640 640
     $output .= ' (' . bts('not verified', array(), NULL, 'boinc:user-not-found') . ')';
641
-  }
642
-  else {
641
+    }
642
+    else {
643 643
     $output = check_plain(variable_get('anonymous', bts('Anonymous', array(), NULL, 'boinc:anonymous-user')));
644
-  }
644
+    }
645 645
 
646
-  return $output;
646
+    return $output;
647 647
 }
648 648
 
649 649
 /**
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
  * "More information about formatting options"
652 652
  */
653 653
 function boinc_filter_tips_more_info () {
654
-  return '';
654
+    return '';
655 655
 }
656 656
 
657 657
 /**
@@ -669,19 +669,19 @@  discard block
 block discarded – undo
669 669
  *   An array containing the email [type] (mailkey), [subject] and [body].
670 670
  */
671 671
 function boinc_flag_friend_message_email($status, $flag, $recipient, $sender) {
672
-  $email = array();
673
-  $email['type'] = 'flag-friend';
674
-  // Reload the sender to get a full user object
675
-  $sender = user_load($sender->uid);
672
+    $email = array();
673
+    $email['type'] = 'flag-friend';
674
+    // Reload the sender to get a full user object
675
+    $sender = user_load($sender->uid);
676 676
 
677
-  switch ($status) {
677
+    switch ($status) {
678 678
     case FLAG_FRIEND_FLAGGED:
679 679
       // Sender accepted recipient's friend request
680 680
       $email['subject'] = bts('!name accepted your friend request [!site]', array(
681 681
         '!name' => $sender->boincuser_name,
682 682
         '!site' => variable_get('site_name', 'Drupal-BOINC'),
683 683
         ), NULL, 'boinc:friend-request-email');
684
-      $email['body'] = bts('!name confirmed you as a friend on !site.
684
+        $email['body'] = bts('!name confirmed you as a friend on !site.
685 685
 
686 686
 Follow this link to view his or her profile:
687 687
 !link
@@ -695,12 +695,12 @@  discard block
 block discarded – undo
695 695
         '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
696 696
         '!link' => url('account/'. $sender->uid, array('absolute' => TRUE)),
697 697
         ), array(), NULL, 'boinc:friend-request-email');
698
-      break;
698
+        break;
699 699
 
700 700
     case FLAG_FRIEND_PENDING:
701 701
       // Sender is requesting to be recipient's friend
702 702
       $email['subject'] = bts('Friend request from !name [!site]', array('!name' => $sender->boincuser_name, '!site' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:friend-request-email');
703
-      $email['body'] = bts('!name added you as a friend on !site. You can approve or deny this request. Denying a request will not send a notification, but will remove the request from both of your accounts.
703
+        $email['body'] = bts('!name added you as a friend on !site. You can approve or deny this request. Denying a request will not send a notification, but will remove the request from both of your accounts.
704 704
 
705 705
 Follow the link below to view this request:
706 706
 !link
@@ -714,26 +714,26 @@  discard block
 block discarded – undo
714 714
         '!message' => $flag->friend_message ? bts('Message', array(), NULL, 'boinc:friend-request-email:-1:a-private-message') . ': ' . $flag->friend_message : '',
715 715
         '!link' => url('goto/friend-requests', array('absolute' => TRUE)),
716 716
         ),
717
-      array(), NULL, 'boinc:friend-request-email');
718
-      break;
719
-  }
720
-  return $email;
717
+        array(), NULL, 'boinc:friend-request-email');
718
+        break;
719
+    }
720
+    return $email;
721 721
 }
722 722
 
723 723
 /**
724 724
  * Edit action links
725 725
  */
726 726
 function phptemplate_links($links, $attributes = array('class' => 'links')) {
727
-  if ($links){
727
+    if ($links){
728 728
     // Remove flag-subscriptions link. It will be placed elsewhere.
729 729
     if (isset($links['flag-subscriptions'])) {
730
-      unset($links['flag-subscriptions']);
730
+        unset($links['flag-subscriptions']);
731 731
     }
732 732
     // Reorder the links however you need them.
733 733
     $links = reorder_links($links, array('comment_edit','quote','comment_add','comment_reply','flag-abuse_comment','flag-abuse_node'), array('comment_delete'));
734 734
     // Use the built-in theme_links() function to format the $links array.
735 735
     return theme_links($links, $attributes);
736
-  }
736
+    }
737 737
 }
738 738
 
739 739
 /**
@@ -777,8 +777,8 @@  discard block
 block discarded – undo
777 777
  * That is to say, get rid of it and use the views-view-table.tpl.php template.
778 778
  */
779 779
 function boinc_tablesort_indicator($style) {
780
-  return '';
781
-  /*
780
+    return '';
781
+    /*
782 782
   if ($style == "asc") {
783 783
     return theme('image', 'misc/arrow-asc.png', t('sort icon'), t('sort ascending'));
784 784
   }
@@ -801,48 +801,48 @@  discard block
 block discarded – undo
801 801
  *
802 802
  */
803 803
 function _boinc_create_moderator_links(&$links, &$moderator_links) {
804
-  // If there are no links, then do nothing
805
-  if (empty($links)) {
804
+    // If there are no links, then do nothing
805
+    if (empty($links)) {
806 806
     return;
807
-  }
807
+    }
808 808
 
809
-  $alllinks = array();
810
-  $modlinks = array();
809
+    $alllinks = array();
810
+    $modlinks = array();
811 811
 
812
-  // Create an array of HTML elements from the $links string, keys
813
-  // are the class attribute for the <li> tags.
814
-  $dom = new DOMDocument;
815
-  $dom->loadHTML(mb_convert_encoding($links, 'HTML-ENTITIES', 'UTF-8'));
816
-  foreach($dom->getElementsByTagName('li') as $node) {
812
+    // Create an array of HTML elements from the $links string, keys
813
+    // are the class attribute for the <li> tags.
814
+    $dom = new DOMDocument;
815
+    $dom->loadHTML(mb_convert_encoding($links, 'HTML-ENTITIES', 'UTF-8'));
816
+    foreach($dom->getElementsByTagName('li') as $node) {
817 817
     $key = $node->getAttribute("class");
818 818
     $alllinks[$key] = $dom->saveHTML($node);
819
-  }
819
+    }
820 820
 
821
-  // Select classes to be placed into moderator links array
822
-  $selected_classes = array(
821
+    // Select classes to be placed into moderator links array
822
+    $selected_classes = array(
823 823
     "make_sticky", "make_unsticky",
824 824
     "lock", "unlock",
825 825
     "convert",
826 826
     "hide", "unhide",
827 827
     "comment_delete",
828
-  );
829
-  foreach(array_keys($alllinks) as $key1) {
828
+    );
829
+    foreach(array_keys($alllinks) as $key1) {
830 830
     // Select string up to first space, if present.
831 831
     $class1 = strtok($key1, ' ');
832 832
     if (in_array($class1, $selected_classes)) {
833
-      if (empty($modlinks)) {
833
+        if (empty($modlinks)) {
834 834
         _boinc_firstlink($alllinks[$key1]);
835
-      }
836
-      $modlinks[$key1] = $alllinks[$key1];
837
-      unset($alllinks[$key1]);
835
+        }
836
+        $modlinks[$key1] = $alllinks[$key1];
837
+        unset($alllinks[$key1]);
838 838
     }
839
-  }
840
-  // Convert the HTML arrays back into strings, wrap them in <ul>
841
-  // tags
842
-  $links = "<ul class=\"links\">".implode($alllinks)."</ul>";
843
-  $moderator_links = "<ul class=\"links\">".implode($modlinks)."</ul>";
839
+    }
840
+    // Convert the HTML arrays back into strings, wrap them in <ul>
841
+    // tags
842
+    $links = "<ul class=\"links\">".implode($alllinks)."</ul>";
843
+    $moderator_links = "<ul class=\"links\">".implode($modlinks)."</ul>";
844 844
 
845
-  return;
845
+    return;
846 846
 }
847 847
 
848 848
 /*
@@ -850,38 +850,38 @@  discard block
 block discarded – undo
850 850
  * attribute to class.
851 851
  */
852 852
 function _boinc_firstlink(&$alink) {
853
-  if (!empty($alink)) {
853
+    if (!empty($alink)) {
854 854
     $dom = new DomDocument;
855 855
     $dom->loadHTML(mb_convert_encoding($alink, 'HTML-ENTITIES', 'UTF-8'));
856 856
 
857 857
     $myli = $dom->getElementsByTagName('li');
858 858
     if ($myli->length>0) {
859
-      $newclasses = trim(($myli[0]->getAttribute("class"))." first");
860
-      $myli[0]->setAttribute("class", $newclasses);
861
-      $alink = $dom->saveHTML($myli[0]);
859
+        $newclasses = trim(($myli[0]->getAttribute("class"))." first");
860
+        $myli[0]->setAttribute("class", $newclasses);
861
+        $alink = $dom->saveHTML($myli[0]);
862
+    }
862 863
     }
863
-  }
864 864
 }
865 865
 
866 866
 /*
867 867
  * Private function to generate the action links
868 868
  */
869 869
 function _boinc_action_links() {
870
-  global $user;
871
-  global $base_path;
870
+    global $user;
871
+    global $base_path;
872 872
 
873
-  $output = '<ul class="menu"><li class="first">';
874
-  if ($user->uid) {
873
+    $output = '<ul class="menu"><li class="first">';
874
+    if ($user->uid) {
875 875
     $output .= '<a href="' . url('logout') . '">' . bts('Logout', array(), NULL, 'boinc:menu-link') . '</a>';
876
-  } else {
876
+    } else {
877 877
     $output .= '<a href="' . url('user/login', array('query' => drupal_get_destination()) ) . '">' . bts('Login', array(), NULL, 'boinc:menu-link') . '</a>';
878
-  }
879
-  $output .= '</li>';
880
-  if (module_exists('global_search') OR module_exists('global_search_solr')) {
878
+    }
879
+    $output .= '</li>';
880
+    if (module_exists('global_search') OR module_exists('global_search_solr')) {
881 881
     $output .= '<li class="last"> <a class="search" href="' . url('search/site') . '">' . bts('search', array(), NULL, 'boinc:menu-link') .'</a> </l1>';
882
-  }
883
-  $output .= '</ul>';
884
-  return $output;
882
+    }
883
+    $output .= '</ul>';
884
+    return $output;
885 885
 }
886 886
 
887 887
 /**
@@ -889,47 +889,47 @@  discard block
 block discarded – undo
889 889
  * function. Modified for boinc functionality.
890 890
  */
891 891
 function _boinc_ignore_user_link($type, $object = NULL, $teaser = FALSE) {
892
-  global $user;
892
+    global $user;
893 893
 
894
-  if (!$user || !$user->uid) {
894
+    if (!$user || !$user->uid) {
895 895
     return;
896
-  }
896
+    }
897 897
 
898
-  static $ignored;
899
-  $links = array();
898
+    static $ignored;
899
+    $links = array();
900 900
 
901
-  if ($type == 'node' && $user->uid != $object->uid && $object->uid != 0 && user_access('ignore user')) {
901
+    if ($type == 'node' && $user->uid != $object->uid && $object->uid != 0 && user_access('ignore user')) {
902 902
     if (!isset($ignored[$object->uid])) {
903
-      $ignored[$object->uid] = db_result(db_query('SELECT COUNT(*) FROM {ignore_user} WHERE uid = %d AND iuid = %d', $user->uid, $object->uid));
903
+        $ignored[$object->uid] = db_result(db_query('SELECT COUNT(*) FROM {ignore_user} WHERE uid = %d AND iuid = %d', $user->uid, $object->uid));
904 904
     }
905 905
     if ($ignored[$object->uid] == 0) {
906
-      $links['ignore_user'] = array(
906
+        $links['ignore_user'] = array(
907 907
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
908 908
         'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
909 909
         'query' => 'destination='. $_GET['q'],
910 910
         'attributes' => array(
911
-          'class' => 'ignore-user',
912
-          'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
911
+            'class' => 'ignore-user',
912
+            'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
913 913
         ),
914
-      );
914
+        );
915 915
     }
916
-  }
917
-  else if ($type == 'comment' && $user->uid != $object->uid && $object->uid != 0 && user_access('ignore user')) {
916
+    }
917
+    else if ($type == 'comment' && $user->uid != $object->uid && $object->uid != 0 && user_access('ignore user')) {
918 918
     if (!isset($ignored[$object->uid])) {
919
-      $ignored[$object->uid] = db_result(db_query('SELECT COUNT(*) FROM {ignore_user} WHERE uid = %d AND iuid = %d', $user->uid, $object->uid));
919
+        $ignored[$object->uid] = db_result(db_query('SELECT COUNT(*) FROM {ignore_user} WHERE uid = %d AND iuid = %d', $user->uid, $object->uid));
920 920
     }
921 921
     if ($ignored[$object->uid] == 0) {
922
-      $links['ignore_user'] = array(
922
+        $links['ignore_user'] = array(
923 923
         'title' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
924 924
         'href' => 'account/prefs/privacy/ignore_user/add/'. $object->uid,
925 925
         'query' => 'destination='. $_GET['q'],
926 926
         'attributes' => array(
927
-          'class' => 'ignore-user',
928
-          'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
927
+            'class' => 'ignore-user',
928
+            'title' => bts('Add user to your ignore list', array(), NULL, 'boinc:ignore-user-add'),
929 929
         ),
930
-      );
930
+        );
931
+    }
931 932
     }
932
-  }
933 933
 
934
-  return $links;
934
+    return $links;
935 935
 }
Please login to merge, or discard this patch.
html/ops/check_account_ownership_keys.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@
 block discarded – undo
23 23
 admin_page_head("Account Ownership Keys");
24 24
 
25 25
 if (!file_exists($account_ownership_private_key_file_path)) {
26
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
26
+    echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
27 27
 } else {
28
-  echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
28
+    echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>";
29 29
 }
30 30
 
31 31
 if (!file_exists($account_ownership_public_key_file_path)) {
32
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
32
+    echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>";
33 33
 } else {
34
-  echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
34
+    echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>";
35 35
 }
36 36
 
37 37
 echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>";
Please login to merge, or discard this patch.
html/ops/dbinfo.php 1 patch
Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
     function __construct($n, $d, $i, $t, $r, $s) {
16 16
         $this->name = $n;
17 17
         $this->data_size = $d;
18
-		$this->index_size = $i;
19
-		$this->total_size = $t;
20
-		$this->rows = $r;
21
-		$this->size_per_row = $s;
18
+        $this->index_size = $i;
19
+        $this->total_size = $t;
20
+        $this->rows = $r;
21
+        $this->size_per_row = $s;
22 22
     }
23 23
     function __destruct() {
24 24
     }
@@ -42,25 +42,25 @@  discard block
 block discarded – undo
42 42
 
43 43
 // returns formatted data size
44 44
 function size_format($size){
45
-	$retval = 0;
45
+    $retval = 0;
46 46
 
47
-	$KB = 1024;
47
+    $KB = 1024;
48 48
     $MB = 1024*1024;
49 49
     $GB = 1024*1024*1024;
50
-	$TB = 1024*1024*1024*1024;
50
+    $TB = 1024*1024*1024*1024;
51 51
 
52 52
     if ($size < $KB) {
53
-	    $retval = $size;
53
+        $retval = $size;
54 54
     } elseif (($size > $KB) && ($size < $MB)) {
55
-		$retval = sprintf("%.0fK", ($size / $KB));
55
+        $retval = sprintf("%.0fK", ($size / $KB));
56 56
     } elseif ( ($size >= $MB) && ($size < $GB)) {
57
-		$retval = sprintf("%.2fMB", ($size / $MB));
57
+        $retval = sprintf("%.2fMB", ($size / $MB));
58 58
     } elseif ( ($size >= $GB) && ($size < $TB)) {
59
-		$retval = sprintf("%.2fGB", ($size / $GB));
60
-	} elseif ( $size >= $TB ) {
61
-		$retval = sprintf("%.2fTB", ($size / $TB));
62
-	}
63
-	return $retval;
59
+        $retval = sprintf("%.2fGB", ($size / $GB));
60
+    } elseif ( $size >= $TB ) {
61
+        $retval = sprintf("%.2fTB", ($size / $TB));
62
+    }
63
+    return $retval;
64 64
 }
65 65
 
66 66
 
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
     // SQL output
74 74
     // mysql> show table status from [table_name];
75 75
     // | Name | Engine | Version | Row_format | Rows
76
-	// | Avg_row_length | Data_length | Max_data_length
77
-	// | Index_length | Data_free  | Auto_increment | Create_time
78
-	// | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
76
+    // | Avg_row_length | Data_length | Max_data_length
77
+    // | Index_length | Data_free  | Auto_increment | Create_time
78
+    // | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
79 79
     //
80 80
 
81 81
     $gdata  = 0;
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
     $gtotal = 0;
84 84
     $grows  = 0;
85 85
 
86
-	$i = 0;
87
-	$db_rec = array();
88
-	while ($myarr = _mysql_fetch_assoc($result)) {
86
+    $i = 0;
87
+    $db_rec = array();
88
+    while ($myarr = _mysql_fetch_assoc($result)) {
89 89
         if ($myarr['Comment'] == 'VIEW') continue;
90 90
 
91
-		// sum grand totals
92
-		$total  =  $myarr["Data_length"] + $myarr["Index_length"];
93
-		$gindex += $myarr["Index_length"];
91
+        // sum grand totals
92
+        $total  =  $myarr["Data_length"] + $myarr["Index_length"];
93
+        $gindex += $myarr["Index_length"];
94 94
         $gdata  += $myarr["Data_length"];
95
-		$grows  += $myarr["Rows"];
96
-		$gtotal += $total;
95
+        $grows  += $myarr["Rows"];
96
+        $gtotal += $total;
97 97
 
98
-	    $db_rec[$i] = new DB_REC(
98
+        $db_rec[$i] = new DB_REC(
99 99
             $myarr["Name"],
100 100
             $myarr["Data_length"],
101 101
             $myarr["Index_length"],
@@ -103,131 +103,131 @@  discard block
 block discarded – undo
103 103
             $myarr["Rows"],
104 104
             $myarr["Avg_row_length"]
105 105
         );
106
-		$i++;
107
-	}
106
+        $i++;
107
+    }
108 108
     $db_rec[$i] = new DB_REC ("Total", $gdata, $gindex, $gtotal, $grows, "" );
109
-	return $db_rec;
109
+    return $db_rec;
110 110
 }
111 111
 
112 112
 // show the DB structure
113 113
 //
114 114
 function show_db_info($db_name, $db_rec) {
115
-	echo "<table cols=6>";
116
-	echo "<tr>";
117
-	echo "<th colspan=6> Database $db_name </th>";
118
-	echo "</tr>";
119
-
120
-	echo "<tr>";
121
-	echo "<th>Table</th>";
122
-	echo "<th>Data Size</th>";
123
-	echo "<th>Index Size</th>";
124
-	echo "<th>Total Size</th>";
125
-	echo "<th>Total Rows</th>";
126
-	echo "<th>Avg. Size per Row</th>";
127
-	echo "</tr>";
128
-
129
-	for ($i = 0; $i < sizeof($db_rec)-1; $i++){
130
-		echo "<tr>";
131
-		echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
132
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
133
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
134
-		echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
115
+    echo "<table cols=6>";
116
+    echo "<tr>";
117
+    echo "<th colspan=6> Database $db_name </th>";
118
+    echo "</tr>";
119
+
120
+    echo "<tr>";
121
+    echo "<th>Table</th>";
122
+    echo "<th>Data Size</th>";
123
+    echo "<th>Index Size</th>";
124
+    echo "<th>Total Size</th>";
125
+    echo "<th>Total Rows</th>";
126
+    echo "<th>Avg. Size per Row</th>";
127
+    echo "</tr>";
128
+
129
+    for ($i = 0; $i < sizeof($db_rec)-1; $i++){
130
+        echo "<tr>";
131
+        echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>";
132
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size)  . "</td>";
133
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->index_size) . "</td>";
134
+        echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->total_size) . "</td>";
135 135
         echo "<td align=left valign=top class=fieldname>" . number_format($db_rec[$i]->rows)     . "</td>";
136 136
         echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->size_per_row) . "</td>";
137
-		echo "</tr>";
138
-	}
137
+        echo "</tr>";
138
+    }
139 139
 
140
-	// Last record is just a summary
141
-	$i = sizeof($db_rec)-1;
142
-	echo "<tr>";
140
+    // Last record is just a summary
141
+    $i = sizeof($db_rec)-1;
142
+    echo "<tr>";
143 143
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
144 144
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
145 145
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
146 146
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
147 147
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
148 148
     echo "<th align=left></th>";
149
-	echo "</tr>";
149
+    echo "</tr>";
150 150
     echo "</table>";
151 151
 }
152 152
 
153 153
 // same as show_db_info but with sortable columns
154 154
 //
155 155
 function sort_db_info($db_name, $db_rec) {
156
-	$file_list = array();
156
+    $file_list = array();
157 157
     $file_sort = array();
158 158
 
159
-	$sort =  get_str("sort", true);
160
-	$r = get_str("r", true);
161
-
162
-	if (empty($sort)) $sort = "name";
163
-	// check for allowed keys
164
-	if ((strcmp($sort, "name")!=0) &&
165
-		(strcmp($sort, "data_size")!=0) &&
166
-		(strcmp($sort, "index_size")!=0) &&
167
-		(strcmp($sort, "total_size")!=0)  &&
168
-		(strcmp($sort, "rows")!=0) &&
169
-		(strcmp($sort, "size_per_row")!=0)
159
+    $sort =  get_str("sort", true);
160
+    $r = get_str("r", true);
161
+
162
+    if (empty($sort)) $sort = "name";
163
+    // check for allowed keys
164
+    if ((strcmp($sort, "name")!=0) &&
165
+        (strcmp($sort, "data_size")!=0) &&
166
+        (strcmp($sort, "index_size")!=0) &&
167
+        (strcmp($sort, "total_size")!=0)  &&
168
+        (strcmp($sort, "rows")!=0) &&
169
+        (strcmp($sort, "size_per_row")!=0)
170 170
     ) {
171
-		$sort = "name";
171
+        $sort = "name";
172 172
     }
173
-	if (empty($r)) $r=0;
174
-
175
-	for ($i=0; $i < sizeof($db_rec)-1; $i++){
176
-		$file_details["name"]         = $db_rec[$i]->name;
177
-		$file_details["data_size"]    = $db_rec[$i]->data_size;
178
-		$file_details["index_size"]   = $db_rec[$i]->index_size;
179
-		$file_details["total_size"]   = $db_rec[$i]->total_size;
180
-	    $file_details["rows"]         = $db_rec[$i]->rows;
181
-		$file_details["size_per_row"] = $db_rec[$i]->size_per_row;
182
-
183
-		$file_list[$i] = $file_details;
184
-		$key = strtolower($file_details[$sort]);
185
-		$file_sort[$i] = $key;
186
-	}
187
-
188
-	if ($r) {
173
+    if (empty($r)) $r=0;
174
+
175
+    for ($i=0; $i < sizeof($db_rec)-1; $i++){
176
+        $file_details["name"]         = $db_rec[$i]->name;
177
+        $file_details["data_size"]    = $db_rec[$i]->data_size;
178
+        $file_details["index_size"]   = $db_rec[$i]->index_size;
179
+        $file_details["total_size"]   = $db_rec[$i]->total_size;
180
+        $file_details["rows"]         = $db_rec[$i]->rows;
181
+        $file_details["size_per_row"] = $db_rec[$i]->size_per_row;
182
+
183
+        $file_list[$i] = $file_details;
184
+        $key = strtolower($file_details[$sort]);
185
+        $file_sort[$i] = $key;
186
+    }
187
+
188
+    if ($r) {
189 189
         arsort($file_sort);
190 190
     } else {
191 191
         asort($file_sort);
192 192
     }
193 193
 
194
-	echo "<table cols=6>";
195
-	echo "<tr>";
196
-	echo "<th colspan=6> Database $db_name </th>";
197
-	echo "</tr>";
194
+    echo "<table cols=6>";
195
+    echo "<tr>";
196
+    echo "<th colspan=6> Database $db_name </th>";
197
+    echo "</tr>";
198 198
 
199
-	echo "<tr>";
200
-	echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
201
-	echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
202
-	echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
203
-	echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
204
-	echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
205
-	echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
206
-	echo "</tr>";
199
+    echo "<tr>";
200
+    echo "<th><a href='dbinfo.php?sort=name&r=" . (!$r) . "'>Table </a></th>";
201
+    echo "<th><a href='dbinfo.php?sort=data_size&r=" . (!$r) . "'>Data Size</a></th>";
202
+    echo "<th><a href='dbinfo.php?sort=index_size&r=" . (!$r) . "'>Index Size</a></th>";
203
+    echo "<th><a href='dbinfo.php?sort=total_size&r=" . (!$r) . "'>Total Size</a></th>";
204
+    echo "<th><a href='dbinfo.php?sort=rows&r=" . (!$r) . "'>Total Rows</a></th>";
205
+    echo "<th><a href='dbinfo.php?sort=size_per_row&r=" . (!$r) . "'>Avg. Size per Row</a></th>";
206
+    echo "</tr>";
207 207
 
208 208
     foreach ($file_sort as $key=>$value) {
209
-		$value = $file_list[$key];
209
+        $value = $file_list[$key];
210 210
 
211
-		echo "<tr>";
212
-		echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
213
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
214
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
215
-		echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
211
+        echo "<tr>";
212
+        echo "<td align=left valign=top class=fieldname>" . $value["name"] . "</td>";
213
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["data_size"])  . "</td>";
214
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["index_size"]) . "</td>";
215
+        echo "<td align=left valign=top class=fieldname>" . size_format($value["total_size"]) . "</td>";
216 216
         echo "<td align=left valign=top class=fieldname>" . number_format($value["rows"])     . "</td>";
217 217
         echo "<td align=left valign=top class=fieldname>" . size_format($value["size_per_row"]) . "</td>";
218
-		echo "</tr>";
219
-	}
218
+        echo "</tr>";
219
+    }
220 220
 
221
-	// Last record is a summary
222
-	$i = sizeof($db_rec)-1;
223
-	echo "<tr>";
221
+    // Last record is a summary
222
+    $i = sizeof($db_rec)-1;
223
+    echo "<tr>";
224 224
     echo "<th align=left>" . $db_rec[$i]->name . "</th>";
225 225
     echo "<th align=left>" . size_format($db_rec[$i]->data_size)  . "</th>";
226 226
     echo "<th align=left>" . size_format($db_rec[$i]->index_size) . "</th>";
227 227
     echo "<th align=left>" . size_format($db_rec[$i]->total_size) . "</th>";
228 228
     echo "<th align=left>" . number_format($db_rec[$i]->rows)     . "</th>";
229 229
     echo "<th align=left></th>";
230
-	echo "</tr>";
230
+    echo "</tr>";
231 231
 
232 232
     echo "</table>";
233 233
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc 1 patch
Indentation   +965 added lines, -965 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
  * The structure of the general preferences form
16 16
  */
17 17
 function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = FALSE) {
18
-  $form = array();
19
-  $prefs = null;
20
-  $established = TRUE;
18
+    $form = array();
19
+    $prefs = null;
20
+    $established = TRUE;
21 21
 
22
-  // Enable AHAH form support for dynamically updating content based on preset
23
-  ahah_helper_register($form, $form_state);
22
+    // Enable AHAH form support for dynamically updating content based on preset
23
+    ahah_helper_register($form, $form_state);
24 24
 
25
-  if (!$prefs_preset) {
25
+    if (!$prefs_preset) {
26 26
     if (isset($form_state['storage']['prefs']['preset'])) {
27
-      $prefs_preset = $form_state['storage']['prefs']['preset'];
27
+        $prefs_preset = $form_state['storage']['prefs']['preset'];
28 28
     }
29 29
 
30 30
     // Load preferences from BOINC account
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     // Take note if this is not an established preference set on the account
34 34
     if (isset($prefs['@attributes']['cleared'])) {
35
-      $established = FALSE;
35
+        $established = FALSE;
36 36
     }
37 37
 
38 38
     // Determine if a preset is selected or if these are custom settings
@@ -47,45 +47,45 @@  discard block
 block discarded – undo
47 47
             $prefs_preset = $prefs['preset']['@value'];
48 48
         }
49 49
     }// if !$prefs_preset
50
-  }
51
-  // Extract mod_time tag if present, because it will be erased with
52
-  // boincwork_get_preset_prefs() below.
53
-  $mod_time = null;
54
-  if (isset($prefs['mod_time']['@value'])) {
55
-      $mod_time = $prefs['mod_time']['@value'];
56
-  }
57
-
58
-  if (isset($form_state['storage']['wip'])) {
59
-      switch ($prefs_preset) {
60
-      case 'standard':
50
+    }
51
+    // Extract mod_time tag if present, because it will be erased with
52
+    // boincwork_get_preset_prefs() below.
53
+    $mod_time = null;
54
+    if (isset($prefs['mod_time']['@value'])) {
55
+        $mod_time = $prefs['mod_time']['@value'];
56
+    }
57
+
58
+    if (isset($form_state['storage']['wip'])) {
59
+        switch ($prefs_preset) {
60
+        case 'standard':
61 61
       case 'maximum':
62 62
       case 'green':
63 63
       case 'minimum':
64 64
           $prefs = boincwork_get_preset_prefs($prefs_preset);
65
-          break;
66
-      case 'custom':
65
+            break;
66
+        case 'custom':
67 67
       default:
68 68
           // Just keeps prefs as they are
69 69
           unset($prefs['preset']);
70
-          break;
71
-      }// switch
72
-  } else {
73
-      $form_state['storage']['wip'] = TRUE;
74
-      if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75
-          if ($established) {
76
-              $prefs_preset = 'custom';
77
-          } else {
78
-              $prefs_preset = 'standard';
79
-              $prefs = boincwork_get_preset_prefs($prefs_preset);
80
-          }// if $established
81
-      }// if $prefs_preset
82
-  }// if WIP
83
-
84
-  // This set of preferences is used in the form if no preferences
85
-  // have been set above, in variable $prefs.
86
-  require_boinc(array('db', 'prefs'));
87
-  $disk_space_config = get_disk_space_config();
88
-  $default = array(
70
+            break;
71
+        }// switch
72
+    } else {
73
+        $form_state['storage']['wip'] = TRUE;
74
+        if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75
+            if ($established) {
76
+                $prefs_preset = 'custom';
77
+            } else {
78
+                $prefs_preset = 'standard';
79
+                $prefs = boincwork_get_preset_prefs($prefs_preset);
80
+            }// if $established
81
+        }// if $prefs_preset
82
+    }// if WIP
83
+
84
+    // This set of preferences is used in the form if no preferences
85
+    // have been set above, in variable $prefs.
86
+    require_boinc(array('db', 'prefs'));
87
+    $disk_space_config = get_disk_space_config();
88
+    $default = array(
89 89
     'preset' => $prefs_preset,
90 90
     // Processing...
91 91
     'run_on_batteries' => 0,
@@ -120,385 +120,385 @@  discard block
 block discarded – undo
120 120
     'daily_xfer_limit_mb' => 0,
121 121
     'daily_xfer_period_days' => 0,
122 122
     'dont_verify_images' => 0
123
-  );
124
-  foreach ($default as $name => $value) {
123
+    );
124
+    foreach ($default as $name => $value) {
125 125
     if (isset($prefs[$name])) {
126
-      if (is_array($prefs[$name])) {
126
+        if (is_array($prefs[$name])) {
127 127
         if (isset($prefs[$name]['@value'])) {
128
-          $default[$name] = $prefs[$name]['@value'];
128
+            $default[$name] = $prefs[$name]['@value'];
129
+        }
129 130
         }
130
-      }
131
-      else {
131
+        else {
132 132
         $default[$name] = $prefs[$name];
133
-      }
133
+        }
134
+    }
134 135
     }
135
-  }
136 136
 
137
-  // Standard option sets
138
-  $form['boolean_options'] = array(
137
+    // Standard option sets
138
+    $form['boolean_options'] = array(
139 139
     '#type' => 'value',
140 140
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
141
-  );
142
-  $form['hour_options'] = array(
141
+    );
142
+    $form['hour_options'] = array(
143 143
     '#type' => 'value',
144 144
     '#value' => array('0:00','1:00','2:00','3:00','4:00',
145
-     '5:00','6:00','7:00','8:00','9:00','10:00','11:00',
146
-     '12:00','13:00','14:00','15:00','16:00','17:00',
147
-     '18:00','19:00','20:00','21:00','22:00','23:00')
148
-  );
145
+        '5:00','6:00','7:00','8:00','9:00','10:00','11:00',
146
+        '12:00','13:00','14:00','15:00','16:00','17:00',
147
+        '18:00','19:00','20:00','21:00','22:00','23:00')
148
+    );
149 149
 
150
-  // Identify preference sets that are established to distinguish what has been
151
-  // saved to the database from what is just showing default values
152
-  $form['#established'] = $established;
150
+    // Identify preference sets that are established to distinguish what has been
151
+    // saved to the database from what is just showing default values
152
+    $form['#established'] = $established;
153 153
 
154
-  // Set up the preference container for AHAH
155
-  $form['prefs'] = array(
154
+    // Set up the preference container for AHAH
155
+    $form['prefs'] = array(
156 156
     '#title' => '',
157 157
     '#type' => 'fieldset',
158 158
     '#prefix' => '<div id="prefs-wrapper">', // This is our wrapper div.
159 159
     '#attributes' => array('class' => 'ahah-container'),
160 160
     '#suffix' => '</div>',
161 161
     '#tree'   => TRUE
162
-  );
163
-  //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
162
+    );
163
+    //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
164 164
 
165
-  // Hidden elements
166
-  $form['prefs']['modified'] = array(
165
+    // Hidden elements
166
+    $form['prefs']['modified'] = array(
167 167
     '#type' => 'hidden',
168 168
     '#value' => $mod_time
169
-  );
170
-  $form['prefs']['venue'] = array(
169
+    );
170
+    $form['prefs']['venue'] = array(
171 171
     '#type' => 'hidden',
172 172
     '#value' => $venue
173
-  );
173
+    );
174 174
 
175
-  $form['prefs']['separator_top'] = array(
175
+    $form['prefs']['separator_top'] = array(
176 176
     '#value' => '<div class="separator"></div>'
177
-  );
177
+    );
178 178
 
179
-  // Simplified selectors
180
-  $form['prefs']['preset'] = array(
181
-      '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
179
+    // Simplified selectors
180
+    $form['prefs']['preset'] = array(
181
+        '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
182 182
     '#type' => 'radios',
183 183
     '#description' => ' ',
184 184
     '#options' => array(
185
-      'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
-      'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
-      'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
-      'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
-      'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
185
+        'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
+        'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
+        'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
+        'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
+        'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
190 190
     ),
191 191
     '#prefix' => '<div class="simple-form-controls">',
192 192
     '#suffix' => '</div>',
193 193
     '#default_value' => $default['preset'],
194 194
     '#ahah' => array(
195
-      'event' => 'change',
196
-      'path' => ahah_helper_path(array('prefs')),
197
-      'wrapper' => 'prefs-wrapper'
195
+        'event' => 'change',
196
+        'path' => ahah_helper_path(array('prefs')),
197
+        'wrapper' => 'prefs-wrapper'
198 198
     )
199
-  );
200
-  $form['prefs']['select preset'] = array(
199
+    );
200
+    $form['prefs']['select preset'] = array(
201 201
     '#type'  => 'submit',
202 202
     '#value' => bts('Update preset', array(), NULL, 'boinc:account-preferences-preset'),
203 203
     '#submit' => array('ahah_helper_generic_submit'),
204 204
     // The 'no-js' class only displays this button if javascript is disabled
205 205
     '#attributes' => array('class' => 'no-js'),
206
-  );
206
+    );
207 207
 
208
-  // Advanced preferences
209
-  $form['prefs']['advanced'] = array(
208
+    // Advanced preferences
209
+    $form['prefs']['advanced'] = array(
210 210
     '#title' => bts('Advanced settings', array(), NULL, 'boinc:account-preferences-option'),
211 211
     '#type' => 'fieldset',
212 212
     '#description' => '',
213 213
     '#collapsible' => TRUE,
214 214
     '#collapsed' => !$advanced,
215 215
     '#attributes' => array('class' => 'advanced-settings'),
216
-  );
216
+    );
217 217
 
218
-  // Processing preferences
218
+    // Processing preferences
219 219
 
220
-  $form['prefs']['advanced']['anchor'] = array(
220
+    $form['prefs']['advanced']['anchor'] = array(
221 221
     '#value' => '<a name="advanced"></a>'
222
-  );
222
+    );
223 223
 
224
-  $form['prefs']['advanced']['separator_top'] = array(
224
+    $form['prefs']['advanced']['separator_top'] = array(
225 225
     '#value' => '<div class="separator"></div>'
226
-  );
226
+    );
227 227
 
228
-  $form['prefs']['advanced']['processor'] = array(
228
+    $form['prefs']['advanced']['processor'] = array(
229 229
     '#title' => bts('Processor usage', array(), NULL, 'boinc:account-preferences-computing'),
230 230
     '#type' => 'fieldset',
231 231
     '#description' => '',
232 232
     '#collapsible' => FALSE,
233 233
     '#collapsed' => FALSE
234
-  );
235
-  $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
234
+    );
235
+    $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
236 236
     '#title' => bts('Suspend when computer is on battery?', array(), NULL, 'boinc:account-preferences-computing'),
237 237
     '#type' => 'radios',
238 238
     '#description' => bts('Suspends computing on portables when running on battery power.', array(), NULL, 'boinc:account-preferences-computing'),
239 239
     '#options' => $form['boolean_options']['#value'],
240 240
     '#attributes' => array('class' => 'fancy'),
241 241
     '#default_value' => ($default['run_on_batteries']) ? 0 : 1 // intentional inversion of setting
242
-  );
243
-  $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
242
+    );
243
+    $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
244 244
     '#title' => bts('Suspend when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
245 245
     '#type' => 'radios',
246 246
     '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
247 247
     '#options' => $form['boolean_options']['#value'],
248 248
     '#attributes' => array('class' => 'fancy'),
249 249
     '#default_value' => ($default['run_if_user_active']) ? 0 : 1 // intentional inversion of setting
250
-  );
251
-  $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
250
+    );
251
+    $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
252 252
     '#title' => bts('Suspend GPU computing when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
253 253
     '#type' => 'radios',
254 254
     '#description' => bts("Suspends GPU computing when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
255 255
     '#options' => $form['boolean_options']['#value'],
256 256
     '#attributes' => array('class' => 'fancy'),
257 257
     '#default_value' => ($default['run_gpu_if_user_active']) ? 0 : 1 // intentional inversion of setting
258
-  );
259
-  $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
-      '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
258
+    );
259
+    $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
+        '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
261 261
     '#type' => 'textfield',
262 262
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
263 263
     '#default_value' => $default['idle_time_to_run'],
264 264
     '#size' => 1,
265 265
     '#description' => bts('This determines when the computer is considered "in use".', array(), NULL, 'boinc:account-preferences-computing')
266
-  );
267
-  $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
266
+    );
267
+    $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
268 268
     '#title' => bts('Suspend when no mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
269 269
     '#type' => 'textfield',
270 270
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
271 271
     '#default_value' => $default['suspend_if_no_recent_input'],
272 272
     '#size' => 1,
273 273
     '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), NULL, 'boinc:account-preferences-computing')
274
-  );
275
-  $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
274
+    );
275
+    $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
276 276
     '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), NULL, 'boinc:account-preferences-computing'),
277 277
     '#type' => 'textfield',
278 278
     '#field_suffix' => '%',
279 279
     '#default_value' => $default['suspend_cpu_usage'],
280 280
     '#size' => 1,
281 281
     '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), NULL, 'boinc:account-preferences-computing'),
282
-  );
283
-  $form['prefs']['advanced']['processor']['hour_label'] = array(
282
+    );
283
+    $form['prefs']['advanced']['processor']['hour_label'] = array(
284 284
     '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
285
-  );
286
-  $form['prefs']['advanced']['processor']['start_hour'] = array(
285
+    );
286
+    $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
288 288
     '#options' => $form['hour_options']['#value'],
289 289
     '#default_value' => $default['start_hour']
290
-  );
291
-  $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
290
+    );
291
+    $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292 292
     '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
293
-  );
294
-  $form['prefs']['advanced']['processor']['end_hour'] = array(
293
+    );
294
+    $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
296 296
     '#options' => $form['hour_options']['#value'],
297 297
     '#default_value' => $default['end_hour']
298
-  );
299
-  $form['prefs']['advanced']['processor']['hour_description'] = array(
298
+    );
299
+    $form['prefs']['advanced']['processor']['hour_description'] = array(
300 300
     '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
301
-  );
302
-  $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
301
+    );
302
+    $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303 303
     '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), NULL, 'boinc:account-preferences-computing'),
304 304
     '#type' => 'radios',
305 305
     '#options' => $form['boolean_options']['#value'],
306 306
     '#attributes' => array('class' => 'fancy'),
307 307
     '#default_value' => $default['leave_apps_in_memory'],
308 308
     '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), NULL, 'boinc:account-preferences-computing')
309
-  );
310
-  $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
309
+    );
310
+    $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
311 311
     '#title' => bts('Switch between tasks every', array(), NULL, 'boinc:account-preferences-computing'),
312 312
     '#type' => 'textfield',
313 313
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
314 314
     '#default_value' => $default['cpu_scheduling_period_minutes'],
315 315
     '#size' => 1,
316 316
     '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), NULL, 'boinc:account-preferences-computing')
317
-  );
318
-  $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
317
+    );
318
+    $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
319 319
     '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
320 320
     '#type' => 'textfield',
321 321
     '#field_suffix' => bts('% of the processors', array(), NULL, 'boinc:account-preferences-computing'),
322 322
     '#default_value' => $default['max_ncpus_pct'],
323 323
     '#size' => 1,
324 324
     '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), NULL, 'boinc:account-preferences-computing'),
325
-  );
326
-  $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
325
+    );
326
+    $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
327 327
     '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
328 328
     '#type' => 'textfield',
329 329
     '#field_suffix' => bts('% of the CPU time', array(), NULL, 'boinc:account-preferences-computing'),
330 330
     '#default_value' => $default['cpu_usage_limit'],
331 331
     '#size' => 1,
332 332
     '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), NULL, 'boinc:account-preferences-computing')
333
-  );
333
+    );
334 334
 
335
-  // Disk and memory preferences
336
-  $form['prefs']['advanced']['storage'] = array(
335
+    // Disk and memory preferences
336
+    $form['prefs']['advanced']['storage'] = array(
337 337
     '#title' => bts('Disk and memory usage', array(), NULL, 'boinc:account-preferences-computing'),
338 338
     '#type' => 'fieldset',
339 339
     '#description' => '',
340 340
     '#collapsible' => FALSE,
341 341
     '#collapsed' => FALSE
342
-  );
343
-  $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
342
+    );
343
+    $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
344 344
     '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
345 345
     '#type' => 'textfield',
346 346
     '#field_suffix' => 'GB',
347 347
     '#default_value' => $default['disk_max_used_gb'],
348 348
     '#size' => 1,
349 349
     '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), NULL, 'boinc:account-preferences-computing'),
350
-  );
351
-  $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
350
+    );
351
+    $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
352 352
     '#title' => bts('Disk: leave at least', array(), NULL, 'boinc:account-preferences-computing'),
353 353
     '#type' => 'textfield',
354 354
     '#field_suffix' => 'GB free',
355 355
     '#default_value' => $default['disk_min_free_gb'],
356 356
     '#size' => 1,
357 357
     '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), NULL, 'boinc:account-preferences-computing'),
358
-  );
359
-  $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
358
+    );
359
+    $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
360 360
     '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
361 361
     '#type' => 'textfield',
362 362
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
363 363
     '#default_value' => $default['disk_max_used_pct'],
364 364
     '#size' => 1,
365 365
     '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), NULL, 'boinc:account-preferences-computing')
366
-  );
367
-  $form['prefs']['advanced']['storage']['disk_interval'] = array(
366
+    );
367
+    $form['prefs']['advanced']['storage']['disk_interval'] = array(
368 368
     '#title' => bts('Request tasks to checkpoint at most every', array(), NULL, 'boinc:account-preferences-computing'),
369 369
     '#type' => 'textfield',
370 370
     '#field_suffix' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
371 371
     '#default_value' => $default['disk_interval'],
372 372
     '#size' => 1,
373 373
     '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), NULL, 'boinc:account-preferences-computing')
374
-  );
375
-  $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
374
+    );
375
+    $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
376 376
     '#title' => bts('Page/swap file: use at most', array(), NULL, 'boinc:account-preferences-computing'),
377 377
     '#type' => 'textfield',
378 378
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
379 379
     '#default_value' => $default['vm_max_used_pct'],
380 380
     '#size' => 1,
381 381
     '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), NULL, 'boinc:account-preferences-computing')
382
-  );
383
-  $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
382
+    );
383
+    $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
384 384
     '#title' => bts('Memory: when computer is in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
385 385
     '#type' => 'textfield',
386 386
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
387 387
     '#default_value' => $default['ram_max_used_busy_pct'],
388 388
     '#size' => 1,
389 389
     '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing')
390
-  );
391
-  $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
390
+    );
391
+    $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
392 392
     '#title' => bts('Memory: when computer is not in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
393 393
     '#type' => 'textfield',
394 394
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
395 395
     '#default_value' => $default['ram_max_used_idle_pct'],
396 396
     '#size' => 1,
397 397
     '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), NULL, 'boinc:account-preferences-computing')
398
-  );
398
+    );
399 399
 
400
-  // Network preferences
401
-  $form['prefs']['advanced']['network'] = array(
400
+    // Network preferences
401
+    $form['prefs']['advanced']['network'] = array(
402 402
     '#title' => bts('Network usage', array(), NULL, 'boinc:account-preferences-computing'),
403 403
     '#type' => 'fieldset',
404 404
     '#description' => '',
405 405
     '#collapsible' => FALSE,
406 406
     '#collapsed' => FALSE
407
-  );
408
-  $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
407
+    );
408
+    $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
409 409
     '#title' => bts('Store at least', array(), NULL, 'boinc:account-preferences-computing'),
410 410
     '#type' => 'textfield',
411 411
     '#field_suffix' => bts('days of work', array(), NULL, 'boinc:account-preferences-computing'),
412 412
     '#default_value' => $default['work_buf_min_days'],
413 413
     '#size' => 1,
414 414
     '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), NULL, 'boinc:account-preferences-computing')
415
-  );
416
-  $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
415
+    );
416
+    $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
417 417
     '#title' => bts('Store up to an additional', array(), NULL, 'boinc:account-preferences-computing'),
418 418
     '#type' => 'textfield',
419 419
     '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
420 420
     '#default_value' => $default['work_buf_additional_days'],
421 421
     '#size' => 1,
422 422
     '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), NULL, 'boinc:account-preferences-computing')
423
-  );
424
-  $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
423
+    );
424
+    $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
425 425
     '#title' => bts('Confirm before connecting to Internet?', array(), NULL, 'boinc:account-preferences-computing'),
426 426
     '#type' => 'radios',
427 427
     '#options' => $form['boolean_options']['#value'],
428 428
     '#attributes' => array('class' => 'fancy'),
429 429
     '#default_value' => $default['confirm_before_connecting'],
430 430
     '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
431
-  );
432
-  $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
431
+    );
432
+    $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
433 433
     '#title' => bts('Disconnect when done?', array(), NULL, 'boinc:account-preferences-computing'),
434 434
     '#type' => 'radios',
435 435
     '#options' => $form['boolean_options']['#value'],
436 436
     '#attributes' => array('class' => 'fancy'),
437 437
     '#default_value' => $default['hangup_if_dialed'],
438 438
     '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
439
-  );
440
-  $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
439
+    );
440
+    $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
441 441
     '#title' => bts('Limit download rate to', array(), NULL, 'boinc:account-preferences-computing'),
442 442
     '#type' => 'textfield',
443 443
     '#field_suffix' => 'Kbytes/sec',
444 444
     '#default_value' => $default['max_bytes_sec_down']/1000,
445 445
     '#size' => 1,
446 446
     '#description' => bts('Limit the download rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
447
-  );
448
-  $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
447
+    );
448
+    $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
449 449
     '#title' => bts('Limit upload rate to', array(), NULL, 'boinc:account-preferences-computing'),
450 450
     '#type' => 'textfield',
451 451
     '#field_suffix' => 'Kbytes/sec',
452 452
     '#default_value' => $default['max_bytes_sec_up']/1000,
453 453
     '#size' => 1,
454 454
     '#description' => bts('Limit the upload rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
455
-  );
456
-  $form['prefs']['advanced']['network']['hour_label'] = array(
455
+    );
456
+    $form['prefs']['advanced']['network']['hour_label'] = array(
457 457
     '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
458
-  );
459
-  $form['prefs']['advanced']['network']['net_start_hour'] = array(
458
+    );
459
+    $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
461 461
     '#options' => $form['hour_options']['#value'],
462 462
     '#default_value' => $default['net_start_hour']
463
-  );
464
-  $form['prefs']['advanced']['network']['hour_delimiter'] = array(
463
+    );
464
+    $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465 465
     '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
466
-  );
467
-  $form['prefs']['advanced']['network']['net_end_hour'] = array(
466
+    );
467
+    $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
469 469
     '#options' => $form['hour_options']['#value'],
470 470
     '#default_value' => $default['net_end_hour']
471
-  );
472
-  $form['prefs']['advanced']['network']['hour_description'] = array(
471
+    );
472
+    $form['prefs']['advanced']['network']['hour_description'] = array(
473 473
     '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
474
-  );
475
-  $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
474
+    );
475
+    $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476 476
     '#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
477 477
     '#type' => 'textfield',
478 478
     '#field_suffix' => 'Mbytes',
479 479
     '#default_value' => $default['daily_xfer_limit_mb'],
480 480
     '#size' => 1
481
-  );
482
-  $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
481
+    );
482
+    $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
483 483
     '#field_prefix' => 'every',
484 484
     '#type' => 'textfield',
485 485
     '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
486 486
     '#default_value' => $default['daily_xfer_period_days'],
487 487
     '#size' => 1,
488 488
     '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), NULL, 'boinc:account-preferences-computing'),
489
-  );
490
-  $form['prefs']['advanced']['network']['dont_verify_images'] = array(
489
+    );
490
+    $form['prefs']['advanced']['network']['dont_verify_images'] = array(
491 491
     '#title' => bts('Skip data verification for image files?', array(), NULL, 'boinc:account-preferences-computing'),
492 492
     '#type' => 'radios',
493 493
     '#options' => $form['boolean_options']['#value'],
494 494
     '#attributes' => array('class' => 'fancy'),
495 495
     '#default_value' => $default['dont_verify_images'],
496 496
     '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), NULL, 'boinc:account-preferences-computing')
497
-  );
497
+    );
498 498
 
499
-  // The "fancy radios" are made via javascript on document load. In order for
500
-  // these to work with AHAH, we need this crazy setTimeout() call.
501
-  $form['prefs']['fancy-radios'] = array(
499
+    // The "fancy radios" are made via javascript on document load. In order for
500
+    // these to work with AHAH, we need this crazy setTimeout() call.
501
+    $form['prefs']['fancy-radios'] = array(
502 502
     '#value' => '
503 503
       <script>
504 504
         setTimeout(
@@ -509,177 +509,177 @@  discard block
 block discarded – undo
509 509
           300
510 510
         )
511 511
       </script>'
512
-  );
513
-  $form['prefs']['view advanced'] = array(
512
+    );
513
+    $form['prefs']['view advanced'] = array(
514 514
     '#type' => 'hidden',
515 515
     '#value' => 1
516
-  );
516
+    );
517 517
 
518
-  $form['prefs']['separator_bottom'] = array(
518
+    $form['prefs']['separator_bottom'] = array(
519 519
     '#value' => '<div class="separator buttons"></div>'
520
-  );
520
+    );
521 521
 
522
-  // Form control
523
-  $form['prefs']['form control tabs prefix'] = array(
522
+    // Form control
523
+    $form['prefs']['form control tabs prefix'] = array(
524 524
     '#value' => '<ul class="form-control tab-list">'
525
-  );
526
-  $form['prefs']['submit'] = array(
525
+    );
526
+    $form['prefs']['submit'] = array(
527 527
     '#prefix' => '<li class="first tab">',
528 528
     '#type' => 'submit',
529 529
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
530 530
     '#suffix' => '</li>'
531
-  );
532
-  $form['prefs']['form control tabs'] = array(
531
+    );
532
+    $form['prefs']['form control tabs'] = array(
533 533
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
534
-  );
535
-  if ($venue AND $venue != 'generic') {
534
+    );
535
+    if ($venue AND $venue != 'generic') {
536 536
     global $base_path;
537 537
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
538
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
538
+        l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541
-          'attributes' => array(
540
+            'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541
+            'attributes' => array(
542 542
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
544
-          )
543
+                array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
544
+            )
545 545
         )
546
-      ) . '</li>';
547
-  }
548
-  $form['prefs']['view control'] = array(
546
+        ) . '</li>';
547
+    }
548
+    $form['prefs']['view control'] = array(
549 549
     '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
550
-  );
551
-  $form['prefs']['form control tabs suffix'] = array(
550
+    );
551
+    $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
553
-  );
554
-  $form['#submit'][] = 'boincwork_generalprefs_form_submit';
553
+    );
554
+    $form['#submit'][] = 'boincwork_generalprefs_form_submit';
555 555
 
556
-  return $form;
556
+    return $form;
557 557
 }
558 558
 
559 559
 /**
560
-  * Validate the general preferences form.
561
-  */
560
+ * Validate the general preferences form.
561
+ */
562 562
 function boincwork_generalprefs_form_validate($form, &$form_state) {
563
-  require_boinc('util');
564
-  $values = $form_state['values']['prefs']['advanced'];
565
-
566
-  //drupal_set_message('<pre>' . print_r($form_state['values'], true) . '</pre>');
567
-  // Verify all non-boolean user input values and notify form API of failures
568
-
569
-  // Processing preferences
570
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
578
-
579
-  // Storage preferences
580
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
587
-
588
-  // Network preferences
589
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
563
+    require_boinc('util');
564
+    $values = $form_state['values']['prefs']['advanced'];
565
+
566
+    //drupal_set_message('<pre>' . print_r($form_state['values'], true) . '</pre>');
567
+    // Verify all non-boolean user input values and notify form API of failures
568
+
569
+    // Processing preferences
570
+    if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
+    if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
+    if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
+    if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
+    if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
+    if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
+    if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
+    if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
578
+
579
+    // Storage preferences
580
+    if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
+    if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
+    if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
+    if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
+    if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
+    if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
+    if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
587
+
588
+    // Network preferences
589
+    if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
+    if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
+    if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
+    if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
+    if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
+    if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
+    if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
+    if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
597 597
 }
598 598
 
599 599
 /**
600
-  * Handle post-validation submission of general preferences form.
601
-  */
600
+ * Handle post-validation submission of general preferences form.
601
+ */
602 602
 function boincwork_generalprefs_form_submit($form, &$form_state) {
603
-  global $user;
604
-  $account = user_load($user->uid);
605
-
606
-  $values = $form_state['values']['prefs']['advanced'];
607
-  $venue = $form_state['values']['prefs']['venue'];
608
-  $preset = $form_state['values']['prefs']['preset'];
609
-
610
-  // Load preferences from BOINC account
611
-  $prefs = boincwork_load_prefs('general', $venue);
612
-
613
-  // Processing preferences
614
-  $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
615
-  $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
616
-  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
617
-  $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
618
-  $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
619
-  $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
620
-  $prefs['start_hour'] = $values['processor']['start_hour'];
621
-  $prefs['end_hour'] = $values['processor']['end_hour'];
622
-  $prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
623
-  $prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
624
-  $prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
625
-  $prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
626
-
627
-  // Storage preferences
628
-  $prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
629
-  $prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
630
-  $prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
631
-  $prefs['disk_interval'] = $values['storage']['disk_interval'];
632
-  $prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
633
-  $prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
634
-  $prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
635
-
636
-  // Network preferences
637
-  $prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
638
-  $prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
639
-  $prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
640
-  $prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
641
-  $prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
642
-  $prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
643
-  $prefs['net_start_hour'] = $values['network']['net_start_hour'];
644
-  $prefs['net_end_hour'] = $values['network']['net_end_hour'];
645
-  $prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
646
-  $prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
647
-  $prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
648
-
649
-  // transform old way to store the preset into new way
650
-  // ideally this should already have happened in boincwork_generalprefs_form()
651
-  if (isset($prefs['@attributes']['preset'])) {
603
+    global $user;
604
+    $account = user_load($user->uid);
605
+
606
+    $values = $form_state['values']['prefs']['advanced'];
607
+    $venue = $form_state['values']['prefs']['venue'];
608
+    $preset = $form_state['values']['prefs']['preset'];
609
+
610
+    // Load preferences from BOINC account
611
+    $prefs = boincwork_load_prefs('general', $venue);
612
+
613
+    // Processing preferences
614
+    $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
615
+    $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
616
+    $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
617
+    $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
618
+    $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
619
+    $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
620
+    $prefs['start_hour'] = $values['processor']['start_hour'];
621
+    $prefs['end_hour'] = $values['processor']['end_hour'];
622
+    $prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
623
+    $prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
624
+    $prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
625
+    $prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
626
+
627
+    // Storage preferences
628
+    $prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
629
+    $prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
630
+    $prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
631
+    $prefs['disk_interval'] = $values['storage']['disk_interval'];
632
+    $prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
633
+    $prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
634
+    $prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
635
+
636
+    // Network preferences
637
+    $prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
638
+    $prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
639
+    $prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
640
+    $prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
641
+    $prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
642
+    $prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
643
+    $prefs['net_start_hour'] = $values['network']['net_start_hour'];
644
+    $prefs['net_end_hour'] = $values['network']['net_end_hour'];
645
+    $prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
646
+    $prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
647
+    $prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
648
+
649
+    // transform old way to store the preset into new way
650
+    // ideally this should already have happened in boincwork_generalprefs_form()
651
+    if (isset($prefs['@attributes']['preset'])) {
652 652
     $prefs['preset'] = $prefs['@attributes']['preset'];
653 653
     unset($prefs['@attributes']['preset']);
654
-  }
655
-  // Save the preset selection (or lack thereof)
656
-  if (!$preset OR $preset == 'custom') {
654
+    }
655
+    // Save the preset selection (or lack thereof)
656
+    if (!$preset OR $preset == 'custom') {
657 657
     $prefs['preset'] = 'custom';
658
-  }
659
-  else {
658
+    }
659
+    else {
660 660
     $prefs['preset'] = $preset;
661
-  }
661
+    }
662 662
 
663
-  // If this is a new preference set, be sure to unset the "cleared" attribute
664
-  if (isset($prefs['@attributes']['cleared'])) {
663
+    // If this is a new preference set, be sure to unset the "cleared" attribute
664
+    if (isset($prefs['@attributes']['cleared'])) {
665 665
     unset($prefs['@attributes']['cleared']);
666
-  }
666
+    }
667 667
 
668
-  // Update database
669
-  $result = boincwork_save_prefs($prefs, 'general', $venue);
668
+    // Update database
669
+    $result = boincwork_save_prefs($prefs, 'general', $venue);
670 670
 
671
-  if (!$result) {
671
+    if (!$result) {
672 672
     watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
673 673
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
674
-  }
675
-  elseif (!drupal_get_messages('status', FALSE)) {
674
+    }
675
+    elseif (!drupal_get_messages('status', FALSE)) {
676 676
     // Show this message if the set wasn't created automatically (in which case
677 677
     // there is a message tailored to that) {
678 678
     drupal_set_message(t('Your preferences have been updated.
679 679
       Client-related preferences will take effect when your computer
680 680
       communicates with @project or you issue the "Update"
681 681
       command from the BOINC client.', array('@project' => PROJECT)));
682
-  }
682
+    }
683 683
 }
684 684
 
685 685
 
@@ -691,116 +691,116 @@  discard block
 block discarded – undo
691 691
  * Find compatible hosts for merging
692 692
  */
693 693
 function boincwork_host_get_compatible_hosts($host_id) {
694
-  require_boinc('host');
695
-  global $user;
696
-  $account = user_load($user->uid);
697
-  $compatible_hosts = array();
698
-  $host_count = 0;
699
-  db_set_active('boinc_ro');
700
-  $current_host = db_fetch_object(db_query("
694
+    require_boinc('host');
695
+    global $user;
696
+    $account = user_load($user->uid);
697
+    $compatible_hosts = array();
698
+    $host_count = 0;
699
+    db_set_active('boinc_ro');
700
+    $current_host = db_fetch_object(db_query("
701 701
     SELECT id, domain_name, create_time, total_credit, rpc_time, os_name,
702 702
       p_vendor, p_model
703 703
     FROM {host}
704 704
     WHERE userid = '%d' AND id = '%d'",
705 705
     $account->boincuser_id, $host_id
706
-  ));
707
-  db_set_active('default');
708
-  $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
-  $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
710
-  // Get the list of all other hosts owned by this user for comparison
711
-  db_set_active('boinc_ro');
712
-  $all_other_hosts = db_query("
706
+    ));
707
+    db_set_active('default');
708
+    $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
+    $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
710
+    // Get the list of all other hosts owned by this user for comparison
711
+    db_set_active('boinc_ro');
712
+    $all_other_hosts = db_query("
713 713
     SELECT id, domain_name, create_time, total_credit, rpc_time, os_name,
714 714
       p_vendor, p_model
715 715
     FROM {host}
716 716
     WHERE userid = '%d' AND id <> '%d'",
717 717
     $account->boincuser_id, $host_id
718
-  );
719
-  db_set_active('default');
720
-  // Compare all hosts to see if any are plausible duplicates
721
-  while ($other_host = db_fetch_object($all_other_hosts)) {
718
+    );
719
+    db_set_active('default');
720
+    // Compare all hosts to see if any are plausible duplicates
721
+    while ($other_host = db_fetch_object($all_other_hosts)) {
722 722
     // First, disqualify if hosts were active at the same time
723 723
     if (!$current_host->is_new) {
724
-      $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
-      $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
726
-      if (!$other_host->is_new) {
724
+        $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
+        $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
726
+        if (!$other_host->is_new) {
727 727
         // If both hosts being compared are not new, see if times overlap
728 728
         if (!times_disjoint($current_host, $other_host)) {
729
-          // Hosts were active at the same time; can't be a duplicate
730
-          continue;
729
+            // Hosts were active at the same time; can't be a duplicate
730
+            continue;
731
+        }
731 732
         }
732
-      }
733 733
     }
734 734
     // Next, disqualify if hosts have different OS platforms
735 735
     if (!os_compatible($current_host, $other_host)) {
736
-      // Hosts have different OS platforms; not really a duplicate
737
-      continue;
736
+        // Hosts have different OS platforms; not really a duplicate
737
+        continue;
738 738
     }
739 739
     // Finally, disqualify if hosts have different CPUs
740 740
     if (!cpus_compatible($current_host, $other_host)) {
741
-      // CPUs don't match; not a duplicate
742
-      continue;
741
+        // CPUs don't match; not a duplicate
742
+        continue;
743 743
     }
744 744
     // If not disqualified, this host is available for merging
745 745
     $hosts[] = $other_host;
746 746
     $host_count++;
747 747
     if ($host_count == 500) {
748
-      // This is enough!
749
-      break;
748
+        // This is enough!
749
+        break;
750 750
     }
751
-  }
752
-  return $hosts;
751
+    }
752
+    return $hosts;
753 753
 }
754 754
 
755 755
 /**
756 756
  * Perform the database updates to merge the old host into the new host
757 757
  */
758 758
 function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
759
-  // Decay the average credit of the two hosts
760
-  require_boinc('credit');
761
-  $now = time();
762
-  update_average($now, 0, 0, $old_host->expavg_credit, $old_host->expavg_time);
763
-  update_average($now, 0, 0, $new_host->expavg_credit, $new_host->expavg_time);
759
+    // Decay the average credit of the two hosts
760
+    require_boinc('credit');
761
+    $now = time();
762
+    update_average($now, 0, 0, $old_host->expavg_credit, $old_host->expavg_time);
763
+    update_average($now, 0, 0, $new_host->expavg_credit, $new_host->expavg_time);
764 764
 
765
-  // Update the database:
766
-  // - add credit from old host to new host
767
-  // - change results to refer to the new host
768
-  // - put old host in "zombie" state (userid=0, rpc_seqno=[new_host_id])
765
+    // Update the database:
766
+    // - add credit from old host to new host
767
+    // - change results to refer to the new host
768
+    // - put old host in "zombie" state (userid=0, rpc_seqno=[new_host_id])
769 769
 
770
-  $total_credit = $old_host->total_credit + $new_host->total_credit;
771
-  $recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
770
+    $total_credit = $old_host->total_credit + $new_host->total_credit;
771
+    $recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
772 772
 
773
-  if ($new_host->rpc_seqno == $old_host->id) {
773
+    if ($new_host->rpc_seqno == $old_host->id) {
774 774
     rules_invoke_event('boincwork_circular_merge_error', $old_host->id, $new_host->id, variable_get('boinc_admin_mailing_list_subject_tag', ''));
775 775
     watchdog('boincwork',
776
-      'Circular merge attempted, target host rpc_seqno is equal to old host\'s id: old host id=%old_host, target host id=%new_host',
777
-      array(
776
+        'Circular merge attempted, target host rpc_seqno is equal to old host\'s id: old host id=%old_host, target host id=%new_host',
777
+        array(
778 778
         '%old_host' => $old_host->id,
779 779
         '%new_host' => $new_host->id,
780
-      ),
781
-      WATCHDOG_WARNING
780
+        ),
781
+        WATCHDOG_WARNING
782 782
     );
783 783
     $message = 'Could not merge due to a circular merge error. The site administrators have been contacted about this issue, and will investigate further.';
784 784
     return FALSE;
785
-  }
785
+    }
786 786
 
787
-  if ($new_host->userid==0) {
787
+    if ($new_host->userid==0) {
788 788
     rules_invoke_event('boincwork_zombie_merge_error', $old_host->id, $new_host->id, variable_get('boinc_admin_mailing_list_subject_tag', ''));
789 789
     watchdog('boincwork',
790
-      'Zombie merge attempted, target host has userid=0: old host id=%old_host, target host id=%new_host',
791
-      array(
790
+        'Zombie merge attempted, target host has userid=0: old host id=%old_host, target host id=%new_host',
791
+        array(
792 792
         '%old_host' => $old_host->id,
793 793
         '%new_host' => $new_host->id,
794
-      ),
795
-      WATCHDOG_WARNING
794
+        ),
795
+        WATCHDOG_WARNING
796 796
     );
797 797
     $message = 'Could not merge because the target host has userid=0. The site administrators have been contacted about this issue, and will investigate further.';
798 798
     return FALSE;
799
-  }
799
+    }
800 800
 
801
-  // Move credit from the old host to the new host
802
-  db_set_active('boinc_rw');
803
-  $credit_updated = db_query("
801
+    // Move credit from the old host to the new host
802
+    db_set_active('boinc_rw');
803
+    $credit_updated = db_query("
804 804
     UPDATE {host}
805 805
     SET
806 806
       total_credit = '%d',
@@ -808,34 +808,34 @@  discard block
 block discarded – undo
808 808
       expavg_time = '%d'
809 809
     WHERE id = '%d'",
810 810
     $total_credit, $recent_credit, $now, $new_host->id
811
-  );
812
-  db_set_active('default');
813
-  if (!$credit_updated) {
811
+    );
812
+    db_set_active('default');
813
+    if (!$credit_updated) {
814 814
     if ($message !== NULL) {
815
-      $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
815
+        $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
816 816
     }
817 817
     return FALSE;
818
-  }
818
+    }
819 819
 
820
-  // Move results from the old host to the new host
821
-  db_set_active('boinc_rw');
822
-  $results_updated = db_query("
820
+    // Move results from the old host to the new host
821
+    db_set_active('boinc_rw');
822
+    $results_updated = db_query("
823 823
     UPDATE {result}
824 824
     SET hostid = '%d'
825 825
     WHERE hostid = '%d'",
826 826
     $new_host->id, $old_host->id
827
-  );
828
-  db_set_active('default');
829
-  if (!$results_updated) {
827
+    );
828
+    db_set_active('default');
829
+    if (!$results_updated) {
830 830
     if ($message !== NULL) {
831
-      $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
831
+        $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
832 832
     }
833 833
     return FALSE;
834
-  }
834
+    }
835 835
 
836
-  // Retire the old host
837
-  db_set_active('boinc_rw');
838
-  $old_host_retired = db_query("
836
+    // Retire the old host
837
+    db_set_active('boinc_rw');
838
+    $old_host_retired = db_query("
839 839
     UPDATE {host}
840 840
     SET
841 841
       total_credit = '0',
@@ -844,16 +844,16 @@  discard block
 block discarded – undo
844 844
       rpc_seqno = '%d'
845 845
     WHERE id = '%d'",
846 846
     $new_host->id, $old_host->id
847
-  );
848
-  db_set_active('default');
849
-  if (!$old_host_retired) {
847
+    );
848
+    db_set_active('default');
849
+    if (!$old_host_retired) {
850 850
     if ($message !== NULL) {
851
-      $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
851
+        $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
852 852
     }
853 853
     return FALSE;
854
-  }
854
+    }
855 855
 
856
-  return TRUE;
856
+    return TRUE;
857 857
 }
858 858
 
859 859
 /**
@@ -861,75 +861,75 @@  discard block
 block discarded – undo
861 861
  */
862 862
 function boincwork_host_merge_form(&$form_state, $host_id) {
863 863
 
864
-  if (!boincwork_host_user_is_owner($host_id)) {
864
+    if (!boincwork_host_user_is_owner($host_id)) {
865 865
     drupal_goto("host/{$host_id}");
866
-  }
866
+    }
867 867
 
868
-  $form = array();
869
-  $form_state['storage']['current_host_id'] = $host_id;
870
-  $current_host = boincwork_host_get_info($host_id);
868
+    $form = array();
869
+    $form_state['storage']['current_host_id'] = $host_id;
870
+    $current_host = boincwork_host_get_info($host_id);
871 871
 
872
-  // Get hosts that could be merged with this one
873
-  $hosts = boincwork_host_get_compatible_hosts($host_id);
872
+    // Get hosts that could be merged with this one
873
+    $hosts = boincwork_host_get_compatible_hosts($host_id);
874 874
 
875
-  if (!$hosts) {
875
+    if (!$hosts) {
876 876
     drupal_set_message(t('There are no computers eligible for merging with this
877 877
       one'), 'warning'
878 878
     );
879 879
     drupal_goto("host/{$host_id}");
880
-  }
880
+    }
881 881
 
882
-  $form['overview'] = array(
882
+    $form['overview'] = array(
883 883
     '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
884
-      . ' the same computer by mistake. You can correct this by merging old'
885
-      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
886
-      . '<p>'
887
-      . bts('Check the computers that are the same as @name'
888
-      . ' (created on @date at @time with computer ID @id)',
884
+        . ' the same computer by mistake. You can correct this by merging old'
885
+        . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
886
+        . '<p>'
887
+        . bts('Check the computers that are the same as @name'
888
+        . ' (created on @date at @time with computer ID @id)',
889 889
         array(
890
-          '@name' => $current_host->domain_name,
891
-          '@date' => date('j M Y', $current_host->create_time),
892
-          '@time' => date('G:i:s T', $current_host->create_time),
893
-          '@id' => $current_host->id,
890
+            '@name' => $current_host->domain_name,
891
+            '@date' => date('j M Y', $current_host->create_time),
892
+            '@time' => date('G:i:s T', $current_host->create_time),
893
+            '@id' => $current_host->id,
894 894
         ),
895 895
         NULL, 'boinc:account-host-merge') . '</p>',
896
-  );
896
+    );
897 897
 
898
-  $options = array();
899
-  foreach ($hosts as $host) {
898
+    $options = array();
899
+    foreach ($hosts as $host) {
900 900
     $options[$host->id] = array(
901
-      $host->domain_name,
902
-      date('j M Y G:i:s T', $host->create_time),
903
-      $host->id,
901
+        $host->domain_name,
902
+        date('j M Y G:i:s T', $host->create_time),
903
+        $host->id,
904 904
     );
905
-  }
905
+    }
906 906
 
907
-  $form['merge'] = array(
907
+    $form['merge'] = array(
908 908
     '#title' => '',
909 909
     '#type' => 'tableselect',
910 910
     '#header' => array(bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), NULL, 'boinc:host-details'), bts('Computer ID', array(), NULL, 'boinc:host-list')),
911 911
     '#options' => $options,
912
-  );
912
+    );
913 913
 
914
-  $form['prefs']['separator_bottom'] = array(
915
-  //  '#value' => '<div class="separator buttons"></div>'
916
-  );
914
+    $form['prefs']['separator_bottom'] = array(
915
+    //  '#value' => '<div class="separator buttons"></div>'
916
+    );
917 917
 
918
-  // Form control
919
-  $form['prefs']['form control tabs prefix'] = array(
918
+    // Form control
919
+    $form['prefs']['form control tabs prefix'] = array(
920 920
     '#value' => '<ul class="form-control tab-list">'
921
-  );
922
-  $form['prefs']['submit'] = array(
921
+    );
922
+    $form['prefs']['submit'] = array(
923 923
     '#prefix' => '<li class="first tab">',
924 924
     '#type' => 'submit',
925 925
     '#value' => bts('Merge', array(), NULL, 'boinc:form-merge'),
926 926
     '#suffix' => '</li>'
927
-  );
928
-  $form['prefs']['form control tabs'] = array(
927
+    );
928
+    $form['prefs']['form control tabs'] = array(
929 929
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
930
-  );
930
+    );
931 931
 
932
-  return $form;
932
+    return $form;
933 933
 }
934 934
 
935 935
 /**
@@ -942,76 +942,76 @@  discard block
 block discarded – undo
942 942
  * Handle submission of the merge host form
943 943
  */
944 944
 function boincwork_host_merge_form_submit($form, &$form_state) {
945
-  $merged = array();
946
-  $errors = array();
947
-  $current_host_id = $form_state['storage']['current_host_id'];
948
-  $current_host = boincwork_host_get_info($current_host_id);
949
-  $selected_hosts = array_filter($form_state['values']['merge']);
945
+    $merged = array();
946
+    $errors = array();
947
+    $current_host_id = $form_state['storage']['current_host_id'];
948
+    $current_host = boincwork_host_get_info($current_host_id);
949
+    $selected_hosts = array_filter($form_state['values']['merge']);
950 950
 
951
-  foreach ($selected_hosts as $host_id) {
951
+    foreach ($selected_hosts as $host_id) {
952 952
     // Attempt to merge each host, noting the results
953 953
     $message = '';
954 954
     $old_host = boincwork_host_get_info($host_id);
955 955
     if (boincwork_host_merge($old_host, $current_host, $message)) {
956
-      $merged[$old_host->id] = $old_host->id;
957
-      $current_host = boincwork_host_get_info($current_host_id);
956
+        $merged[$old_host->id] = $old_host->id;
957
+        $current_host = boincwork_host_get_info($current_host_id);
958 958
     }
959 959
     else {
960
-      $errors[$old_host->id] = $message;
960
+        $errors[$old_host->id] = $message;
961
+    }
961 962
     }
962
-  }
963 963
 
964
-  if ($merged) {
964
+    if ($merged) {
965 965
     // Generate a natural language list of IDs that were merged
966 966
     $oxford_comma = ',';
967 967
     $conjunction = bts('and', array(), NULL, 'boinc:account-preference');
968 968
     $list = array_keys($merged);
969 969
     $last = array_pop($list);
970 970
     if ($list) {
971
-      if (count($merged) == 2) {
971
+        if (count($merged) == 2) {
972 972
         $oxford_comma = '';
973
-      }
974
-      $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
973
+        }
974
+        $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
975 975
     }
976 976
     else {
977
-      $list = $last;
977
+        $list = $last;
978 978
     }
979 979
     if (count($merged) == 1) {
980
-      drupal_set_message(bts(
980
+        drupal_set_message(bts(
981 981
         'Computer @old_id has been merged successfully into @id.',
982 982
         array(
983
-          '@old_id' => $list,
984
-          '@id' => $current_host_id
983
+            '@old_id' => $list,
984
+            '@id' => $current_host_id
985 985
         ),
986 986
         NULL, 'boinc:account-host-merge'));
987 987
     }
988 988
     else {
989
-      drupal_set_message(bts(
989
+        drupal_set_message(bts(
990 990
         'Computers @old_ids have been merged successfully into @id.',
991 991
         array(
992
-          '@old_ids' => $list,
993
-          '@id' => $current_host_id
992
+            '@old_ids' => $list,
993
+            '@id' => $current_host_id
994 994
         ),
995 995
         NULL, 'boinc:account-host-merge'));
996 996
     }
997
-  }
997
+    }
998 998
 
999
-  if ($errors) {
999
+    if ($errors) {
1000 1000
     // Report any hosts that failed to merge
1001 1001
     foreach ($errors as $id => $error) {
1002
-      drupal_set_message(
1002
+        drupal_set_message(
1003 1003
         bts('Computer @old_id failed to merge: @message',
1004
-          array(
1004
+            array(
1005 1005
             '@old_id' => $id,
1006 1006
             '@message' => $error,
1007
-          ),
1008
-          NULL, 'boinc:account-host-merge'),
1007
+            ),
1008
+            NULL, 'boinc:account-host-merge'),
1009 1009
         'warning'
1010
-      );
1010
+        );
1011
+    }
1011 1012
     }
1012
-  }
1013 1013
 
1014
-  drupal_goto("host/{$current_host_id}");
1014
+    drupal_goto("host/{$current_host_id}");
1015 1015
 }
1016 1016
 
1017 1017
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -1023,44 +1023,44 @@  discard block
 block discarded – undo
1023 1023
  */
1024 1024
 function boincwork_projectprefs_form(&$form_state, $venue) {
1025 1025
 
1026
-  global $user;
1027
-  $account = user_load($user->uid);
1026
+    global $user;
1027
+    $account = user_load($user->uid);
1028 1028
 
1029
-  $established = TRUE;
1029
+    $established = TRUE;
1030 1030
 
1031
-  // Get availability of special BOINC preferences
1032
-  require_boinc(array('util'));
1033
-  $app_types = get_app_types();
1031
+    // Get availability of special BOINC preferences
1032
+    require_boinc(array('util'));
1033
+    $app_types = get_app_types();
1034 1034
 
1035
-  // Load any existing preferences from BOINC account
1036
-  $prefs = boincwork_load_prefs('project', $venue);
1035
+    // Load any existing preferences from BOINC account
1036
+    $prefs = boincwork_load_prefs('project', $venue);
1037 1037
 
1038
-  // Take note if this is not an established preference set on the account
1039
-  if (isset($prefs['@attributes']['cleared'])) {
1038
+    // Take note if this is not an established preference set on the account
1039
+    if (isset($prefs['@attributes']['cleared'])) {
1040 1040
     $established = FALSE;
1041
-  }
1041
+    }
1042 1042
 
1043
-  // Extract modified tag if present
1044
-  $modified = NULL;
1045
-  if (isset($prefs['modified']['@value'])) {
1043
+    // Extract modified tag if present
1044
+    $modified = NULL;
1045
+    if (isset($prefs['modified']['@value'])) {
1046 1046
     $modified = $prefs['modified']['@value'];
1047
-  }
1047
+    }
1048 1048
 
1049
-  $venue_is_default = FALSE;
1050
-  if ($account->boincuser_default_pref_set) {
1049
+    $venue_is_default = FALSE;
1050
+    if ($account->boincuser_default_pref_set) {
1051 1051
     if ($account->boincuser_default_pref_set == $venue) {
1052
-      $venue_is_default = TRUE;
1052
+        $venue_is_default = TRUE;
1053 1053
     }
1054
-  }
1055
-  elseif (!$venue OR $venue == 'generic') {
1054
+    }
1055
+    elseif (!$venue OR $venue == 'generic') {
1056 1056
     $venue_is_default = TRUE;
1057
-  }
1058
-  else {
1057
+    }
1058
+    else {
1059 1059
     $venue_is_default = FALSE;
1060
-  }
1060
+    }
1061 1061
 
1062
-  // Define form defaults
1063
-  $default = array(
1062
+    // Define form defaults
1063
+    $default = array(
1064 1064
     'resource_share' => 100,
1065 1065
     'no_cpu' => 0,
1066 1066
     'no_cuda' => 0,
@@ -1069,344 +1069,344 @@  discard block
 block discarded – undo
1069 1069
     'no_apple_gpu' => 0,
1070 1070
     'default_venue' => $venue_is_default,
1071 1071
     'allow_beta_work' => $prefs['allow_beta_work'],
1072
-  );
1073
-  foreach ($default as $name => $value) {
1072
+    );
1073
+    foreach ($default as $name => $value) {
1074 1074
     if (isset($prefs[$name])) {
1075
-      if (is_array($prefs[$name])) {
1075
+        if (is_array($prefs[$name])) {
1076 1076
         if (isset($prefs[$name]['@value'])) {
1077
-          $default[$name] = $prefs[$name]['@value'];
1077
+            $default[$name] = $prefs[$name]['@value'];
1078
+        }
1078 1079
         }
1079
-      }
1080
-      else {
1080
+        else {
1081 1081
         $default[$name] = $prefs[$name];
1082
-      }
1082
+        }
1083
+    }
1083 1084
     }
1084
-  }
1085 1085
 
1086
-  // Standard option sets
1087
-  $form['boolean_options'] = array(
1086
+    // Standard option sets
1087
+    $form['boolean_options'] = array(
1088 1088
     '#type' => 'value',
1089 1089
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1090
-  );
1090
+    );
1091 1091
 
1092
-  // Identify preference sets that are established to distinguish what has been
1093
-  // saved to the database from what is just showing default values
1094
-  $form['#established'] = $established;
1092
+    // Identify preference sets that are established to distinguish what has been
1093
+    // saved to the database from what is just showing default values
1094
+    $form['#established'] = $established;
1095 1095
 
1096
-  // Top level form options
1097
-  $form['#tree'] = TRUE;
1096
+    // Top level form options
1097
+    $form['#tree'] = TRUE;
1098 1098
 
1099
-  // Hidden elements
1100
-  $form['modified'] = array(
1099
+    // Hidden elements
1100
+    $form['modified'] = array(
1101 1101
     '#type' => 'hidden',
1102 1102
     '#value' => $modified,
1103
-  );
1104
-  $form['venue'] = array(
1103
+    );
1104
+    $form['venue'] = array(
1105 1105
     '#type' => 'hidden',
1106 1106
     '#value' => $venue,
1107
-  );
1107
+    );
1108 1108
 
1109
-  $form['separator_top'] = array(
1109
+    $form['separator_top'] = array(
1110 1110
     '#value' => '<div class="separator"></div>'
1111
-  );
1111
+    );
1112 1112
 
1113
-  // Common project preferences
1114
-  $form['resource'] = array(
1113
+    // Common project preferences
1114
+    $form['resource'] = array(
1115 1115
     '#title' => bts('Resource settings', array(), NULL, 'boinc:account-preferences-project'),
1116 1116
     '#type' => 'fieldset',
1117 1117
     '#description' => null,
1118 1118
     '#collapsible' => TRUE,
1119 1119
     '#collapsed' => FALSE
1120
-  );
1121
-  $form['resource']['resource_share'] = array(
1120
+    );
1121
+    $form['resource']['resource_share'] = array(
1122 1122
     '#title' => bts('Resource share', array(), NULL, 'boinc:account-preferences-project'),
1123 1123
     '#type' => 'textfield',
1124 1124
     '#default_value' => $default['resource_share'],
1125 1125
     '#size' => 5,
1126 1126
     '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), NULL, 'boinc:account-preferences-project')
1127
-  );
1128
-  if ($app_types->count > 1) {
1127
+    );
1128
+    if ($app_types->count > 1) {
1129 1129
     if ($app_types->cpu) {
1130
-      $form['resource']['no_cpu'] = array(
1130
+        $form['resource']['no_cpu'] = array(
1131 1131
         '#title' => bts('Use CPU', array(), NULL, 'boinc:account-preferences-project'),
1132 1132
         '#type' => 'radios',
1133 1133
         '#options' => $form['boolean_options']['#value'],
1134 1134
         '#attributes' => array('class' => 'fancy'),
1135 1135
         '#default_value' => $default['no_cpu'] ? 0 : 1,
1136 1136
         '#description' => bts('Request CPU-only tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1137
-      );
1137
+        );
1138 1138
     }
1139 1139
     if ($app_types->cuda) {
1140
-      $form['resource']['no_cuda'] = array(
1140
+        $form['resource']['no_cuda'] = array(
1141 1141
         '#title' => bts('Use NVIDIA GPU', array(), NULL, 'boinc:account-preferences-project'),
1142 1142
         '#type' => 'radios',
1143 1143
         '#options' => $form['boolean_options']['#value'],
1144 1144
         '#attributes' => array('class' => 'fancy'),
1145 1145
         '#default_value' => $default['no_cuda'] ? 0 : 1,
1146 1146
         '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1147
-      );
1147
+        );
1148 1148
     }
1149 1149
     if ($app_types->ati) {
1150
-      $form['resource']['no_ati'] = array(
1150
+        $form['resource']['no_ati'] = array(
1151 1151
         '#title' => bts('Use AMD GPU', array(), NULL, 'boinc:account-preferences-project'),
1152 1152
         '#type' => 'radios',
1153 1153
         '#options' => $form['boolean_options']['#value'],
1154 1154
         '#attributes' => array('class' => 'fancy'),
1155 1155
         '#default_value' => $default['no_ati'] ? 0 : 1,
1156 1156
         '#description' => bts('Request AMD GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1157
-      );
1157
+        );
1158 1158
     }
1159 1159
     if ($app_types->intel_gpu) {
1160
-      $form['resource']['no_intel_gpu'] = array(
1160
+        $form['resource']['no_intel_gpu'] = array(
1161 1161
         '#title' => bts('Use INTEL GPU', array(), NULL, 'boinc:account-preferences-project'),
1162 1162
         '#type' => 'radios',
1163 1163
         '#options' => $form['boolean_options']['#value'],
1164 1164
         '#attributes' => array('class' => 'fancy'),
1165 1165
         '#default_value' => $default['no_intel_gpu'] ? 0 : 1,
1166 1166
         '#description' => bts('Request Intel GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1167
-      );
1167
+        );
1168 1168
     }
1169 1169
     if ($app_types->apple_gpu) {
1170
-      $form['resource']['no_apple_gpu'] = array(
1170
+        $form['resource']['no_apple_gpu'] = array(
1171 1171
         '#title' => bts('Use Apple GPU', array(), NULL, 'boinc:account-preferences-project'),
1172 1172
         '#type' => 'radios',
1173 1173
         '#options' => $form['boolean_options']['#value'],
1174 1174
         '#attributes' => array('class' => 'fancy'),
1175 1175
         '#default_value' => $default['no_apple_gpu'] ? 0 : 1,
1176 1176
         '#description' => bts('Request Apple GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1177
-      );
1177
+        );
1178
+    }
1178 1179
     }
1179
-  }
1180 1180
 
1181
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1181
+    if (variable_get('boinc_prefs_options_beta', FALSE)) {
1182 1182
     $form['beta'] = array(
1183
-      '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1184
-      '#type' => 'fieldset',
1185
-      '#description' => null,
1186
-      '#collapsible' => TRUE,
1187
-      '#collapsed' => FALSE
1183
+        '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1184
+        '#type' => 'fieldset',
1185
+        '#description' => null,
1186
+        '#collapsible' => TRUE,
1187
+        '#collapsed' => FALSE
1188 1188
     );
1189 1189
     $form['beta']['allow_beta_work'] = array(
1190
-      '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1191
-      '#type' => 'radios',
1192
-      '#options' => $form['boolean_options']['#value'],
1193
-      '#attributes' => array('class' => 'fancy'),
1194
-      '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
-      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1190
+        '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1191
+        '#type' => 'radios',
1192
+        '#options' => $form['boolean_options']['#value'],
1193
+        '#attributes' => array('class' => 'fancy'),
1194
+        '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
+        '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1196 1196
     );
1197
-  }
1197
+    }
1198 1198
 
1199
-  // Add project specific prefs to the form
1200
-  boincwork_add_project_specific_prefs($form, $prefs);
1199
+    // Add project specific prefs to the form
1200
+    boincwork_add_project_specific_prefs($form, $prefs);
1201 1201
 
1202
-  // Set whether to use this preference set by default for new computers
1203
-  $form['default_set'] = array(
1202
+    // Set whether to use this preference set by default for new computers
1203
+    $form['default_set'] = array(
1204 1204
     '#title' => bts('Default set', array(), NULL, 'boinc:account-preferences-project'),
1205 1205
     '#type' => 'fieldset',
1206 1206
     '#description' => null,
1207 1207
     '#collapsible' => TRUE,
1208 1208
     '#collapsed' => FALSE
1209
-  );
1210
-  $form['default_set']['default_venue'] = array(
1209
+    );
1210
+    $form['default_set']['default_venue'] = array(
1211 1211
     '#title' => bts('Set used for new computers', array(), NULL, 'boinc:account-preferences-project'),
1212 1212
     '#type' => 'radios',
1213 1213
     '#options' => $form['boolean_options']['#value'],
1214 1214
     '#attributes' => array('class' => 'fancy'),
1215 1215
     '#default_value' => $default['default_venue'] ? 1 : 0,
1216 1216
     '#description' => ''
1217
-  );
1217
+    );
1218 1218
 
1219
-  $form['prefs']['separator_bottom'] = array(
1219
+    $form['prefs']['separator_bottom'] = array(
1220 1220
     '#value' => '<div class="separator buttons"></div>'
1221
-  );
1221
+    );
1222 1222
 
1223
-  // Form control
1224
-  $form['prefs']['form control tabs prefix'] = array(
1223
+    // Form control
1224
+    $form['prefs']['form control tabs prefix'] = array(
1225 1225
     '#value' => '<ul class="form-control tab-list">'
1226
-  );
1227
-  $form['prefs']['submit'] = array(
1226
+    );
1227
+    $form['prefs']['submit'] = array(
1228 1228
     '#prefix' => '<li class="first tab">',
1229 1229
     '#type' => 'submit',
1230 1230
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1231 1231
     '#suffix' => '</li>'
1232
-  );
1233
-  $form['prefs']['form control tabs'] = array(
1232
+    );
1233
+    $form['prefs']['form control tabs'] = array(
1234 1234
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1235
-  );
1236
-  if ($venue AND $venue != 'generic') {
1235
+    );
1236
+    if ($venue AND $venue != 'generic') {
1237 1237
     global $base_path;
1238 1238
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
1239
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1239
+        l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1240 1240
         array(
1241
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242
-          'attributes' => array(
1241
+            'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242
+            'attributes' => array(
1243 1243
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1244
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1245
-          )
1244
+                array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1245
+            )
1246 1246
         )
1247
-      ) . '</li>';
1248
-  }
1249
-  $form['prefs']['view control'] = array(
1250
-      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251
-  );
1252
-  $form['prefs']['form control tabs suffix'] = array(
1247
+        ) . '</li>';
1248
+    }
1249
+    $form['prefs']['view control'] = array(
1250
+        '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251
+    );
1252
+    $form['prefs']['form control tabs suffix'] = array(
1253 1253
     '#value' => '</ul>'
1254
-  );
1254
+    );
1255 1255
 
1256
-  return $form;
1256
+    return $form;
1257 1257
 }
1258 1258
 
1259 1259
 /**
1260 1260
  * Add project specific preferences to the project preferences form
1261 1261
  */
1262 1262
 function boincwork_add_project_specific_prefs(&$form, $prefs) {
1263
-  // Load project specific preferences from XML config
1264
-  $xml = boincwork_get_project_specific_config();
1263
+    // Load project specific preferences from XML config
1264
+    $xml = boincwork_get_project_specific_config();
1265 1265
 
1266
-  // Respect the order of the top level elements
1267
-  $ordered_array = array();
1268
-  $unordered_array = array();
1269
-  foreach ($xml['project_specific_preferences'] as $type => $element) {
1266
+    // Respect the order of the top level elements
1267
+    $ordered_array = array();
1268
+    $unordered_array = array();
1269
+    foreach ($xml['project_specific_preferences'] as $type => $element) {
1270 1270
     if (is_array($element) AND is_numeric(key($element))) {
1271
-      foreach ($element as $ordered_element) {
1271
+        foreach ($element as $ordered_element) {
1272 1272
         if (isset($ordered_element['@position'])) {
1273
-          $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
1273
+            $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
1274 1274
         }
1275 1275
         else {
1276
-          $unordered_array[] = array($type => $ordered_element);
1276
+            $unordered_array[] = array($type => $ordered_element);
1277
+        }
1277 1278
         }
1278
-      }
1279 1279
     }
1280 1280
     elseif (isset($element['@position'])) {
1281
-      $ordered_array[$element['@position']] = array($type => $element);
1281
+        $ordered_array[$element['@position']] = array($type => $element);
1282 1282
     }
1283 1283
     else {
1284
-      $unordered_array[] = array($type => $element);
1284
+        $unordered_array[] = array($type => $element);
1285 1285
     }
1286
-  }
1287
-  ksort($ordered_array);
1288
-  $primed_array = array_merge($ordered_array, $unordered_array);
1289
-  $xml = array('project_specific_preferences' => $primed_array);
1286
+    }
1287
+    ksort($ordered_array);
1288
+    $primed_array = array_merge($ordered_array, $unordered_array);
1289
+    $xml = array('project_specific_preferences' => $primed_array);
1290 1290
 
1291
-  foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1291
+    foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1292 1292
     $type = key($wrapped_element);
1293 1293
     $element= reset($wrapped_element);
1294 1294
     boincwork_generate_prefs_element($form, $type, $element, $prefs['project_specific']);
1295
-  }
1295
+    }
1296 1296
 }
1297 1297
 
1298 1298
 /**
1299
-  * Validate the project preferences form.
1300
-  */
1299
+ * Validate the project preferences form.
1300
+ */
1301 1301
 function boincwork_projectprefs_form_validate($form, &$form_state) {
1302 1302
 
1303
-  // Verify all text user input values and notify form API of failures
1304
-  $validation_rules = array(
1303
+    // Verify all text user input values and notify form API of failures
1304
+    $validation_rules = array(
1305 1305
     'resource' => array(
1306
-      'resource_share' => array(
1306
+        'resource_share' => array(
1307 1307
         'datatype' => 'integer',
1308 1308
         'min' => 0
1309
-      ),
1309
+        ),
1310 1310
     ),
1311
-  );
1311
+    );
1312 1312
 
1313
-  // Add validation rules for project specific settings
1314
-  $validation_rules += boincwork_get_project_specific_config_validation_rules();
1313
+    // Add validation rules for project specific settings
1314
+    $validation_rules += boincwork_get_project_specific_config_validation_rules();
1315 1315
 
1316
-  // Perform validation
1317
-  boincwork_validate_form($validation_rules, $form_state['values']);
1316
+    // Perform validation
1317
+    boincwork_validate_form($validation_rules, $form_state['values']);
1318 1318
 
1319
-  // Check for app validation
1320
-  if (isset($validation_rules['apps'])) {
1319
+    // Check for app validation
1320
+    if (isset($validation_rules['apps'])) {
1321 1321
     if (isset($validation_rules['apps']['minimum selected'])
1322 1322
         AND $validation_rules['apps']['minimum selected'] > 0) {
1323
-      $apps_selected = 0;
1324
-      foreach ($validation_rules['apps']['list'] as $app) {
1323
+        $apps_selected = 0;
1324
+        foreach ($validation_rules['apps']['list'] as $app) {
1325 1325
         if ($form_state['values']['applications'][$app]) $apps_selected++;
1326
-      }
1327
-      if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1326
+        }
1327
+        if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1328 1328
         form_set_error(
1329
-          'applications',
1330
-          bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1329
+            'applications',
1330
+            bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1331 1331
         );
1332
-      }
1333
-      if ($apps_selected == count($validation_rules['apps']['list'])) {
1332
+        }
1333
+        if ($apps_selected == count($validation_rules['apps']['list'])) {
1334 1334
         foreach ($validation_rules['apps']['list'] as $app) {
1335
-          unset($form_state['values']['applications'][$app]);
1335
+            unset($form_state['values']['applications'][$app]);
1336 1336
         }
1337 1337
         $form_state['storage']['all apps selected'] = TRUE;
1338
-      }
1338
+        }
1339
+    }
1339 1340
     }
1340
-  }
1341 1341
 }
1342 1342
 
1343 1343
 /**
1344
-  * Handle post-validation submission of project preferences form.
1345
-  */
1344
+ * Handle post-validation submission of project preferences form.
1345
+ */
1346 1346
 function boincwork_projectprefs_form_submit($form, &$form_state) {
1347
-  global $user;
1348
-  global $site_name;
1347
+    global $user;
1348
+    global $site_name;
1349 1349
 
1350
-  require_boinc(array('util'));
1351
-  $app_types = get_app_types();
1350
+    require_boinc(array('util'));
1351
+    $app_types = get_app_types();
1352 1352
 
1353
-  $account = user_load($user->uid);
1354
-  $edit = $form_state['values'];
1355
-  $venue = $edit['venue'];
1353
+    $account = user_load($user->uid);
1354
+    $edit = $form_state['values'];
1355
+    $venue = $edit['venue'];
1356 1356
 
1357
-  // Load preferences from BOINC account
1358
-  $prefs = boincwork_load_prefs('project', $venue);
1357
+    // Load preferences from BOINC account
1358
+    $prefs = boincwork_load_prefs('project', $venue);
1359 1359
 
1360
-  // Resource preferences
1361
-  $prefs['resource_share'] = $edit['resource']['resource_share'];
1362
-  if ($app_types->count > 1) {
1360
+    // Resource preferences
1361
+    $prefs['resource_share'] = $edit['resource']['resource_share'];
1362
+    if ($app_types->count > 1) {
1363 1363
     if ($app_types->cpu) $prefs['no_cpu'] = ($edit['resource']['no_cpu']) ? 0 : 1;
1364 1364
     if ($app_types->cuda) $prefs['no_cuda'] = ($edit['resource']['no_cuda']) ? 0 : 1;
1365 1365
     if ($app_types->ati) $prefs['no_ati'] = ($edit['resource']['no_ati']) ? 0 : 1;
1366 1366
     if ($app_types->intel_gpu) $prefs['no_intel_gpu'] = ($edit['resource']['no_intel_gpu']) ? 0 : 1;
1367 1367
     if ($app_types->apple_gpu) $prefs['no_apple_gpu'] = ($edit['resource']['no_apple_gpu']) ? 0 : 1;
1368
-  }
1368
+    }
1369 1369
 
1370
-  // Beta preferences
1371
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1370
+    // Beta preferences
1371
+    if (variable_get('boinc_prefs_options_beta', FALSE)) {
1372 1372
     $prefs['allow_beta_work'] = ($edit['beta']['allow_beta_work']) ? 1 : 0;
1373
-  }
1373
+    }
1374 1374
 
1375
-  // Load project specific preferences from XML config
1376
-  $xml = boincwork_get_project_specific_config();
1377
-  $updated_prefs = array(
1375
+    // Load project specific preferences from XML config
1376
+    $xml = boincwork_get_project_specific_config();
1377
+    $updated_prefs = array(
1378 1378
     'project_specific' => boincwork_format_project_specific_prefs_data($edit)
1379
-  );
1380
-  $prefs = $updated_prefs + $prefs;
1379
+    );
1380
+    $prefs = $updated_prefs + $prefs;
1381 1381
 
1382
-  // Don't specify apps if all are selected
1383
-  if (isset($form_state['storage']['all apps selected'])) {
1382
+    // Don't specify apps if all are selected
1383
+    if (isset($form_state['storage']['all apps selected'])) {
1384 1384
     unset($prefs['project_specific']['app_id']);
1385 1385
     unset($form_state['storage']['all apps selected']);
1386
-  }
1386
+    }
1387 1387
 
1388
-  // If this is a new preference set, be sure to unset the "cleared" attribute
1389
-  if (isset($prefs['@attributes']['cleared'])) {
1388
+    // If this is a new preference set, be sure to unset the "cleared" attribute
1389
+    if (isset($prefs['@attributes']['cleared'])) {
1390 1390
     unset($prefs['@attributes']['cleared']);
1391
-  }
1391
+    }
1392 1392
 
1393
-  // Save preferences back to the BOINC account
1394
-  $result = boincwork_save_prefs($prefs, 'project', $venue);
1393
+    // Save preferences back to the BOINC account
1394
+    $result = boincwork_save_prefs($prefs, 'project', $venue);
1395 1395
 
1396
-  // Update the user's default preference set
1397
-  if ($edit['default_set']['default_venue']) {
1396
+    // Update the user's default preference set
1397
+    if ($edit['default_set']['default_venue']) {
1398 1398
     boincwork_set_default_venue($venue);
1399
-  }
1400
-  elseif ($venue == $account->boincuser_default_pref_set) {
1399
+    }
1400
+    elseif ($venue == $account->boincuser_default_pref_set) {
1401 1401
     // User has cleared out the default venue setting
1402 1402
     boincwork_set_default_venue();
1403
-  }
1403
+    }
1404 1404
 
1405
-  if (!$result) {
1405
+    if (!$result) {
1406 1406
     watchdog('boincwork', 'Error updating project prefs for user @id: @message', array('@id' => $user->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
1407 1407
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
1408
-  }
1409
-  elseif (!drupal_get_messages('status', FALSE)) {
1408
+    }
1409
+    elseif (!drupal_get_messages('status', FALSE)) {
1410 1410
     // Show this message if the set wasn't created automatically (in which case
1411 1411
     // there is a message tailored to that)
1412 1412
     drupal_set_message(t('Your preferences have been updated.
@@ -1414,53 +1414,53 @@  discard block
 block discarded – undo
1414 1414
         communicates with @project or you issue the "Update"
1415 1415
         command from the BOINC client.',
1416 1416
         array('@project' => $site_name)));
1417
-  }
1417
+    }
1418 1418
 }
1419 1419
 
1420 1420
 /**
1421 1421
  * The structure of the community preferences form
1422 1422
  */
1423 1423
 function communityprefs_form(&$form_state) {
1424
-  global $user;
1425
-  $account = user_load($user->uid);
1426
-  $form = array();
1427
-
1428
-  // Pull in some elements from the profile form
1429
-  $profile_form_state = array();
1430
-  $profile = new stdClass();
1431
-  $profile->type = 'profile';
1432
-  $profile->language = '';
1433
-  if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1424
+    global $user;
1425
+    $account = user_load($user->uid);
1426
+    $form = array();
1427
+
1428
+    // Pull in some elements from the profile form
1429
+    $profile_form_state = array();
1430
+    $profile = new stdClass();
1431
+    $profile->type = 'profile';
1432
+    $profile->language = '';
1433
+    if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1434 1434
     $profile_node = node_load($profile_nid);
1435 1435
     $form_state['storage']['profile_node'] = $profile_node;
1436 1436
     module_load_include('inc', 'node', 'node.pages');
1437 1437
     $profile_form = drupal_retrieve_form('profile_node_form', $profile_form_state, $profile_node);
1438 1438
     drupal_prepare_form('profile_node_form', $profile_form, $profile_form_state);
1439
-  }
1439
+    }
1440 1440
 
1441
-  // Standard option sets
1442
-  $form['boolean_options'] = array(
1441
+    // Standard option sets
1442
+    $form['boolean_options'] = array(
1443 1443
     '#type' => 'value',
1444 1444
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1445
-  );
1445
+    );
1446 1446
 
1447
-  $default = array(
1447
+    $default = array(
1448 1448
     'pm_send_notification' => '', // This is set already in pm_email_notify_user
1449 1449
     'friend_notification' => isset($account->friend_notification) ? $account->friend_notification : 0,
1450 1450
     'comments_per_page' => (isset($account->comments_per_page) AND $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451 1451
     'comments_order' => (isset($account->sort) AND $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1452
-  );
1452
+    );
1453 1453
 
1454
-  // General options
1455
-  $form['general'] = array(
1454
+    // General options
1455
+    $form['general'] = array(
1456 1456
     '#type' => 'fieldset',
1457 1457
     '#title' => bts('General settings', array(), NULL, 'boinc:account-preferences-community'),
1458 1458
     '#weight' => 0,
1459 1459
     '#collapsible' => TRUE,
1460 1460
     '#collapsed' => FALSE
1461
-  );
1462
-  // Add the BOINC user name (non-unique, user editable)
1463
-  $form['general']['boincuser_name'] = array(
1461
+    );
1462
+    // Add the BOINC user name (non-unique, user editable)
1463
+    $form['general']['boincuser_name'] = array(
1464 1464
     '#type' => 'textfield',
1465 1465
     '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1466 1466
     '#default_value' => $account->boincuser_name,
@@ -1468,252 +1468,252 @@  discard block
 block discarded – undo
1468 1468
     '#required' => TRUE,
1469 1469
     '#description' => '',
1470 1470
     '#size' => 40
1471
-  );
1472
-  // Time zone
1473
-  if (variable_get('configurable_timezones', 1)) {
1471
+    );
1472
+    // Time zone
1473
+    if (variable_get('configurable_timezones', 1)) {
1474 1474
     $zones = _system_zonelist();
1475 1475
     $form['general']['timezone'] = array(
1476
-      '#type' => 'select',
1477
-      '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
-      '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1479
-      '#options' => $zones,
1480
-      '#description' => '',
1476
+        '#type' => 'select',
1477
+        '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
+        '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1479
+        '#options' => $zones,
1480
+        '#description' => '',
1481 1481
     );
1482
-  }
1482
+    }
1483 1483
 
1484
-  // Notification options
1485
-  $form['notifications'] = array(
1484
+    // Notification options
1485
+    $form['notifications'] = array(
1486 1486
     '#type' => 'fieldset',
1487 1487
     '#title' => bts('Notification settings', array(), NULL, 'boinc:account-preferences-community'),
1488 1488
     '#weight' => 5,
1489 1489
     '#collapsible' => TRUE,
1490 1490
     '#collapsed' => FALSE
1491
-  );
1492
-  // Pull in private message notification handling and tweak the form
1493
-  $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
1494
-  $form['notifications']['pm_send_notifications'] = array_replace(
1491
+    );
1492
+    // Pull in private message notification handling and tweak the form
1493
+    $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
1494
+    $form['notifications']['pm_send_notifications'] = array_replace(
1495 1495
     $pm_notify['enable_pm_mail']['pm_send_notifications'],
1496 1496
     array(
1497
-      '#type' => 'radios',
1498
-      '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1499
-      '#description' => ' ',
1500
-      '#options' => $form['boolean_options']['#value'],
1501
-      '#attributes' => array('class' => 'fancy')
1497
+        '#type' => 'radios',
1498
+        '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1499
+        '#description' => ' ',
1500
+        '#options' => $form['boolean_options']['#value'],
1501
+        '#attributes' => array('class' => 'fancy')
1502 1502
     )
1503
-  );
1504
-  $form['notifications']['friend_notification'] = array(
1503
+    );
1504
+    $form['notifications']['friend_notification'] = array(
1505 1505
     '#type' => 'radios',
1506 1506
     '#title' => bts('Receive email notification for friend requests?', array(), NULL, 'boinc:account-preferences-community'),
1507 1507
     '#description' => ' ',
1508 1508
     '#options' => array(0 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1509 1509
     '#attributes' => array('class' => 'fancy'),
1510 1510
     '#default_value' => $default['friend_notification']
1511
-  );
1511
+    );
1512 1512
 
1513
-  // Internationalization options
1514
-  if (module_exists('internationalization')) {
1513
+    // Internationalization options
1514
+    if (module_exists('internationalization')) {
1515 1515
     $languages = language_list('enabled');
1516 1516
     $languages = $languages[1];
1517 1517
     $names = array();
1518 1518
     foreach ($languages as $langcode => $item) {
1519
-      $name = t($item->name);
1520
-      $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1519
+        $name = t($item->name);
1520
+        $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1521 1521
     }
1522 1522
     $form['locale'] = array(
1523
-      '#type' => 'fieldset',
1524
-      '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1525
-      '#weight' => 10,
1526
-      '#collapsible' => TRUE,
1527
-      '#collapsed' => FALSE,
1523
+        '#type' => 'fieldset',
1524
+        '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1525
+        '#weight' => 10,
1526
+        '#collapsible' => TRUE,
1527
+        '#collapsed' => FALSE,
1528 1528
     );
1529 1529
 
1530 1530
     // Get language negotiation settings.
1531 1531
     $mode = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
1532 1532
     $user_preferred_language = user_preferred_language($account);
1533 1533
     $form['locale']['language'] = array(
1534
-      '#type' => 'select',
1535
-      '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1536
-      '#default_value' => check_plain($user_preferred_language->language),
1537
-      '#options' => $names,
1538
-      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1534
+        '#type' => 'select',
1535
+        '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1536
+        '#default_value' => check_plain($user_preferred_language->language),
1537
+        '#options' => $names,
1538
+        '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1539 1539
     );
1540
-  }
1540
+    }
1541 1541
 
1542
-  // Avatar options
1543
-  $form['gravatar'] = array(
1542
+    // Avatar options
1543
+    $form['gravatar'] = array(
1544 1544
     '#type' => 'item',
1545 1545
     '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1546 1546
     '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), NULL, 'boinc:account-preferences-community'),
1547
-  );
1548
-  if (user_access('disable own gravatar', $account)) {
1547
+    );
1548
+    if (user_access('disable own gravatar', $account)) {
1549 1549
     $form['gravatar'] = array(
1550
-      '#type' => 'checkbox',
1551
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
-      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1553
-      '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554
-      '#disabled' => !empty($account->picture),
1555
-    );
1556
-  }
1557
-  $form['gravatar']['#weight'] = 15;
1558
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1559
-  // Upload an avatar (pulled from profile_node_form):
1560
-  if (!empty($profile_form['field_image'])) {
1550
+        '#type' => 'checkbox',
1551
+        '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
+        '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1553
+        '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554
+        '#disabled' => !empty($account->picture),
1555
+    );
1556
+    }
1557
+    $form['gravatar']['#weight'] = 15;
1558
+    $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1559
+    // Upload an avatar (pulled from profile_node_form):
1560
+    if (!empty($profile_form['field_image'])) {
1561 1561
     $form['field_image'] = $profile_form['field_image'];
1562
-  }
1563
-  else {
1562
+    }
1563
+    else {
1564 1564
     $form['field_image'] = array(
1565
-      '#value' => '<div class="form-item">'
1565
+        '#value' => '<div class="form-item">'
1566 1566
         . '<label class="placeholder">'
1567 1567
         . bts('This is not available until your profile is set up.', array(), NULL, 'boinc:account-preferences-community')
1568 1568
         . '</label>'
1569 1569
         . l(bts('Create a profile', array(), NULL, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1570 1570
         . '</div>',
1571 1571
     );
1572
-  }
1573
-  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1574
-  $form['field_image']['#weight'] = 20;
1575
-  $form['field_image']['#suffix'] = '</fieldset>';
1572
+    }
1573
+    $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1574
+    $form['field_image']['#weight'] = 20;
1575
+    $form['field_image']['#suffix'] = '</fieldset>';
1576 1576
 
1577
-  // Forum options
1578
-  $form['forums'] = array(
1577
+    // Forum options
1578
+    $form['forums'] = array(
1579 1579
     '#type' => 'fieldset',
1580 1580
     '#title' => bts('Forum settings', array(), NULL, 'boinc:account-preferences-community'),
1581 1581
     '#weight' => 25,
1582 1582
     '#collapsible' => TRUE,
1583 1583
     '#collapsed' => FALSE
1584
-  );
1585
-  $form['forums']['comments_per_page'] = array(
1584
+    );
1585
+    $form['forums']['comments_per_page'] = array(
1586 1586
     '#type' => 'select',
1587 1587
     '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), NULL, 'boinc:account-preferences-community'),
1588 1588
     '#options' => array(10 => 10, 20 => 20, 30 => 30, 50 => 50, 100 => 100),
1589 1589
     '#default_value' => $default['comments_per_page']
1590
-  );
1591
-  // Can't have a typical Drupal form suffix on a select box?
1592
-  $form['forums']['comments_per_page_suffix'] = array(
1590
+    );
1591
+    // Can't have a typical Drupal form suffix on a select box?
1592
+    $form['forums']['comments_per_page_suffix'] = array(
1593 1593
     '#value' => '<span>' . bts('comments per page', array(), NULL, 'boinc:account-preferences-community') . '</span>'
1594
-  );
1595
-  $form['forums']['comments_order'] = array(
1594
+    );
1595
+    $form['forums']['comments_order'] = array(
1596 1596
     '#type' => 'select',
1597 1597
     '#title' => bts('Sort comments in discussions', array(), NULL, 'boinc:account-preferences-community'),
1598 1598
     '#options' => array(1 => bts('Newest post first', array(), NULL, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), NULL, 'boinc:account-preferences-community')),
1599 1599
     '#default_value' => $default['comments_order']
1600
-  );
1601
-  // Signature (pulled from user_edit_form):
1602
-  if (variable_get('user_signatures', 0) && module_exists('comment')) {
1600
+    );
1601
+    // Signature (pulled from user_edit_form):
1602
+    if (variable_get('user_signatures', 0) && module_exists('comment')) {
1603 1603
     $form['forums']['signature'] = array(
1604
-      '#type' => 'textarea',
1605
-      '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
-      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1607
-      '#default_value' => $account->signature
1608
-      );
1604
+        '#type' => 'textarea',
1605
+        '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
+        '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1607
+        '#default_value' => $account->signature
1608
+        );
1609 1609
     // Prevent a "validation error" message when the user attempts to save with a default value they
1610 1610
     // do not have access to.
1611 1611
     if (!filter_access($account->signature_format) && empty($_POST)) {
1612
-      drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613
-      $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1612
+        drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613
+        $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1614 1614
     }
1615 1615
     $form['forums']['signature_format'] = filter_form($account->signature_format, NULL, array('signature_format'));
1616 1616
     // Optionally hide signatures from comments
1617 1617
     $form['forums']['hide_signatures'] = array(
1618
-      '#type' => 'radios',
1619
-      '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1620
-      '#description' => ' ',
1621
-      '#options' => $form['boolean_options']['#value'],
1622
-      '#attributes' => array('class' => 'fancy'),
1623
-      '#default_value' => isset($account->hide_signatures) ? $account->hide_signatures : 0,
1618
+        '#type' => 'radios',
1619
+        '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1620
+        '#description' => ' ',
1621
+        '#options' => $form['boolean_options']['#value'],
1622
+        '#attributes' => array('class' => 'fancy'),
1623
+        '#default_value' => isset($account->hide_signatures) ? $account->hide_signatures : 0,
1624 1624
     );
1625
-  }
1625
+    }
1626 1626
 
1627
-  //Bottom separator
1628
-  $form['separator_bottom'] = array(
1627
+    //Bottom separator
1628
+    $form['separator_bottom'] = array(
1629 1629
     '#value' => '<div class="separator buttons"></div>',
1630 1630
     '#weight' => 999,
1631
-  );
1631
+    );
1632 1632
 
1633
-  // Form control
1634
-  $form['form control tabs prefix'] = array(
1633
+    // Form control
1634
+    $form['form control tabs prefix'] = array(
1635 1635
     '#value' => '<ul class="form-control tab-list">',
1636 1636
     '#weight' => 1001,
1637
-  );
1638
-  $form['submit'] = array(
1637
+    );
1638
+    $form['submit'] = array(
1639 1639
     '#prefix' => '<li class="first tab">',
1640 1640
     '#type' => 'submit',
1641 1641
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1642 1642
     '#suffix' => '</li>',
1643 1643
     '#weight' => 1002,
1644
-  );
1645
-  $form['form control tabs'] = array(
1644
+    );
1645
+    $form['form control tabs'] = array(
1646 1646
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1647 1647
     '#weight' => 1003,
1648
-  );
1649
-  $form['form control tabs suffix'] = array(
1648
+    );
1649
+    $form['form control tabs suffix'] = array(
1650 1650
     '#value' => '</ul>',
1651 1651
     '#weight' => 1004,
1652
-  );
1653
-  return $form;
1652
+    );
1653
+    return $form;
1654 1654
 }
1655 1655
 
1656 1656
 /**
1657
-  * Handle validation submission of community preferences form.
1658
-  */
1657
+ * Handle validation submission of community preferences form.
1658
+ */
1659 1659
 function communityprefs_form_validate($form, &$form_state) {
1660
-  // require_boinc();
1661
-  global $user;
1662
-  $account = user_load($user->uid);
1663
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1664
-  $edit = $form_state['values'];
1660
+    // require_boinc();
1661
+    global $user;
1662
+    $account = user_load($user->uid);
1663
+    $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1664
+    $edit = $form_state['values'];
1665 1665
 
1666
-  if ($edit['boincuser_name'] != $boinc_user->name) {
1666
+    if ($edit['boincuser_name'] != $boinc_user->name) {
1667 1667
     $blacklist1 = preg_split('/\r\n|\r|\n/', variable_get('boinc_weboptions_blacklisted_usernames', "admin\nadministrator\nmoderator"));
1668 1668
     $blacklist2 = array();
1669 1669
     if (is_array($blacklist1)) {
1670
-      $blacklist2 = array_map('strtolower', $blacklist1);
1670
+        $blacklist2 = array_map('strtolower', $blacklist1);
1671 1671
     }
1672 1672
     if (in_array(strtolower($edit['boincuser_name']), $blacklist2)) {
1673
-      form_set_error('boincuser_name',
1673
+        form_set_error('boincuser_name',
1674 1674
         bts('You may not use username @blname, as that name is not allowed. Please choose another name.',
1675 1675
             array('@blname' => $edit['boincuser_name']),
1676 1676
             NULL, 'boinc:account-preferences-community'));
1677
-      return false;
1677
+        return false;
1678
+    }
1678 1679
     }
1679
-  }
1680 1680
 
1681
-  return true;
1681
+    return true;
1682 1682
 }
1683 1683
 
1684 1684
 /**
1685
-  * Handle post-validation submission of community preferences form.
1686
-  */
1685
+ * Handle post-validation submission of community preferences form.
1686
+ */
1687 1687
 function communityprefs_form_submit($form, &$form_state) {
1688
-  require_boinc('boinc_db');
1689
-  global $user;
1690
-  $account = user_load($user->uid);
1691
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1692
-  $edit = $form_state['values'];
1693
-  $profile_node = $form_state['storage']['profile_node'];
1694
-
1695
-  // Display name
1696
-  if ($edit['boincuser_name'] != $boinc_user->name) {
1688
+    require_boinc('boinc_db');
1689
+    global $user;
1690
+    $account = user_load($user->uid);
1691
+    $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1692
+    $edit = $form_state['values'];
1693
+    $profile_node = $form_state['storage']['profile_node'];
1694
+
1695
+    // Display name
1696
+    if ($edit['boincuser_name'] != $boinc_user->name) {
1697 1697
     $boincuser_name = $edit['boincuser_name'];
1698 1698
     $result = $boinc_user->update(
1699 1699
         "name='{$boincuser_name}'"
1700 1700
     );
1701
-  }
1701
+    }
1702 1702
 
1703
-  // Private message settings
1704
-  pm_email_notify_user('submit', $edit, $user);
1703
+    // Private message settings
1704
+    pm_email_notify_user('submit', $edit, $user);
1705 1705
 
1706
-  // Avatar settings - only set if profile_node exists.
1707
-  if ($profile_node) {
1706
+    // Avatar settings - only set if profile_node exists.
1707
+    if ($profile_node) {
1708 1708
     if (!$edit['field_image']) $edit['field_image'] = array();
1709 1709
     $profile_node->field_image = $edit['field_image'];
1710 1710
     node_save($profile_node);
1711 1711
     // Flush this from the node cache or changes won't show up immediately!
1712 1712
     $profile_node = node_load($profile_node->nid, NULL, TRUE);
1713
-  }
1713
+    }
1714 1714
 
1715
-  // All other settings
1716
-  $settings = array(
1715
+    // All other settings
1716
+    $settings = array(
1717 1717
     'signature' => $edit['signature'],
1718 1718
     'signature_format' => $edit['signature_format'],
1719 1719
     'timezone' => $edit['timezone'],
@@ -1722,197 +1722,197 @@  discard block
 block discarded – undo
1722 1722
     'hide_signatures' => $edit['hide_signatures'],
1723 1723
     'sort' => $edit['comments_order'],
1724 1724
     'gravatar' => $edit['gravatar'],
1725
-  );
1726
-  if (module_exists('internationalization')) {
1725
+    );
1726
+    if (module_exists('internationalization')) {
1727 1727
     $settings['language'] = $edit['language'];
1728 1728
     global $language;
1729 1729
     if ($user->language != $edit['language']) {
1730
-      global $base_url;
1731
-      if ($edit['language'] != language_default('language')) {
1730
+        global $base_url;
1731
+        if ($edit['language'] != language_default('language')) {
1732 1732
         $form_state['redirect'] = $base_url . '/' . $edit['language'] . '/' . $_GET['q'];
1733
-      }
1734
-      else {
1733
+        }
1734
+        else {
1735 1735
         $form_state['redirect'] = $base_url . '/' . $_GET['q'];
1736
-      }
1736
+        }
1737
+    }
1737 1738
     }
1738
-  }
1739
-  user_save($user, $settings);
1739
+    user_save($user, $settings);
1740 1740
 
1741
-  drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1741
+    drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1742 1742
 
1743
-  // Form will not redirect if storage is set; not good if language changes
1744
-  unset($form_state['storage']);
1743
+    // Form will not redirect if storage is set; not good if language changes
1744
+    unset($form_state['storage']);
1745 1745
 }
1746 1746
 
1747 1747
 /**
1748 1748
  * The structure of the privacy preferences form
1749 1749
  */
1750 1750
 function boincwork_privacyprefs_form(&$form_state) {
1751
-  require_boinc(array('user', 'prefs', 'util', 'consent'));
1751
+    require_boinc(array('user', 'prefs', 'util', 'consent'));
1752 1752
 
1753
-  global $user;
1754
-  $account = user_load($user->uid);
1755
-  $boincuser = BoincUser::lookup_id($account->boincuser_id);
1753
+    global $user;
1754
+    $account = user_load($user->uid);
1755
+    $boincuser = BoincUser::lookup_id($account->boincuser_id);
1756 1756
 
1757
-  // Load preferences from BOINC account
1758
-  $prefs = boincwork_load_prefs('project');
1757
+    // Load preferences from BOINC account
1758
+    $prefs = boincwork_load_prefs('project');
1759 1759
 
1760
-  //if (!$prefs AND !$initialize_if_empty) return null;
1760
+    //if (!$prefs AND !$initialize_if_empty) return null;
1761 1761
 
1762
-  $privacy_consent_types = boincwork_load_privacyconsenttypes();
1762
+    $privacy_consent_types = boincwork_load_privacyconsenttypes();
1763 1763
 
1764
-  // Define form defaults
1765
-  $default = array(
1764
+    // Define form defaults
1765
+    $default = array(
1766 1766
     'privacy' => array(
1767
-      'send_email' => ($boincuser->send_email) ? 1 : 0,
1768
-      'show_hosts' => ($boincuser->show_hosts) ? 1 : 0
1767
+        'send_email' => ($boincuser->send_email) ? 1 : 0,
1768
+        'show_hosts' => ($boincuser->show_hosts) ? 1 : 0
1769 1769
     )
1770
-  );
1770
+    );
1771 1771
 
1772
-  // Standard option sets
1773
-  $form['boolean_options'] = array(
1772
+    // Standard option sets
1773
+    $form['boolean_options'] = array(
1774 1774
     '#type' => 'value',
1775 1775
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1776
-  );
1776
+    );
1777 1777
 
1778
-  $form['privacy'] = array(
1778
+    $form['privacy'] = array(
1779 1779
     '#title' => bts('Privacy settings', array(), NULL, 'boinc:account-preferences-privacy'),
1780 1780
     '#type' => 'fieldset',
1781 1781
     '#description' => null,
1782 1782
     '#collapsible' => TRUE,
1783 1783
     '#collapsed' => FALSE
1784
-  );
1785
-  $form['privacy']['send_email'] = array(
1784
+    );
1785
+    $form['privacy']['send_email'] = array(
1786 1786
     '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1787 1787
     '#type' => 'radios',
1788 1788
     '#options' => $form['boolean_options']['#value'],
1789 1789
     '#attributes' => array('class' => 'fancy'),
1790 1790
     '#default_value' => $default['privacy']['send_email']
1791
-  );
1792
-  $form['privacy']['show_hosts'] = array(
1791
+    );
1792
+    $form['privacy']['show_hosts'] = array(
1793 1793
     '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1794 1794
     '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), NULL, 'boinc:account-preferences-privacy'),
1795 1795
     '#type' => 'radios',
1796 1796
     '#options' => $form['boolean_options']['#value'],
1797 1797
     '#attributes' => array('class' => 'fancy'),
1798 1798
     '#default_value' => $default['privacy']['show_hosts']
1799
-  );
1799
+    );
1800 1800
 
1801
-  // Loop over privacy consent types and create form question for each
1802
-  // option that deals with privacy.
1803
-  foreach ($privacy_consent_types as $ct) {
1801
+    // Loop over privacy consent types and create form question for each
1802
+    // option that deals with privacy.
1803
+    foreach ($privacy_consent_types as $ct) {
1804 1804
 
1805 1805
     $currstate = (check_user_consent($boincuser, $ct['shortname'])) ? 1 : 0 ;
1806 1806
     // Set name to 'privacyconsent_SHORTNAME', which can be parsed
1807 1807
     // later in the submit function.
1808 1808
     $form['privacy']['privacyconsent_'.$ct['shortname']] = array(
1809
-      '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1810
-      '#type' => 'radios',
1811
-      '#options' => $form['boolean_options']['#value'],
1812
-      '#attributes' => array('class' => 'fancy'),
1813
-      '#default_value' => $currstate,
1809
+        '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1810
+        '#type' => 'radios',
1811
+        '#options' => $form['boolean_options']['#value'],
1812
+        '#attributes' => array('class' => 'fancy'),
1813
+        '#default_value' => $currstate,
1814 1814
     );
1815 1815
 
1816 1816
     // Add a description with link to the question 'Do you consent to
1817 1817
     // exporting your data...'.
1818 1818
     $mypatt = '/Do you consent to exporting your data/';
1819 1819
     if (preg_match($mypatt, $ct['description']) ) {
1820
-      $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821
-      array(
1820
+        $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821
+        array(
1822 1822
         '!privacy_policy_link' => l(
1823
-          bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1824
-          '/privacy'
1823
+            bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1824
+            '/privacy'
1825 1825
         )
1826
-      ),
1827
-      NULL, 'boinc:account-preferences-privacy');
1826
+        ),
1827
+        NULL, 'boinc:account-preferences-privacy');
1828
+    }
1828 1829
     }
1829
-  }
1830 1830
 
1831
-  // Ignore and block users
1832
-  if (module_exists('ignore_user')) {
1831
+    // Ignore and block users
1832
+    if (module_exists('ignore_user')) {
1833 1833
     $form['ignoreblock'] = array(
1834
-      '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1835
-      '#type' => 'fieldset',
1836
-      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
-      '#collapsible' => TRUE,
1838
-      '#collapsed' => FALSE
1834
+        '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1835
+        '#type' => 'fieldset',
1836
+        '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
+        '#collapsible' => TRUE,
1838
+        '#collapsed' => FALSE
1839 1839
     );
1840 1840
 
1841 1841
     // Table for ignored users
1842 1842
     $form['ignoreblock']['current_ignore_section'] = array(
1843
-      '#type' => 'item',
1844
-      '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1845
-      '#prefix' => '<h4>',
1846
-      '#suffix' => '</h4>',
1847
-      '#weight' => -20,
1843
+        '#type' => 'item',
1844
+        '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1845
+        '#prefix' => '<h4>',
1846
+        '#suffix' => '</h4>',
1847
+        '#weight' => -20,
1848 1848
     );
1849 1849
 
1850 1850
     $ignored_users = _ignore_user_ignored_users();
1851 1851
     foreach ($ignored_users as $ignored_user) {
1852
-      $form['ignoreblock']['username'][$ignored_user['iuid']] = array(
1852
+        $form['ignoreblock']['username'][$ignored_user['iuid']] = array(
1853 1853
         '#value' => $ignored_user['username'],
1854
-      );
1855
-      $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1854
+        );
1855
+        $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1856 1856
         '#value' => l(
1857
-          bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1858
-          'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859
-          array()
1857
+            bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1858
+            'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859
+            array()
1860 1860
         ),
1861
-      );
1861
+        );
1862 1862
     }
1863 1863
     $form['ignoreblock']['pager'] = array('#value' => theme('pager', NULL, 10, 0));
1864 1864
 
1865 1865
     // Sub-form to add user to ignore list
1866 1866
     $form['ignoreblock']['add_ignore_user_section'] = array(
1867
-      '#type' => 'item',
1868
-      '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1869
-      '#prefix' => '<h4>',
1870
-      '#suffix' => '</h4>',
1871
-      '#weight' => 10,
1867
+        '#type' => 'item',
1868
+        '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1869
+        '#prefix' => '<h4>',
1870
+        '#suffix' => '</h4>',
1871
+        '#weight' => 10,
1872 1872
     );
1873 1873
 
1874 1874
     $form['ignoreblock']['addusername_toignorelist'] = array(
1875
-      '#type' => 'textfield',
1876
-      '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
-      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1878
-      '#weight' => 11,
1879
-      '#size' => 50,
1880
-      '#autocomplete_path' => 'boincuser/autocomplete',
1875
+        '#type' => 'textfield',
1876
+        '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
+        '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1878
+        '#weight' => 11,
1879
+        '#size' => 50,
1880
+        '#autocomplete_path' => 'boincuser/autocomplete',
1881 1881
     );
1882 1882
 
1883 1883
     $form['ignoreblock']['addusername_submit'] = array(
1884
-      '#type' => 'submit',
1885
-      '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1886
-      '#submit' => array('_boincwork_ignore_list_form_submit'),
1887
-      '#weight' => 12,
1888
-      '#attributes' => array('class' => 'add_ignore_user'),
1884
+        '#type' => 'submit',
1885
+        '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1886
+        '#submit' => array('_boincwork_ignore_list_form_submit'),
1887
+        '#weight' => 12,
1888
+        '#attributes' => array('class' => 'add_ignore_user'),
1889 1889
     );
1890
-  }// endif module_exists
1890
+    }// endif module_exists
1891 1891
 
1892
-  $form['prefs']['separator_bottom'] = array(
1892
+    $form['prefs']['separator_bottom'] = array(
1893 1893
     '#value' => '<div class="separator buttons"></div>'
1894
-  );
1894
+    );
1895 1895
 
1896
-  // Form control
1897
-  $form['prefs']['form control tabs prefix'] = array(
1896
+    // Form control
1897
+    $form['prefs']['form control tabs prefix'] = array(
1898 1898
     '#value' => '<ul class="form-control tab-list">'
1899
-  );
1900
-  $form['prefs']['submit'] = array(
1899
+    );
1900
+    $form['prefs']['submit'] = array(
1901 1901
     '#prefix' => '<li class="first tab">',
1902 1902
     '#type' => 'submit',
1903 1903
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1904 1904
     '#validate' => array('boincwork_privacyprefs_form_validate'),
1905 1905
     '#submit' => array('boincwork_privacyprefs_form_submit'),
1906 1906
     '#suffix' => '</li>'
1907
-  );
1908
-  $form['prefs']['form control tabs'] = array(
1907
+    );
1908
+    $form['prefs']['form control tabs'] = array(
1909 1909
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1910
-  );
1911
-  $form['prefs']['form control tabs suffix'] = array(
1910
+    );
1911
+    $form['prefs']['form control tabs suffix'] = array(
1912 1912
     '#value' => '</ul>'
1913
-  );
1913
+    );
1914 1914
 
1915
-  return $form;
1915
+    return $form;
1916 1916
 }
1917 1917
 
1918 1918
 /**
@@ -1920,93 +1920,93 @@  discard block
 block discarded – undo
1920 1920
  */
1921 1921
 function theme_boincwork_privacyprefs_form($form) {
1922 1922
 
1923
-  $output = '';
1924
-  $output .= drupal_render($form['privacy']);
1923
+    $output = '';
1924
+    $output .= drupal_render($form['privacy']);
1925 1925
 
1926
-  $header = array(
1926
+    $header = array(
1927 1927
     bts('Username', array(), NULL, 'boinc:ignore-user-list'),
1928 1928
     bts('Operations', array(), NULL, 'boinc:ignore-user-list')
1929
-  );
1929
+    );
1930 1930
 
1931
-  $rows = array();
1932
-  if (isset($form['ignoreblock']['username']) && is_array($form['ignoreblock']['username'])) {
1931
+    $rows = array();
1932
+    if (isset($form['ignoreblock']['username']) && is_array($form['ignoreblock']['username'])) {
1933 1933
     foreach (element_children($form['ignoreblock']['username']) as $key) {
1934
-      $row = array();
1935
-      $row[] = drupal_render($form['ignoreblock']['username'][$key]);
1936
-      $row[] = drupal_render($form['ignoreblock']['delete'][$key]);
1937
-      $rows[] = $row;
1934
+        $row = array();
1935
+        $row[] = drupal_render($form['ignoreblock']['username'][$key]);
1936
+        $row[] = drupal_render($form['ignoreblock']['delete'][$key]);
1937
+        $rows[] = $row;
1938 1938
     }
1939
-  }
1940
-  else {
1939
+    }
1940
+    else {
1941 1941
     $rows[] = array(
1942
-      array(
1942
+        array(
1943 1943
         'data' => bts('You have not added any users to your Ignore List.', array(), NULL, 'boinc:ignore-user-list'),
1944 1944
         'colspan' => '2',
1945
-      )
1945
+        )
1946 1946
     );
1947
-  }
1947
+    }
1948 1948
 
1949
-  $attr = array('class' => 'ignore_user');
1950
-  $form['ignoreblock']['current_list']['ignored_users']['#value'] = theme('table', $header, $rows, $attr);
1951
-  $output .= drupal_render($form['current_list']);
1949
+    $attr = array('class' => 'ignore_user');
1950
+    $form['ignoreblock']['current_list']['ignored_users']['#value'] = theme('table', $header, $rows, $attr);
1951
+    $output .= drupal_render($form['current_list']);
1952 1952
 
1953
-  if ($form['pager']['#value']) {
1953
+    if ($form['pager']['#value']) {
1954 1954
     $output .= drupal_render($form['pager']);
1955
-  }
1955
+    }
1956 1956
 
1957
-  $output .= drupal_render($form);
1957
+    $output .= drupal_render($form);
1958 1958
 
1959
-  return $output;
1959
+    return $output;
1960 1960
 }
1961 1961
 
1962 1962
 /**
1963
-  * Validate the privacy preferences form.
1964
-  */
1963
+ * Validate the privacy preferences form.
1964
+ */
1965 1965
 function boincwork_privacyprefs_form_validate($form, &$form_state) {
1966
-  require_boinc('util');
1966
+    require_boinc('util');
1967 1967
 
1968
-  // Verify all non-boolean user input values and notify form API of failures
1969
-  // ... currently there are no non-boolean values!
1968
+    // Verify all non-boolean user input values and notify form API of failures
1969
+    // ... currently there are no non-boolean values!
1970 1970
 }
1971 1971
 
1972 1972
 /**
1973
-  * Handle post-validation submission of privacy preferences form.
1974
-  */
1973
+ * Handle post-validation submission of privacy preferences form.
1974
+ */
1975 1975
 function boincwork_privacyprefs_form_submit($form, &$form_state) {
1976
-  require_boinc(array('user', 'prefs', 'consent'));
1976
+    require_boinc(array('user', 'prefs', 'consent'));
1977 1977
 
1978
-  global $user;
1979
-  $account = user_load($user->uid);
1978
+    global $user;
1979
+    $account = user_load($user->uid);
1980 1980
 
1981
-  // Load BOINC account
1982
-  $boincuser = BoincUser::lookup_id($account->boincuser_id);
1981
+    // Load BOINC account
1982
+    $boincuser = BoincUser::lookup_id($account->boincuser_id);
1983 1983
 
1984
-  // Privacy preferences
1985
-  $boincuser->send_email = ($form_state['values']['send_email']) ? true : false;
1986
-  $boincuser->show_hosts = ($form_state['values']['show_hosts']) ? true : false;
1984
+    // Privacy preferences
1985
+    $boincuser->send_email = ($form_state['values']['send_email']) ? true : false;
1986
+    $boincuser->show_hosts = ($form_state['values']['show_hosts']) ? true : false;
1987 1987
 
1988
-  // Privacy consent options, extract the 'privacyconsent_SHORTNAME'
1989
-  // from values array, and loop over them; each is checked with
1990
-  // check_consent_type(). Also check the current state of the option
1991
-  // in the database. If the form value is a new state, then set it.
1992
-  $result = preg_grep("/^privacyconsent/", array_keys($form_state['values']));
1993
-  $privacyconsent_prefs = array_intersect_key($form_state['values'], array_flip($result));
1994
-  foreach ($privacyconsent_prefs as $name => $newstate) {
1988
+    // Privacy consent options, extract the 'privacyconsent_SHORTNAME'
1989
+    // from values array, and loop over them; each is checked with
1990
+    // check_consent_type(). Also check the current state of the option
1991
+    // in the database. If the form value is a new state, then set it.
1992
+    $result = preg_grep("/^privacyconsent/", array_keys($form_state['values']));
1993
+    $privacyconsent_prefs = array_intersect_key($form_state['values'], array_flip($result));
1994
+    foreach ($privacyconsent_prefs as $name => $newstate) {
1995 1995
     $subname = explode('_', $name)[1];
1996 1996
     $currstate = (check_user_consent($boincuser, $subname)) ? 1 : 0 ;
1997 1997
     list($checkct, $ctid) = check_consent_type($subname);
1998 1998
     if ($checkct && ($currstate != $newstate)) {
1999
-      consent_to_a_policy($boincuser, $ctid, $newstate, 0, 'Webform', time());
1999
+        consent_to_a_policy($boincuser, $ctid, $newstate, 0, 'Webform', time());
2000
+    }
2000 2001
     }
2001
-  }
2002 2002
 
2003
-  //project_prefs_update($boincuser, $main_prefs);
2003
+    //project_prefs_update($boincuser, $main_prefs);
2004 2004
 
2005
-  db_set_active('boinc_rw');
2006
-  db_query("UPDATE user SET send_email = '{$boincuser->send_email}', show_hosts = '{$boincuser->show_hosts}' WHERE id = '{$boincuser->id}'");
2007
-  db_set_active('default');
2005
+    db_set_active('boinc_rw');
2006
+    db_query("UPDATE user SET send_email = '{$boincuser->send_email}', show_hosts = '{$boincuser->show_hosts}' WHERE id = '{$boincuser->id}'");
2007
+    db_set_active('default');
2008 2008
 
2009
-  drupal_set_message(t('Your privacy preferences have been updated.'));
2009
+    drupal_set_message(t('Your privacy preferences have been updated.'));
2010 2010
 }
2011 2011
 
2012 2012
 /**
@@ -2014,14 +2014,14 @@  discard block
 block discarded – undo
2014 2014
  * ignore list.
2015 2015
  */
2016 2016
 function _boincwork_ignore_list_form_submit($form, $form_state) {
2017
-  boincwork_ignore_user_add_user_username($form_state['values']['addusername_toignorelist']);
2018
-  drupal_set_message(
2017
+    boincwork_ignore_user_add_user_username($form_state['values']['addusername_toignorelist']);
2018
+    drupal_set_message(
2019 2019
     bts('@username has been added to your ignore list. See your !privacy_preferences for more details.',
2020
-      array(
2020
+        array(
2021 2021
         '@username' => $form_state['values']['addusername_toignorelist'],
2022 2022
         '!privacy_preferences' => l(bts('privacy preferences', array(), NULL, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2023
-      ),
2024
-      NULL, 'boinc:ignore-user-add'),
2023
+        ),
2024
+        NULL, 'boinc:ignore-user-add'),
2025 2025
     'status');
2026 2026
 }
2027 2027
 
@@ -2030,37 +2030,37 @@  discard block
 block discarded – undo
2030 2030
  */
2031 2031
 function boincwork_selectapp_form(&$form_state, $apps, $current_app) {
2032 2032
 
2033
-  $form['selectapp'] = array(
2033
+    $form['selectapp'] = array(
2034 2034
     '#type' => 'select',
2035 2035
     '#attributes' => array(
2036
-      'class' => 'task-app-filter',
2037
-      'onchange' => 'this.form.submit();',
2036
+        'class' => 'task-app-filter',
2037
+        'onchange' => 'this.form.submit();',
2038 2038
     ),
2039 2039
     '#default_value' => $current_app,
2040 2040
     '#options' => $apps,
2041 2041
     '#post_render' => array('_boincwork_selectapp_form_callback'),
2042
-  );
2042
+    );
2043 2043
 
2044
-  // Class task-app-filter-submit for this form is used in
2045
-  // theming. CSS sets 'display:none' if javascript is present. Thus
2046
-  // only non-js users/browsers will see the Apply Filter button.
2047
-  $form['submit'] = array(
2044
+    // Class task-app-filter-submit for this form is used in
2045
+    // theming. CSS sets 'display:none' if javascript is present. Thus
2046
+    // only non-js users/browsers will see the Apply Filter button.
2047
+    $form['submit'] = array(
2048 2048
     '#type' => 'submit',
2049 2049
     '#value' => bts('Apply Filter', array(), NULL, 'boinc:form-save'),
2050 2050
     '#attributes' => array('class' => 'js-hide',),
2051
-  );
2051
+    );
2052 2052
 
2053
-  return $form;
2053
+    return $form;
2054 2054
 }
2055 2055
 
2056 2056
 /**
2057 2057
  * Submit function for select appliacation form.
2058 2058
  */
2059 2059
 function boincwork_selectapp_form_submit($form, &$form_state) {
2060
-  $myargs = arg();
2061
-  array_pop($myargs);
2062
-  $newpath = implode('/', $myargs ) . '/' . $form['selectapp']['#value'];
2063
-  $form_state['redirect'] = $newpath;
2060
+    $myargs = arg();
2061
+    array_pop($myargs);
2062
+    $newpath = implode('/', $myargs ) . '/' . $form['selectapp']['#value'];
2063
+    $form_state['redirect'] = $newpath;
2064 2064
 }
2065 2065
 
2066 2066
 /**
@@ -2070,7 +2070,7 @@  discard block
 block discarded – undo
2070 2070
  * 'title' for the Application drop down box.
2071 2071
  */
2072 2072
 function _boincwork_selectapp_form_callback($theContent, $theElement) {
2073
-  $disabled = '<option value="-1" disabled hidden';
2074
-  $newContent = preg_replace('/<option value="-1"/', $disabled, $theContent);
2075
-  return $newContent;
2073
+    $disabled = '<option value="-1" disabled hidden';
2074
+    $newContent = preg_replace('/<option value="-1"/', $disabled, $theContent);
2075
+    return $newContent;
2076 2076
 }
Please login to merge, or discard this patch.
html/inc/forum.inc 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -811,9 +811,9 @@  discard block
 block discarded – undo
811 811
 function post_rules() {
812 812
     if (defined('FORUM_RULES')) return FORUM_RULES;
813 813
     if (function_exists("project_forum_post_rules")) {
814
-      $project_rules=project_forum_post_rules();
814
+        $project_rules=project_forum_post_rules();
815 815
     } else {
816
-      $project_rules="";
816
+        $project_rules="";
817 817
     }
818 818
     return sprintf("
819 819
         <ul>
@@ -1278,7 +1278,7 @@  discard block
 block discarded – undo
1278 1278
     }
1279 1279
     if ($thread->hidden) {
1280 1280
         error_page(
1281
-           tra("Can't post to a hidden thread.")
1281
+            tra("Can't post to a hidden thread.")
1282 1282
         );
1283 1283
     }
1284 1284
 
Please login to merge, or discard this patch.