Passed
Pull Request — master (#3042)
by Christian
07:09
created
all/features/user_preferences/user_preferences.features.menu_links.inc 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function user_preferences_menu_default_menu_links() {
7
-  $menu_links = array();
7
+    $menu_links = array();
8 8
 
9
-  // Exported menu link: primary-links:account/prefs
10
-  $menu_links['primary-links:account/prefs'] = array(
9
+    // Exported menu link: primary-links:account/prefs
10
+    $menu_links['primary-links:account/prefs'] = array(
11 11
     'menu_name' => 'primary-links',
12 12
     'link_path' => 'account/prefs',
13 13
     'router_path' => 'account/prefs',
14 14
     'link_title' => 'Preferences',
15 15
     'options' => array(
16
-      'attributes' => array(
16
+        'attributes' => array(
17 17
         'title' => '',
18
-      ),
18
+        ),
19 19
     ),
20 20
     'module' => 'menu',
21 21
     'hidden' => '0',
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     'expanded' => '0',
25 25
     'weight' => '-47',
26 26
     'parent_path' => 'dashboard',
27
-  );
28
-  // Translatables
29
-  // Use bts() function to translate additional strings.
30
-  bts('Preferences', array(), NULL, 'boinc:menu-link');
31
-  bts('Community', array(), NULL, 'boinc:menu-link');
32
-  bts('Privacy', array(), NULL, 'boinc:menu-link');
33
-  bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
27
+    );
28
+    // Translatables
29
+    // Use bts() function to translate additional strings.
30
+    bts('Preferences', array(), NULL, 'boinc:menu-link');
31
+    bts('Community', array(), NULL, 'boinc:menu-link');
32
+    bts('Privacy', array(), NULL, 'boinc:menu-link');
33
+    bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
34 34
 
35
-  return $menu_links;
35
+    return $menu_links;
36 36
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
   );
28 28
   // Translatables
29 29
   // Use bts() function to translate additional strings.
30
-  bts('Preferences', array(), NULL, 'boinc:menu-link');
31
-  bts('Community', array(), NULL, 'boinc:menu-link');
32
-  bts('Privacy', array(), NULL, 'boinc:menu-link');
33
-  bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
30
+  bts('Preferences', array(), null, 'boinc:menu-link');
31
+  bts('Community', array(), null, 'boinc:menu-link');
32
+  bts('Privacy', array(), null, 'boinc:menu-link');
33
+  bts('Subscriptions', array(), null, 'boinc:menu-link:-1:ignoreoverwrite');
34 34
 
35 35
   return $menu_links;
36 36
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/user_profiles/user_profiles.views_default.inc 2 patches
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $view->base_table = 'node';
15 15
   $view->core = 6;
16 16
   $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
17
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
18 18
   $handler = $view->new_display('default', 'Defaults', 'default');
19 19
   $handler->override_option('fields', array(
20 20
     'title' => array(
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
       'operator' => '=',
159 159
       'value' => '1',
160 160
       'group' => '0',
161
-      'exposed' => FALSE,
161
+      'exposed' => false,
162 162
       'expose' => array(
163
-        'operator' => FALSE,
163
+        'operator' => false,
164 164
         'label' => '',
165 165
       ),
166 166
       'id' => 'moderate',
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
   $handler->override_option('cache', array(
179 179
     'type' => 'none',
180 180
   ));
181
-  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
181
+  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), null, 'boinc:moderate-user-page'));
182 182
   $handler->override_option('empty_format', '4');
183 183
   $handler->override_option('use_pager', '1');
184 184
   $handler->override_option('style_plugin', 'table');
@@ -324,9 +324,9 @@  discard block
 block discarded – undo
324 324
       'operator' => '=',
325 325
       'value' => '1',
326 326
       'group' => '0',
327
-      'exposed' => FALSE,
327
+      'exposed' => false,
328 328
       'expose' => array(
329
-        'operator' => FALSE,
329
+        'operator' => false,
330 330
         'label' => '',
331 331
       ),
332 332
       'id' => 'moderate',
@@ -343,9 +343,9 @@  discard block
 block discarded – undo
343 343
         'profile' => 'profile',
344 344
       ),
345 345
       'group' => '0',
346
-      'exposed' => FALSE,
346
+      'exposed' => false,
347 347
       'expose' => array(
348
-        'operator' => FALSE,
348
+        'operator' => false,
349 349
         'label' => '',
350 350
       ),
351 351
       'id' => 'type',
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
       'relationship' => 'none',
358 358
     ),
359 359
   ));
360
-  $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
360
+  $handler->override_option('title', bts('User profile moderation queue', array(), null, 'boinc:moderate-user-page'));
361 361
   $handler->override_option('path', 'moderate/profiles');
362 362
   $handler->override_option('menu', array(
363 363
     'type' => 'default tab',
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
   $view->base_table = 'node_revisions';
385 385
   $view->core = 6;
386 386
   $view->api_version = '2';
387
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
387
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
388 388
   $handler = $view->new_display('default', 'Defaults', 'default');
389 389
   $handler->override_option('relationships', array(
390 390
     'uid' => array(
Please login to merge, or discard this patch.
Indentation   +403 added lines, -403 removed lines patch added patch discarded remove patch
@@ -4,22 +4,22 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function user_profiles_views_default_views() {
7
-  $views = array();
7
+    $views = array();
8 8
 
9
-  // Exported view: moderation_queue
10
-  $view = new view;
11
-  $view->name = 'moderation_queue';
12
-  $view->description = '';
13
-  $view->tag = '';
14
-  $view->base_table = 'node';
15
-  $view->core = 6;
16
-  $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
-  $handler = $view->new_display('default', 'Defaults', 'default');
19
-  $handler->override_option('fields', array(
9
+    // Exported view: moderation_queue
10
+    $view = new view;
11
+    $view->name = 'moderation_queue';
12
+    $view->description = '';
13
+    $view->tag = '';
14
+    $view->base_table = 'node';
15
+    $view->core = 6;
16
+    $view->api_version = '2';
17
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
+    $handler = $view->new_display('default', 'Defaults', 'default');
19
+    $handler->override_option('fields', array(
20 20
     'title' => array(
21
-      'label' => 'Title',
22
-      'alter' => array(
21
+        'label' => 'Title',
22
+        'alter' => array(
23 23
         'alter_text' => 0,
24 24
         'text' => '',
25 25
         'make_link' => 0,
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         'ellipsis' => 1,
39 39
         'html' => 0,
40 40
         'strip_tags' => 0,
41
-      ),
42
-      'empty' => '',
43
-      'hide_empty' => 0,
44
-      'empty_zero' => 0,
45
-      'hide_alter_empty' => 1,
46
-      'link_to_node' => 1,
47
-      'exclude' => 0,
48
-      'id' => 'title',
49
-      'table' => 'node',
50
-      'field' => 'title',
51
-      'relationship' => 'none',
41
+        ),
42
+        'empty' => '',
43
+        'hide_empty' => 0,
44
+        'empty_zero' => 0,
45
+        'hide_alter_empty' => 1,
46
+        'link_to_node' => 1,
47
+        'exclude' => 0,
48
+        'id' => 'title',
49
+        'table' => 'node',
50
+        'field' => 'title',
51
+        'relationship' => 'none',
52 52
     ),
53 53
     'changed' => array(
54
-      'label' => 'Updated date',
55
-      'alter' => array(
54
+        'label' => 'Updated date',
55
+        'alter' => array(
56 56
         'alter_text' => 0,
57 57
         'text' => '',
58 58
         'make_link' => 0,
@@ -71,22 +71,22 @@  discard block
 block discarded – undo
71 71
         'ellipsis' => 1,
72 72
         'html' => 0,
73 73
         'strip_tags' => 0,
74
-      ),
75
-      'empty' => '',
76
-      'hide_empty' => 0,
77
-      'empty_zero' => 0,
78
-      'hide_alter_empty' => 1,
79
-      'date_format' => 'time ago',
80
-      'custom_date_format' => '',
81
-      'exclude' => 0,
82
-      'id' => 'changed',
83
-      'table' => 'node',
84
-      'field' => 'changed',
85
-      'relationship' => 'none',
74
+        ),
75
+        'empty' => '',
76
+        'hide_empty' => 0,
77
+        'empty_zero' => 0,
78
+        'hide_alter_empty' => 1,
79
+        'date_format' => 'time ago',
80
+        'custom_date_format' => '',
81
+        'exclude' => 0,
82
+        'id' => 'changed',
83
+        'table' => 'node',
84
+        'field' => 'changed',
85
+        'relationship' => 'none',
86 86
     ),
87 87
     'uid' => array(
88
-      'label' => 'Uid',
89
-      'alter' => array(
88
+        'label' => 'Uid',
89
+        'alter' => array(
90 90
         'alter_text' => 0,
91 91
         'text' => '',
92 92
         'make_link' => 0,
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
         'ellipsis' => 1,
106 106
         'html' => 0,
107 107
         'strip_tags' => 0,
108
-      ),
109
-      'empty' => '',
110
-      'hide_empty' => 0,
111
-      'empty_zero' => 0,
112
-      'hide_alter_empty' => 1,
113
-      'link_to_user' => 1,
114
-      'exclude' => 1,
115
-      'id' => 'uid',
116
-      'table' => 'users',
117
-      'field' => 'uid',
118
-      'relationship' => 'none',
108
+        ),
109
+        'empty' => '',
110
+        'hide_empty' => 0,
111
+        'empty_zero' => 0,
112
+        'hide_alter_empty' => 1,
113
+        'link_to_user' => 1,
114
+        'exclude' => 1,
115
+        'id' => 'uid',
116
+        'table' => 'users',
117
+        'field' => 'uid',
118
+        'relationship' => 'none',
119 119
     ),
120 120
     'name' => array(
121
-      'label' => 'Author',
122
-      'alter' => array(
121
+        'label' => 'Author',
122
+        'alter' => array(
123 123
         'alter_text' => 0,
124 124
         'text' => '',
125 125
         'make_link' => 1,
@@ -138,81 +138,81 @@  discard block
 block discarded – undo
138 138
         'ellipsis' => 1,
139 139
         'html' => 0,
140 140
         'strip_tags' => 0,
141
-      ),
142
-      'empty' => '',
143
-      'hide_empty' => 0,
144
-      'empty_zero' => 0,
145
-      'hide_alter_empty' => 0,
146
-      'link_to_user' => 0,
147
-      'overwrite_anonymous' => 1,
148
-      'anonymous_text' => 'Anonymous',
149
-      'exclude' => 0,
150
-      'id' => 'name',
151
-      'table' => 'users',
152
-      'field' => 'name',
153
-      'relationship' => 'none',
141
+        ),
142
+        'empty' => '',
143
+        'hide_empty' => 0,
144
+        'empty_zero' => 0,
145
+        'hide_alter_empty' => 0,
146
+        'link_to_user' => 0,
147
+        'overwrite_anonymous' => 1,
148
+        'anonymous_text' => 'Anonymous',
149
+        'exclude' => 0,
150
+        'id' => 'name',
151
+        'table' => 'users',
152
+        'field' => 'name',
153
+        'relationship' => 'none',
154 154
     ),
155
-  ));
156
-  $handler->override_option('filters', array(
155
+    ));
156
+    $handler->override_option('filters', array(
157 157
     'moderate' => array(
158
-      'operator' => '=',
159
-      'value' => '1',
160
-      'group' => '0',
161
-      'exposed' => FALSE,
162
-      'expose' => array(
158
+        'operator' => '=',
159
+        'value' => '1',
160
+        'group' => '0',
161
+        'exposed' => FALSE,
162
+        'expose' => array(
163 163
         'operator' => FALSE,
164 164
         'label' => '',
165
-      ),
166
-      'id' => 'moderate',
167
-      'table' => 'node',
168
-      'field' => 'moderate',
169
-      'relationship' => 'none',
165
+        ),
166
+        'id' => 'moderate',
167
+        'table' => 'node',
168
+        'field' => 'moderate',
169
+        'relationship' => 'none',
170 170
     ),
171
-  ));
172
-  $handler->override_option('access', array(
171
+    ));
172
+    $handler->override_option('access', array(
173 173
     'type' => 'role',
174 174
     'role' => array(
175
-      1271379760 => 1271379760,
175
+        1271379760 => 1271379760,
176 176
     ),
177
-  ));
178
-  $handler->override_option('cache', array(
177
+    ));
178
+    $handler->override_option('cache', array(
179 179
     'type' => 'none',
180
-  ));
181
-  $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
182
-  $handler->override_option('empty_format', '4');
183
-  $handler->override_option('use_pager', '1');
184
-  $handler->override_option('style_plugin', 'table');
185
-  $handler->override_option('style_options', array(
180
+    ));
181
+    $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page'));
182
+    $handler->override_option('empty_format', '4');
183
+    $handler->override_option('use_pager', '1');
184
+    $handler->override_option('style_plugin', 'table');
185
+    $handler->override_option('style_options', array(
186 186
     'grouping' => '',
187 187
     'override' => 1,
188 188
     'sticky' => 0,
189 189
     'order' => 'desc',
190 190
     'summary' => '',
191 191
     'columns' => array(
192
-      'view_node' => 'view_node',
193
-      'title' => 'title',
194
-      'changed' => 'changed',
192
+        'view_node' => 'view_node',
193
+        'title' => 'title',
194
+        'changed' => 'changed',
195 195
     ),
196 196
     'info' => array(
197
-      'view_node' => array(
197
+        'view_node' => array(
198 198
         'separator' => '',
199
-      ),
200
-      'title' => array(
199
+        ),
200
+        'title' => array(
201 201
         'sortable' => 0,
202 202
         'separator' => '',
203
-      ),
204
-      'changed' => array(
203
+        ),
204
+        'changed' => array(
205 205
         'sortable' => 0,
206 206
         'separator' => '',
207
-      ),
207
+        ),
208 208
     ),
209 209
     'default' => 'changed',
210
-  ));
211
-  $handler = $view->new_display('page', 'User profiles', 'page_1');
212
-  $handler->override_option('fields', array(
210
+    ));
211
+    $handler = $view->new_display('page', 'User profiles', 'page_1');
212
+    $handler->override_option('fields', array(
213 213
     'uid' => array(
214
-      'label' => 'Uid',
215
-      'alter' => array(
214
+        'label' => 'Uid',
215
+        'alter' => array(
216 216
         'alter_text' => 0,
217 217
         'text' => '',
218 218
         'make_link' => 0,
@@ -231,24 +231,24 @@  discard block
 block discarded – undo
231 231
         'ellipsis' => 1,
232 232
         'html' => 0,
233 233
         'strip_tags' => 0,
234
-      ),
235
-      'empty' => '',
236
-      'hide_empty' => 0,
237
-      'empty_zero' => 0,
238
-      'hide_alter_empty' => 1,
239
-      'link_to_user' => 1,
240
-      'exclude' => 1,
241
-      'id' => 'uid',
242
-      'table' => 'users',
243
-      'field' => 'uid',
244
-      'override' => array(
234
+        ),
235
+        'empty' => '',
236
+        'hide_empty' => 0,
237
+        'empty_zero' => 0,
238
+        'hide_alter_empty' => 1,
239
+        'link_to_user' => 1,
240
+        'exclude' => 1,
241
+        'id' => 'uid',
242
+        'table' => 'users',
243
+        'field' => 'uid',
244
+        'override' => array(
245 245
         'button' => 'Use default',
246
-      ),
247
-      'relationship' => 'none',
246
+        ),
247
+        'relationship' => 'none',
248 248
     ),
249 249
     'name' => array(
250
-      'label' => 'User',
251
-      'alter' => array(
250
+        'label' => 'User',
251
+        'alter' => array(
252 252
         'alter_text' => 0,
253 253
         'text' => '',
254 254
         'make_link' => 1,
@@ -267,26 +267,26 @@  discard block
 block discarded – undo
267 267
         'ellipsis' => 1,
268 268
         'html' => 0,
269 269
         'strip_tags' => 0,
270
-      ),
271
-      'empty' => '',
272
-      'hide_empty' => 0,
273
-      'empty_zero' => 0,
274
-      'hide_alter_empty' => 1,
275
-      'link_to_user' => 1,
276
-      'overwrite_anonymous' => 0,
277
-      'anonymous_text' => '',
278
-      'exclude' => 0,
279
-      'id' => 'name',
280
-      'table' => 'users',
281
-      'field' => 'name',
282
-      'override' => array(
270
+        ),
271
+        'empty' => '',
272
+        'hide_empty' => 0,
273
+        'empty_zero' => 0,
274
+        'hide_alter_empty' => 1,
275
+        'link_to_user' => 1,
276
+        'overwrite_anonymous' => 0,
277
+        'anonymous_text' => '',
278
+        'exclude' => 0,
279
+        'id' => 'name',
280
+        'table' => 'users',
281
+        'field' => 'name',
282
+        'override' => array(
283 283
         'button' => 'Use default',
284
-      ),
285
-      'relationship' => 'none',
284
+        ),
285
+        'relationship' => 'none',
286 286
     ),
287 287
     'changed' => array(
288
-      'label' => 'Updated date',
289
-      'alter' => array(
288
+        'label' => 'Updated date',
289
+        'alter' => array(
290 290
         'alter_text' => 0,
291 291
         'text' => '',
292 292
         'make_link' => 0,
@@ -305,22 +305,22 @@  discard block
 block discarded – undo
305 305
         'ellipsis' => 1,
306 306
         'html' => 0,
307 307
         'strip_tags' => 0,
308
-      ),
309
-      'empty' => '',
310
-      'hide_empty' => 0,
311
-      'empty_zero' => 0,
312
-      'hide_alter_empty' => 1,
313
-      'date_format' => 'time ago',
314
-      'custom_date_format' => '',
315
-      'exclude' => 0,
316
-      'id' => 'changed',
317
-      'table' => 'node',
318
-      'field' => 'changed',
319
-      'relationship' => 'none',
308
+        ),
309
+        'empty' => '',
310
+        'hide_empty' => 0,
311
+        'empty_zero' => 0,
312
+        'hide_alter_empty' => 1,
313
+        'date_format' => 'time ago',
314
+        'custom_date_format' => '',
315
+        'exclude' => 0,
316
+        'id' => 'changed',
317
+        'table' => 'node',
318
+        'field' => 'changed',
319
+        'relationship' => 'none',
320 320
     ),
321 321
     'phpcode' => array(
322
-      'label' => 'Edit Profile',
323
-      'alter' => array(
322
+        'label' => 'Edit Profile',
323
+        'alter' => array(
324 324
         'alter_text' => 0,
325 325
         'text' => '',
326 326
         'make_link' => 0,
@@ -339,108 +339,108 @@  discard block
 block discarded – undo
339 339
         'ellipsis' => 1,
340 340
         'html' => 0,
341 341
         'strip_tags' => 0,
342
-      ),
343
-      'empty' => '',
344
-      'hide_empty' => 0,
345
-      'empty_zero' => 0,
346
-      'hide_alter_empty' => 1,
347
-      'value' => '<?php
342
+        ),
343
+        'empty' => '',
344
+        'hide_empty' => 0,
345
+        'empty_zero' => 0,
346
+        'hide_alter_empty' => 1,
347
+        'value' => '<?php
348 348
 $uid = $data->users_uid;
349 349
 return l(
350 350
 bts(\'edit\', array(), NULL, \'boinc:edit-profile\'),
351 351
 "/moderate/profile/$uid/edit");
352 352
 ?>',
353
-      'exclude' => 0,
354
-      'id' => 'phpcode',
355
-      'table' => 'customfield',
356
-      'field' => 'phpcode',
357
-      'override' => array(
353
+        'exclude' => 0,
354
+        'id' => 'phpcode',
355
+        'table' => 'customfield',
356
+        'field' => 'phpcode',
357
+        'override' => array(
358 358
         'button' => 'Use default',
359
-      ),
360
-      'relationship' => 'none',
359
+        ),
360
+        'relationship' => 'none',
361 361
     ),
362
-  ));
363
-  $handler->override_option('filters', array(
362
+    ));
363
+    $handler->override_option('filters', array(
364 364
     'moderate' => array(
365
-      'operator' => '=',
366
-      'value' => '1',
367
-      'group' => '0',
368
-      'exposed' => FALSE,
369
-      'expose' => array(
365
+        'operator' => '=',
366
+        'value' => '1',
367
+        'group' => '0',
368
+        'exposed' => FALSE,
369
+        'expose' => array(
370 370
         'operator' => FALSE,
371 371
         'label' => '',
372
-      ),
373
-      'id' => 'moderate',
374
-      'table' => 'node',
375
-      'field' => 'moderate',
376
-      'override' => array(
372
+        ),
373
+        'id' => 'moderate',
374
+        'table' => 'node',
375
+        'field' => 'moderate',
376
+        'override' => array(
377 377
         'button' => 'Use default',
378
-      ),
379
-      'relationship' => 'none',
378
+        ),
379
+        'relationship' => 'none',
380 380
     ),
381 381
     'type' => array(
382
-      'operator' => 'in',
383
-      'value' => array(
382
+        'operator' => 'in',
383
+        'value' => array(
384 384
         'profile' => 'profile',
385
-      ),
386
-      'group' => '0',
387
-      'exposed' => FALSE,
388
-      'expose' => array(
385
+        ),
386
+        'group' => '0',
387
+        'exposed' => FALSE,
388
+        'expose' => array(
389 389
         'operator' => FALSE,
390 390
         'label' => '',
391
-      ),
392
-      'id' => 'type',
393
-      'table' => 'node',
394
-      'field' => 'type',
395
-      'override' => array(
391
+        ),
392
+        'id' => 'type',
393
+        'table' => 'node',
394
+        'field' => 'type',
395
+        'override' => array(
396 396
         'button' => 'Use default',
397
-      ),
398
-      'relationship' => 'none',
397
+        ),
398
+        'relationship' => 'none',
399 399
     ),
400
-  ));
401
-  $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
402
-  $handler->override_option('path', 'moderate/profiles');
403
-  $handler->override_option('menu', array(
400
+    ));
401
+    $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page'));
402
+    $handler->override_option('path', 'moderate/profiles');
403
+    $handler->override_option('menu', array(
404 404
     'type' => 'default tab',
405 405
     'title' => 'Queue',
406 406
     'description' => '',
407 407
     'weight' => '-50',
408 408
     'name' => 'primary-links',
409
-  ));
410
-  $handler->override_option('tab_options', array(
409
+    ));
410
+    $handler->override_option('tab_options', array(
411 411
     'type' => 'normal',
412 412
     'title' => 'Moderation',
413 413
     'description' => '',
414 414
     'weight' => '0',
415 415
     'name' => 'primary-links',
416
-  ));
416
+    ));
417 417
 
418
-  $views[$view->name] = $view;
418
+    $views[$view->name] = $view;
419 419
 
420
-  // Exported view: user_activity
421
-  $view = new view;
422
-  $view->name = 'user_activity';
423
-  $view->description = 'A feed of a user\'s activity on the site';
424
-  $view->tag = '';
425
-  $view->base_table = 'node_revisions';
426
-  $view->core = 6;
427
-  $view->api_version = '2';
428
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
429
-  $handler = $view->new_display('default', 'Defaults', 'default');
430
-  $handler->override_option('relationships', array(
420
+    // Exported view: user_activity
421
+    $view = new view;
422
+    $view->name = 'user_activity';
423
+    $view->description = 'A feed of a user\'s activity on the site';
424
+    $view->tag = '';
425
+    $view->base_table = 'node_revisions';
426
+    $view->core = 6;
427
+    $view->api_version = '2';
428
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
429
+    $handler = $view->new_display('default', 'Defaults', 'default');
430
+    $handler->override_option('relationships', array(
431 431
     'uid' => array(
432
-      'label' => 'user',
433
-      'required' => 1,
434
-      'id' => 'uid',
435
-      'table' => 'node_revisions',
436
-      'field' => 'uid',
437
-      'relationship' => 'none',
432
+        'label' => 'user',
433
+        'required' => 1,
434
+        'id' => 'uid',
435
+        'table' => 'node_revisions',
436
+        'field' => 'uid',
437
+        'relationship' => 'none',
438 438
     ),
439
-  ));
440
-  $handler->override_option('fields', array(
439
+    ));
440
+    $handler->override_option('fields', array(
441 441
     'nid' => array(
442
-      'label' => 'Nid',
443
-      'alter' => array(
442
+        'label' => 'Nid',
443
+        'alter' => array(
444 444
         'alter_text' => 0,
445 445
         'text' => '',
446 446
         'make_link' => 0,
@@ -459,21 +459,21 @@  discard block
 block discarded – undo
459 459
         'ellipsis' => 1,
460 460
         'html' => 0,
461 461
         'strip_tags' => 0,
462
-      ),
463
-      'empty' => '',
464
-      'hide_empty' => 0,
465
-      'empty_zero' => 0,
466
-      'hide_alter_empty' => 1,
467
-      'link_to_node' => 0,
468
-      'exclude' => 1,
469
-      'id' => 'nid',
470
-      'table' => 'node',
471
-      'field' => 'nid',
472
-      'relationship' => 'none',
462
+        ),
463
+        'empty' => '',
464
+        'hide_empty' => 0,
465
+        'empty_zero' => 0,
466
+        'hide_alter_empty' => 1,
467
+        'link_to_node' => 0,
468
+        'exclude' => 1,
469
+        'id' => 'nid',
470
+        'table' => 'node',
471
+        'field' => 'nid',
472
+        'relationship' => 'none',
473 473
     ),
474 474
     'title' => array(
475
-      'label' => 'Title',
476
-      'alter' => array(
475
+        'label' => 'Title',
476
+        'alter' => array(
477 477
         'alter_text' => 0,
478 478
         'text' => '',
479 479
         'make_link' => 0,
@@ -492,21 +492,21 @@  discard block
 block discarded – undo
492 492
         'ellipsis' => 1,
493 493
         'html' => 0,
494 494
         'strip_tags' => 0,
495
-      ),
496
-      'empty' => '',
497
-      'hide_empty' => 0,
498
-      'empty_zero' => 0,
499
-      'hide_alter_empty' => 1,
500
-      'link_to_node' => 0,
501
-      'exclude' => 1,
502
-      'id' => 'title',
503
-      'table' => 'node',
504
-      'field' => 'title',
505
-      'relationship' => 'none',
495
+        ),
496
+        'empty' => '',
497
+        'hide_empty' => 0,
498
+        'empty_zero' => 0,
499
+        'hide_alter_empty' => 1,
500
+        'link_to_node' => 0,
501
+        'exclude' => 1,
502
+        'id' => 'title',
503
+        'table' => 'node',
504
+        'field' => 'title',
505
+        'relationship' => 'none',
506 506
     ),
507 507
     'type' => array(
508
-      'label' => 'Type',
509
-      'alter' => array(
508
+        'label' => 'Type',
509
+        'alter' => array(
510 510
         'alter_text' => 0,
511 511
         'text' => '',
512 512
         'make_link' => 0,
@@ -525,22 +525,22 @@  discard block
 block discarded – undo
525 525
         'ellipsis' => 1,
526 526
         'html' => 0,
527 527
         'strip_tags' => 0,
528
-      ),
529
-      'empty' => '',
530
-      'hide_empty' => 0,
531
-      'empty_zero' => 0,
532
-      'hide_alter_empty' => 1,
533
-      'link_to_node' => 0,
534
-      'machine_name' => 0,
535
-      'exclude' => 1,
536
-      'id' => 'type',
537
-      'table' => 'node',
538
-      'field' => 'type',
539
-      'relationship' => 'none',
528
+        ),
529
+        'empty' => '',
530
+        'hide_empty' => 0,
531
+        'empty_zero' => 0,
532
+        'hide_alter_empty' => 1,
533
+        'link_to_node' => 0,
534
+        'machine_name' => 0,
535
+        'exclude' => 1,
536
+        'id' => 'type',
537
+        'table' => 'node',
538
+        'field' => 'type',
539
+        'relationship' => 'none',
540 540
     ),
541 541
     'uid' => array(
542
-      'label' => 'Uid',
543
-      'alter' => array(
542
+        'label' => 'Uid',
543
+        'alter' => array(
544 544
         'alter_text' => 0,
545 545
         'text' => '',
546 546
         'make_link' => 0,
@@ -559,21 +559,21 @@  discard block
 block discarded – undo
559 559
         'ellipsis' => 1,
560 560
         'html' => 0,
561 561
         'strip_tags' => 0,
562
-      ),
563
-      'empty' => '',
564
-      'hide_empty' => 0,
565
-      'empty_zero' => 0,
566
-      'hide_alter_empty' => 1,
567
-      'link_to_user' => 0,
568
-      'exclude' => 1,
569
-      'id' => 'uid',
570
-      'table' => 'users',
571
-      'field' => 'uid',
572
-      'relationship' => 'uid',
562
+        ),
563
+        'empty' => '',
564
+        'hide_empty' => 0,
565
+        'empty_zero' => 0,
566
+        'hide_alter_empty' => 1,
567
+        'link_to_user' => 0,
568
+        'exclude' => 1,
569
+        'id' => 'uid',
570
+        'table' => 'users',
571
+        'field' => 'uid',
572
+        'relationship' => 'uid',
573 573
     ),
574 574
     'nothing' => array(
575
-      'label' => '',
576
-      'alter' => array(
575
+        'label' => '',
576
+        'alter' => array(
577 577
         'text' => '<div class="gray-divider"></div>',
578 578
         'make_link' => 0,
579 579
         'path' => '',
@@ -591,20 +591,20 @@  discard block
 block discarded – undo
591 591
         'ellipsis' => 1,
592 592
         'html' => 0,
593 593
         'strip_tags' => 0,
594
-      ),
595
-      'empty' => '',
596
-      'hide_empty' => 0,
597
-      'empty_zero' => 0,
598
-      'hide_alter_empty' => 1,
599
-      'exclude' => 0,
600
-      'id' => 'nothing',
601
-      'table' => 'views',
602
-      'field' => 'nothing',
603
-      'relationship' => 'none',
594
+        ),
595
+        'empty' => '',
596
+        'hide_empty' => 0,
597
+        'empty_zero' => 0,
598
+        'hide_alter_empty' => 1,
599
+        'exclude' => 0,
600
+        'id' => 'nothing',
601
+        'table' => 'views',
602
+        'field' => 'nothing',
603
+        'relationship' => 'none',
604 604
     ),
605 605
     'phpcode_1' => array(
606
-      'label' => '',
607
-      'alter' => array(
606
+        'label' => '',
607
+        'alter' => array(
608 608
         'alter_text' => 0,
609 609
         'text' => '',
610 610
         'make_link' => 0,
@@ -623,12 +623,12 @@  discard block
 block discarded – undo
623 623
         'ellipsis' => 1,
624 624
         'html' => 0,
625 625
         'strip_tags' => 0,
626
-      ),
627
-      'empty' => '',
628
-      'hide_empty' => 0,
629
-      'empty_zero' => 0,
630
-      'hide_alter_empty' => 1,
631
-      'value' => '<?php
626
+        ),
627
+        'empty' => '',
628
+        'hide_empty' => 0,
629
+        'empty_zero' => 0,
630
+        'hide_alter_empty' => 1,
631
+        'value' => '<?php
632 632
 
633 633
 switch($data->node_type) {
634 634
 case \'forum\':
@@ -657,18 +657,18 @@  discard block
 block discarded – undo
657 657
 $account = user_load($uid);
658 658
 echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment));
659 659
 ?>',
660
-      'exclude' => 0,
661
-      'id' => 'phpcode_1',
662
-      'table' => 'customfield',
663
-      'field' => 'phpcode',
664
-      'relationship' => 'none',
665
-      'override' => array(
660
+        'exclude' => 0,
661
+        'id' => 'phpcode_1',
662
+        'table' => 'customfield',
663
+        'field' => 'phpcode',
664
+        'relationship' => 'none',
665
+        'override' => array(
666 666
         'button' => 'Override',
667
-      ),
667
+        ),
668 668
     ),
669 669
     'body' => array(
670
-      'label' => '',
671
-      'alter' => array(
670
+        'label' => '',
671
+        'alter' => array(
672 672
         'alter_text' => 0,
673 673
         'text' => '',
674 674
         'make_link' => 0,
@@ -687,20 +687,20 @@  discard block
 block discarded – undo
687 687
         'ellipsis' => 1,
688 688
         'html' => 0,
689 689
         'strip_tags' => 1,
690
-      ),
691
-      'empty' => '',
692
-      'hide_empty' => 0,
693
-      'empty_zero' => 0,
694
-      'hide_alter_empty' => 1,
695
-      'exclude' => 0,
696
-      'id' => 'body',
697
-      'table' => 'node_revisions',
698
-      'field' => 'body',
699
-      'relationship' => 'none',
690
+        ),
691
+        'empty' => '',
692
+        'hide_empty' => 0,
693
+        'empty_zero' => 0,
694
+        'hide_alter_empty' => 1,
695
+        'exclude' => 0,
696
+        'id' => 'body',
697
+        'table' => 'node_revisions',
698
+        'field' => 'body',
699
+        'relationship' => 'none',
700 700
     ),
701 701
     'timestamp' => array(
702
-      'label' => '',
703
-      'alter' => array(
702
+        'label' => '',
703
+        'alter' => array(
704 704
         'alter_text' => 0,
705 705
         'text' => '',
706 706
         'make_link' => 0,
@@ -719,40 +719,40 @@  discard block
 block discarded – undo
719 719
         'ellipsis' => 1,
720 720
         'html' => 0,
721 721
         'strip_tags' => 0,
722
-      ),
723
-      'empty' => '',
724
-      'hide_empty' => 0,
725
-      'empty_zero' => 0,
726
-      'hide_alter_empty' => 1,
727
-      'date_format' => 'custom',
728
-      'custom_date_format' => 'jS F Y',
729
-      'exclude' => 0,
730
-      'id' => 'timestamp',
731
-      'table' => 'node_revisions',
732
-      'field' => 'timestamp',
733
-      'relationship' => 'none',
722
+        ),
723
+        'empty' => '',
724
+        'hide_empty' => 0,
725
+        'empty_zero' => 0,
726
+        'hide_alter_empty' => 1,
727
+        'date_format' => 'custom',
728
+        'custom_date_format' => 'jS F Y',
729
+        'exclude' => 0,
730
+        'id' => 'timestamp',
731
+        'table' => 'node_revisions',
732
+        'field' => 'timestamp',
733
+        'relationship' => 'none',
734 734
     ),
735
-  ));
736
-  $handler->override_option('arguments', array(
735
+    ));
736
+    $handler->override_option('arguments', array(
737 737
     'uid' => array(
738
-      'default_action' => 'default',
739
-      'style_plugin' => 'default_summary',
740
-      'style_options' => array(),
741
-      'wildcard' => 'all',
742
-      'wildcard_substitution' => 'All',
743
-      'title' => '',
744
-      'breadcrumb' => '',
745
-      'default_argument_type' => 'user',
746
-      'default_argument' => '',
747
-      'validate_type' => 'user',
748
-      'validate_fail' => 'empty',
749
-      'break_phrase' => 0,
750
-      'not' => 0,
751
-      'id' => 'uid',
752
-      'table' => 'users',
753
-      'field' => 'uid',
754
-      'validate_user_argument_type' => 'uid',
755
-      'validate_user_roles' => array(
738
+        'default_action' => 'default',
739
+        'style_plugin' => 'default_summary',
740
+        'style_options' => array(),
741
+        'wildcard' => 'all',
742
+        'wildcard_substitution' => 'All',
743
+        'title' => '',
744
+        'breadcrumb' => '',
745
+        'default_argument_type' => 'user',
746
+        'default_argument' => '',
747
+        'validate_type' => 'user',
748
+        'validate_fail' => 'empty',
749
+        'break_phrase' => 0,
750
+        'not' => 0,
751
+        'id' => 'uid',
752
+        'table' => 'users',
753
+        'field' => 'uid',
754
+        'validate_user_argument_type' => 'uid',
755
+        'validate_user_roles' => array(
756 756
         2 => 0,
757 757
         3519698132 => 0,
758 758
         1110965548 => 0,
@@ -761,20 +761,20 @@  discard block
 block discarded – undo
761 761
         268174006 => 0,
762 762
         1271379760 => 0,
763 763
         933038561 => 0,
764
-      ),
765
-      'relationship' => 'uid',
766
-      'default_options_div_prefix' => '',
767
-      'default_taxonomy_tid_term_page' => 0,
768
-      'default_taxonomy_tid_node' => 0,
769
-      'default_taxonomy_tid_limit' => 0,
770
-      'default_taxonomy_tid_vids' => array(
764
+        ),
765
+        'relationship' => 'uid',
766
+        'default_options_div_prefix' => '',
767
+        'default_taxonomy_tid_term_page' => 0,
768
+        'default_taxonomy_tid_node' => 0,
769
+        'default_taxonomy_tid_limit' => 0,
770
+        'default_taxonomy_tid_vids' => array(
771 771
         1 => 0,
772 772
         2 => 0,
773
-      ),
774
-      'default_argument_user' => 0,
775
-      'default_argument_fixed' => '',
776
-      'default_argument_php' => '',
777
-      'validate_argument_node_type' => array(
773
+        ),
774
+        'default_argument_user' => 0,
775
+        'default_argument_fixed' => '',
776
+        'default_argument_php' => '',
777
+        'validate_argument_node_type' => array(
778 778
         'page' => 0,
779 779
         'news' => 0,
780 780
         'team' => 0,
@@ -783,20 +783,20 @@  discard block
 block discarded – undo
783 783
         'forum' => 0,
784 784
         'panel' => 0,
785 785
         'story' => 0,
786
-      ),
787
-      'validate_argument_node_access' => 0,
788
-      'validate_argument_nid_type' => 'nid',
789
-      'validate_argument_vocabulary' => array(
786
+        ),
787
+        'validate_argument_node_access' => 0,
788
+        'validate_argument_nid_type' => 'nid',
789
+        'validate_argument_vocabulary' => array(
790 790
         1 => 0,
791 791
         2 => 0,
792
-      ),
793
-      'validate_argument_type' => 'tid',
794
-      'validate_argument_transform' => 0,
795
-      'validate_user_restrict_roles' => 0,
796
-      'validate_argument_php' => '',
797
-      'me_redirect' => 0,
798
-      'me_validate_user_argument_type' => 'uid',
799
-      'me_validate_user_roles' => array(
792
+        ),
793
+        'validate_argument_type' => 'tid',
794
+        'validate_argument_transform' => 0,
795
+        'validate_user_restrict_roles' => 0,
796
+        'validate_argument_php' => '',
797
+        'me_redirect' => 0,
798
+        'me_validate_user_argument_type' => 'uid',
799
+        'me_validate_user_roles' => array(
800 800
         2 => 0,
801 801
         3519698132 => 0,
802 802
         1110965548 => 0,
@@ -805,67 +805,67 @@  discard block
 block discarded – undo
805 805
         268174006 => 0,
806 806
         1271379760 => 0,
807 807
         933038561 => 0,
808
-      ),
809
-      'validate_argument_node_flag_name' => '*relationship*',
810
-      'validate_argument_node_flag_test' => 'flaggable',
811
-      'validate_argument_node_flag_id_type' => 'id',
812
-      'validate_argument_user_flag_name' => '*relationship*',
813
-      'validate_argument_user_flag_test' => 'flaggable',
814
-      'validate_argument_user_flag_id_type' => 'id',
815
-      'me_validate_user_restrict_roles' => 0,
808
+        ),
809
+        'validate_argument_node_flag_name' => '*relationship*',
810
+        'validate_argument_node_flag_test' => 'flaggable',
811
+        'validate_argument_node_flag_id_type' => 'id',
812
+        'validate_argument_user_flag_name' => '*relationship*',
813
+        'validate_argument_user_flag_test' => 'flaggable',
814
+        'validate_argument_user_flag_id_type' => 'id',
815
+        'me_validate_user_restrict_roles' => 0,
816 816
     ),
817
-  ));
818
-  $handler->override_option('access', array(
817
+    ));
818
+    $handler->override_option('access', array(
819 819
     'type' => 'none',
820
-  ));
821
-  $handler->override_option('cache', array(
820
+    ));
821
+    $handler->override_option('cache', array(
822 822
     'type' => 'none',
823
-  ));
824
-  $handler->override_option('items_per_page', 5);
825
-  $handler->override_option('use_pager', '1');
826
-  $handler->override_option('row_options', array(
823
+    ));
824
+    $handler->override_option('items_per_page', 5);
825
+    $handler->override_option('use_pager', '1');
826
+    $handler->override_option('row_options', array(
827 827
     'inline' => array(
828
-      'value' => 'value',
829
-      'phpcode_1' => 'phpcode_1',
828
+        'value' => 'value',
829
+        'phpcode_1' => 'phpcode_1',
830 830
     ),
831 831
     'separator' => ' ',
832 832
     'hide_empty' => 0,
833
-  ));
834
-  $handler = $view->new_display('block', 'Block', 'block_1');
835
-  $handler->override_option('block_description', '');
836
-  $handler->override_option('block_caching', -1);
837
-  $handler = $view->new_display('page', 'Page', 'page_1');
838
-  $handler->override_option('title', 'Recent posts');
839
-  $handler->override_option('style_plugin', 'grid');
840
-  $handler->override_option('style_options', array(
833
+    ));
834
+    $handler = $view->new_display('block', 'Block', 'block_1');
835
+    $handler->override_option('block_description', '');
836
+    $handler->override_option('block_caching', -1);
837
+    $handler = $view->new_display('page', 'Page', 'page_1');
838
+    $handler->override_option('title', 'Recent posts');
839
+    $handler->override_option('style_plugin', 'grid');
840
+    $handler->override_option('style_options', array(
841 841
     'grouping' => '',
842 842
     'columns' => '1',
843 843
     'alignment' => 'vertical',
844 844
     'fill_single_line' => 1,
845 845
     'summary' => '',
846
-  ));
847
-  $handler->override_option('row_options', array(
846
+    ));
847
+    $handler->override_option('row_options', array(
848 848
     'inline' => array(),
849 849
     'separator' => '',
850 850
     'hide_empty' => 0,
851
-  ));
852
-  $handler->override_option('path', 'account/%/posts');
853
-  $handler->override_option('menu', array(
851
+    ));
852
+    $handler->override_option('path', 'account/%/posts');
853
+    $handler->override_option('menu', array(
854 854
     'type' => 'none',
855 855
     'title' => '',
856 856
     'description' => '',
857 857
     'weight' => '0',
858 858
     'name' => 'primary-links',
859
-  ));
860
-  $handler->override_option('tab_options', array(
859
+    ));
860
+    $handler->override_option('tab_options', array(
861 861
     'type' => 'none',
862 862
     'title' => '',
863 863
     'description' => '',
864 864
     'weight' => 0,
865 865
     'name' => 'navigation',
866
-  ));
866
+    ));
867 867
 
868
-  $views[$view->name] = $view;
868
+    $views[$view->name] = $view;
869 869
 
870
-  return $views;
870
+    return $views;
871 871
 }
Please login to merge, or discard this patch.
sites/default/boinc/modules/comment_form_block/comment_form_block.module 3 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,40 +9,40 @@  discard block
 block discarded – undo
9 9
  * Implements hook_block() for Drupal 6 compatibility
10 10
  */
11 11
 function comment_form_block_block($op = 'list', $delta = 0, $edit = array()) {
12
-  switch ($op) {
13
-  case 'view':
12
+    switch ($op) {
13
+    case 'view':
14 14
     //$block = node_comment_block_block_view($delta);
15 15
     $block = array();
16 16
     if ($delta == 'comment_form') {
17
-      if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
17
+        if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         global $user;
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
-          $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
21
+            $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
+            $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
23
+            $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24
+        }
24 25
         }
25
-      }
26 26
     }
27 27
     break;
28
-  case 'list':
28
+    case 'list':
29 29
     $blocks = comment_form_block_block_info();
30 30
     return $blocks;
31 31
     break;
32
-  default:
32
+    default:
33 33
   }
34
-  return $block;
34
+    return $block;
35 35
 }
36 36
 
37 37
 /**
38 38
  * Implements hook_block_info().
39 39
  */
40 40
 function comment_form_block_block_info() {
41
-  $blocks['comment_form'] = array(
41
+    $blocks['comment_form'] = array(
42 42
     'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
43
-  );
43
+    );
44 44
 
45
-  return $blocks;
45
+    return $blocks;
46 46
 }
47 47
 
48 48
 /**
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
  * Implements hook_form_FORM_ID_alter() for block_admin_configure.
82 82
  */
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84
-  if (isset($form['delta'])) {
84
+    if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
87
-      $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
86
+        $form['settings']['title']['#disabled'] = TRUE;
87
+        $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88
+    }
88 89
     }
89
-  }
90 90
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $node = node_load($nid);
20 20
         if ($node->comment !== 0 AND user_access('post comments', $user)) {
21 21
           $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
22
+          $block['content'] = '<h2>'.bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment').'</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24 24
         }
25 25
       }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
       if (arg(0) == 'node' && is_numeric($nid = arg(1)) && !arg(2)) {
18 18
         global $user;
19 19
         $node = node_load($nid);
20
-        if ($node->comment !== 0 AND user_access('post comments', $user)) {
21
-          $block['subject'] = NULL; // This should be NULL otherwise there will be duplicate h2 elements.
22
-          $block['content'] = '<h2>' . bts('Post new comment', array(), NULL, 'boinc:forum-post-new-comment') . '</h2>';
20
+        if ($node->comment !== 0 and user_access('post comments', $user)) {
21
+          $block['subject'] = null; // This should be NULL otherwise there will be duplicate h2 elements.
22
+          $block['content'] = '<h2>' . bts('Post new comment', array(), null, 'boinc:forum-post-new-comment') . '</h2>';
23 23
           $block['content'] .= drupal_get_form('comment_form', array('nid' => $nid)); 
24 24
         }
25 25
       }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function comment_form_block_block_info() {
41 41
   $blocks['comment_form'] = array(
42
-    'info' => bts('Comment form', array(), NULL, 'boinc:forum-comment-form'),
42
+    'info' => bts('Comment form', array(), null, 'boinc:forum-comment-form'),
43 43
   );
44 44
 
45 45
   return $blocks;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 function comment_form_block_form_block_admin_configure_alter(&$form, &$form_state) {
84 84
   if (isset($form['delta'])) {
85 85
     if ($form['delta']['#value'] == 'comment_form') {
86
-      $form['settings']['title']['#disabled'] = TRUE;
86
+      $form['settings']['title']['#disabled'] = true;
87 87
       $form['settings']['title']['#description'] = t('The title for this block cannot be overridden.');
88 88
     }
89 89
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinccore/boinccore.module 5 patches
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -551,12 +551,12 @@  discard block
 block discarded – undo
551 551
  */
552 552
 function boinccore_locale($op = 'groups', $group = NULL) {
553 553
   switch ($op) {
554
-    case 'groups':
555
-        return array('boinc' => 'BOINC');
556
-    case 'info':
557
-      //$info['boinc']['refresh callback'] = 'boinccore_locale_refresh';
558
-      $info['boinc']['format'] = FALSE;
559
-      return $info;
554
+  case 'groups':
555
+      return array('boinc' => 'BOINC');
556
+  case 'info':
557
+    //$info['boinc']['refresh callback'] = 'boinccore_locale_refresh';
558
+    $info['boinc']['format'] = FALSE;
559
+    return $info;
560 560
   }
561 561
 }
562 562
 
@@ -1885,19 +1885,19 @@  discard block
 block discarded – undo
1885 1885
     // Transform arguments before inserting them.
1886 1886
     foreach ($args as $key => $value) {
1887 1887
       switch ($key [0]) {
1888
-        case '@':
1889
-          // Escaped only.
1890
-          $args [$key] = check_plain($value);
1891
-          break;
1892
-
1893
-        case '%':
1894
-        default:
1895
-          // Escaped and placeholder.
1896
-          $args [$key] = theme('placeholder', $value);
1897
-          break;
1898
-
1899
-        case '!':
1900
-          // Pass-through.
1888
+      case '@':
1889
+        // Escaped only.
1890
+        $args [$key] = check_plain($value);
1891
+        break;
1892
+
1893
+      case '%':
1894
+      default:
1895
+        // Escaped and placeholder.
1896
+        $args [$key] = theme('placeholder', $value);
1897
+        break;
1898
+
1899
+      case '!':
1900
+        // Pass-through.
1901 1901
       }
1902 1902
     }
1903 1903
     return strtr($string, $args);
Please login to merge, or discard this patch.
Braces   +29 added lines, -58 removed lines patch added patch discarded remove patch
@@ -430,8 +430,7 @@  discard block
 block discarded – undo
430 430
       $user_info .= '  <div class="picture">';
431 431
       if (is_array($user_image) AND $user_image['image']['filepath']) {
432 432
         $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
433
-      }
434
-      elseif (is_string($user_image)) {
433
+      } elseif (is_string($user_image)) {
435 434
         $user_info .= '<img src="' . $user_image . '"/>';
436 435
       }
437 436
       $user_info .= '  </div>';
@@ -473,8 +472,7 @@  discard block
 block discarded – undo
473 472
     // If a specific comment is being referenced, go back to it on cancel
474 473
     if ($comment_ref = $form['pid']['#value']) {
475 474
       $cancel_url = "goto/comment/{$comment_ref}";
476
-    }
477
-    else {
475
+    } else {
478 476
       $cancel_url = "node/{$form['nid']['#value']}";
479 477
     }
480 478
     
@@ -528,8 +526,7 @@  discard block
 block discarded – undo
528 526
             '#weight' => 1000,
529 527
           );
530 528
         }
531
-      }
532
-      else {
529
+      } else {
533 530
         $form = NULL;
534 531
         $form['from'] = array(
535 532
           '#type'  => 'item',
@@ -626,8 +623,7 @@  discard block
 block discarded – undo
626 623
           'title' => bts('Reply to this topic with a quote', array(), NULL, 'boinc:forum-reply-to-comment')
627 624
       );
628 625
     }
629
-  }
630
-  else {
626
+  } else {
631 627
     // Standard EDIT, DELETE, and REPLY links are created by Drupal, but we want to alter them
632 628
     if (isset($links['comment_delete'])) {
633 629
       $links['comment_delete']['attributes'] = array(
@@ -681,8 +677,7 @@  discard block
 block discarded – undo
681 677
                   'title' => bts('Remove sticky status from this topic', array(), NULL, 'boinc:forum-unsticky-comment')
682 678
               )
683 679
           );
684
-        }
685
-        else {
680
+        } else {
686 681
           $links['make_sticky'] = array(
687 682
               'title' => bts('Make sticky', array(), NULL, 'boinc:forum-sticky-comment'),
688 683
               'href' => "{$node_control}/sticky",
@@ -699,8 +694,7 @@  discard block
 block discarded – undo
699 694
                   'title' => bts('Lock this thread for comments', array(), NULL, 'boinc:forum-lock-comment')
700 695
               )
701 696
           );
702
-        }
703
-        else {
697
+        } else {
704 698
           $links['unlock'] = array(
705 699
               'title' => bts('Unlock', array(), NULL, 'boinc:forum-unlock-comment'),
706 700
               'href' => "{$node_control}/unlock",
@@ -717,8 +711,7 @@  discard block
 block discarded – undo
717 711
                   'title' => bts('Hide this topic', array(), NULL, 'boinc:forum-hide-comment')
718 712
               )
719 713
           );
720
-        }
721
-        else {
714
+        } else {
722 715
           $links['unhide'] = array(
723 716
               'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
724 717
               'href' => "{$node_control}/unhide",
@@ -729,8 +722,7 @@  discard block
 block discarded – undo
729 722
         }
730 723
       }// if user_access('edit any forum topic')
731 724
     }
732
-  }
733
-  else if ($type=='comment') {
725
+  } else if ($type=='comment') {
734 726
     $node = node_load($object->nid);
735 727
     $nid = $object->nid;
736 728
     $cid = $object->cid;
@@ -771,8 +763,7 @@  discard block
 block discarded – undo
771 763
                 'title' => bts('Hide this comment', array(), NULL, 'boinc:forum-hide-comment')
772 764
             )
773 765
         );
774
-      }
775
-      else {
766
+      } else {
776 767
         $links['unhide'] = array(
777 768
             'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
778 769
             'href' => "{$comment_control}/unhide",
@@ -958,8 +949,7 @@  discard block
 block discarded – undo
958 949
       watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
959 950
         ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
960 951
     }
961
-  }
962
-  elseif ($project_prefs) {
952
+  } elseif ($project_prefs) {
963 953
     $xml->loadXML($project_prefs, LIBXML_NOBLANKS);
964 954
     if ($errors = libxml_get_errors($xml)) {
965 955
       $lines = explode("\r", $project_prefs);
@@ -1002,8 +992,7 @@  discard block
 block discarded – undo
1002 992
         node_save($content_profile);
1003 993
       }
1004 994
     }
1005
-  }
1006
-  else {
995
+  } else {
1007 996
     $xml = array(
1008 997
       'error' => array(
1009 998
         'error_num' => -112,
@@ -1138,8 +1127,7 @@  discard block
 block discarded – undo
1138 1127
           node_save($node);
1139 1128
           // Save the team IDs to a BOINC <--> Drupal reference table.
1140 1129
           db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boincteam_id, $node->nid);
1141
-        }
1142
-        else {
1130
+        } else {
1143 1131
           $xml['create_team_reply']['warning'] = t(
1144 1132
             'There was a problem integrating this team into Drupal. Please
1145 1133
             contact @project administrators!', array('@project' => PROJECT)
@@ -1154,8 +1142,7 @@  discard block
 block discarded – undo
1154 1142
           // Delete from the BOINC DB if we can't sync with Drupal
1155 1143
           $boincteam::delete();
1156 1144
         }
1157
-      }
1158
-      else {
1145
+      } else {
1159 1146
         $xml['create_team_reply']['warning'] = t(
1160 1147
           'There was a problem integrating this team into Drupal. Please
1161 1148
           contact @project administrators!', array('@project' => PROJECT)
@@ -1169,8 +1156,7 @@  discard block
 block discarded – undo
1169 1156
         );
1170 1157
       }
1171 1158
     }
1172
-  }
1173
-  else {
1159
+  } else {
1174 1160
     $xml = array(
1175 1161
       'error' => array(
1176 1162
         'error_num' => -1,
@@ -1239,8 +1225,7 @@  discard block
 block discarded – undo
1239 1225
         );
1240 1226
         $xml['users']['user'][] = $team_member;
1241 1227
       }
1242
-    }
1243
-    else {
1228
+    } else {
1244 1229
       // Query BOINC database user table
1245 1230
       db_set_active('boinc_rw');
1246 1231
       $result = db_query("
@@ -1293,8 +1278,7 @@  discard block
 block discarded – undo
1293 1278
         $xml['users']['user'][] = $team_members[$member->boinc_id];
1294 1279
       }
1295 1280
     } // end if credit_only
1296
-  }
1297
-  else {
1281
+  } else {
1298 1282
     $xml = array(
1299 1283
       'error' => array(
1300 1284
         'error_num' => -136,
@@ -1343,24 +1327,19 @@  discard block
 block discarded – undo
1343 1327
                 if ($avatar_image) {
1344 1328
                   $profile_node->field_image[0] = $avatar_image;
1345 1329
                   node_save($profile_node);
1346
-                }
1347
-                else {
1330
+                } else {
1348 1331
                   $error = 'Error saving avatar to profile';
1349 1332
                 }
1350
-              }
1351
-              else {
1333
+              } else {
1352 1334
                 $error = 'Unable to load user profile';
1353 1335
               }
1354
-            }
1355
-            else {
1336
+            } else {
1356 1337
               $error = 'User has no profile, so avatar could not be added';
1357 1338
             }
1358
-          }
1359
-          else {
1339
+          } else {
1360 1340
             $error = 'Unable to save remote image';
1361 1341
           }
1362
-        }
1363
-        else {
1342
+        } else {
1364 1343
           $error = 'Could not find avatar image at URL';
1365 1344
         }
1366 1345
       }
@@ -1387,8 +1366,7 @@  discard block
 block discarded – undo
1387 1366
             'success' => NULL,
1388 1367
           ),
1389 1368
         );
1390
-      }
1391
-      else {
1369
+      } else {
1392 1370
         // Failure
1393 1371
         $xml = array(
1394 1372
           'error' => array(
@@ -1397,8 +1375,7 @@  discard block
 block discarded – undo
1397 1375
           ),
1398 1376
         );
1399 1377
       }
1400
-    }
1401
-    else {
1378
+    } else {
1402 1379
       // Drupal user not found
1403 1380
       $xml = array(
1404 1381
         'error' => array(
@@ -1407,8 +1384,7 @@  discard block
 block discarded – undo
1407 1384
         ),
1408 1385
       );
1409 1386
     }
1410
-  }
1411
-  else {
1387
+  } else {
1412 1388
     // BOINC user not found
1413 1389
     $xml = array(
1414 1390
       'error' => array(
@@ -1526,8 +1502,7 @@  discard block
 block discarded – undo
1526 1502
         ),
1527 1503
       );
1528 1504
     }
1529
-  }
1530
-  else {
1505
+  } else {
1531 1506
     $xml = array(
1532 1507
       'error' => array(
1533 1508
         'error_num' => -136,
@@ -1651,8 +1626,7 @@  discard block
 block discarded – undo
1651 1626
         // Get the number of comments per page
1652 1627
         if ($user->comments_per_page) {
1653 1628
           $comments_per_page = $user->comments_per_page;
1654
-        }
1655
-        else {
1629
+        } else {
1656 1630
           $node = node_load($object->nid);
1657 1631
           $comments_per_page = variable_get(
1658 1632
             "comment_default_per_page_{$node->type}", 50
@@ -1673,8 +1647,7 @@  discard block
 block discarded – undo
1673 1647
     // Check for a login, then redirect to the user's friend requests page
1674 1648
     if ($user->uid) {
1675 1649
       drupal_goto("account/{$user->uid}/friends/pending");
1676
-    }
1677
-    else {
1650
+    } else {
1678 1651
       drupal_goto('user/login', array(
1679 1652
         'destination' => 'goto/friend-requests'
1680 1653
       ));
@@ -1950,8 +1923,7 @@  discard block
 block discarded – undo
1950 1923
     if ($moderator_rid !== FALSE) {
1951 1924
       $settings['recipients'] = array($moderator_rid);
1952 1925
       rules_action_mail_to_users_of_role($settings);
1953
-    }
1954
-    else {
1926
+    } else {
1955 1927
       watchdog(
1956 1928
         'boinccore',
1957 1929
         'Unable to identify members of the moderator role to send moderator notifications!',
@@ -1982,8 +1954,7 @@  discard block
 block discarded – undo
1982 1954
   }
1983 1955
   if (empty($args)) {
1984 1956
     return $string;
1985
-  }
1986
-  else {
1957
+  } else {
1987 1958
     // Transform arguments before inserting them.
1988 1959
     foreach ($args as $key => $value) {
1989 1960
       switch ($key [0]) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -69,84 +69,84 @@  discard block
 block discarded – undo
69 69
     'title' => 'Look up account RPC',
70 70
     'description' => 'RPC for getting the authenticator for a user account.',
71 71
     'page callback' => 'boinccore_lookup_account',
72
-    'access callback' => TRUE,
72
+    'access callback' => true,
73 73
     'type' => MENU_CALLBACK
74 74
   );
75 75
   $items['am_get_info.php'] = array(
76 76
     'title' => 'Account manager get info RPC',
77 77
     'description' => 'RPC for getting assorted details of a user account.',
78 78
     'page callback' => 'boinccore_am_get_info',
79
-    'access callback' => TRUE,
79
+    'access callback' => true,
80 80
     'type' => MENU_CALLBACK
81 81
   );
82 82
   $items['am_set_info.php'] = array(
83 83
     'title' => 'Account manager set info RPC',
84 84
     'description' => 'RPC for updating assorted details of a user account.',
85 85
     'page callback' => 'boinccore_am_set_info',
86
-    'access callback' => TRUE,
86
+    'access callback' => true,
87 87
     'type' => MENU_CALLBACK
88 88
   );
89 89
   $items['am_set_host_info.php'] = array(
90 90
     'title' => 'Account manager set host info RPC',
91 91
     'description' => 'RPC for updating the venue for a given host.',
92 92
     'page callback' => 'boinccore_am_set_host_info',
93
-    'access callback' => TRUE,
93
+    'access callback' => true,
94 94
     'type' => MENU_CALLBACK
95 95
   );
96 96
   $items['show_user.php'] = array(
97 97
     'title' => 'Show user RPC',
98 98
     'description' => 'RPC for getting assorted details of a user account.',
99 99
     'page callback' => 'boinccore_show_user',
100
-    'access callback' => TRUE,
100
+    'access callback' => true,
101 101
     'type' => MENU_CALLBACK
102 102
   );
103 103
   $items['pending.php'] = array(
104 104
     'title' => 'Pending credit RPC',
105 105
     'description' => 'RPC for getting pending credit for a given account.',
106 106
     'page callback' => 'boinccore_pending_credit',
107
-    'access callback' => TRUE,
107
+    'access callback' => true,
108 108
     'type' => MENU_CALLBACK
109 109
   );
110 110
   $items['create_team.php'] = array(
111 111
     'title' => 'Create team RPC',
112 112
     'description' => 'RPC for creating a new team.',
113 113
     'page callback' => 'boinccore_create_team',
114
-    'access callback' => TRUE,
114
+    'access callback' => true,
115 115
     'type' => MENU_CALLBACK
116 116
   );
117 117
   $items['team_lookup.php'] = array(
118 118
     'title' => 'Team lookup RPC',
119 119
     'description' => 'RPC for getting info on a team or matching teams.',
120 120
     'page callback' => 'boinccore_team_lookup',
121
-    'access callback' => TRUE,
121
+    'access callback' => true,
122 122
     'type' => MENU_CALLBACK
123 123
   );
124 124
   $items['team_email_list.php'] = array(
125 125
     'title' => 'Get team member list RPC',
126 126
     'description' => 'RPC for getting a list of members of a given team.',
127 127
     'page callback' => 'boinccore_team_email_list',
128
-    'access callback' => TRUE,
128
+    'access callback' => true,
129 129
     'type' => MENU_CALLBACK
130 130
   );
131 131
   $items['edit_forum_preferences_action.php'] = array(
132 132
     'title' => 'Forum preferences RPC',
133 133
     'description' => 'RPC for setting forum preferences for a given user.',
134 134
     'page callback' => 'boinccore_edit_forum_preferences',
135
-    'access callback' => TRUE,
135
+    'access callback' => true,
136 136
     'type' => MENU_CALLBACK
137 137
   );
138 138
   $items['forum_get_data.php'] = array(
139 139
     'title' => 'Forum get data RPC',
140 140
     'description' => 'RPC for getting recent forum activity for a given user.',
141 141
     'page callback' => 'boinccore_forum_get_data',
142
-    'access callback' => TRUE,
142
+    'access callback' => true,
143 143
     'type' => MENU_CALLBACK
144 144
   );
145 145
   $items['apps.php'] = array(
146 146
     'title' => 'Apps RPC',
147 147
     'description' => 'RPC for getting the applications in the system.',
148 148
     'page callback' => 'boinccore_apps',
149
-    'access callback' => TRUE,
149
+    'access callback' => true,
150 150
     'type' => MENU_CALLBACK
151 151
   );
152 152
   
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
  */
159 159
 function boinccore_menu_alter(&$items) {
160 160
   // If using Solr search and not core Drupal search, disable core search!
161
-  if (module_exists('global_search_solr') AND !module_exists('global_search')) {
161
+  if (module_exists('global_search_solr') and !module_exists('global_search')) {
162 162
     // Add permission to user search.
163 163
     $check = array(
164 164
       'search/node/%menu_tail',
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     );
168 168
     foreach ($check as $path) {
169 169
       if (isset($items[$path])) {
170
-        $items[$path]['access callback'] = FALSE;
170
+        $items[$path]['access callback'] = false;
171 171
       }
172 172
     }
173 173
   }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     );
198 198
     foreach ($check as $path) {
199 199
       if (isset($items[$path])) {
200
-        $items[$path]['access callback'] = FALSE;
200
+        $items[$path]['access callback'] = false;
201 201
       }
202 202
     }
203 203
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     );
216 216
     foreach ($check as $path) {
217 217
       if (isset($items[$path])) {
218
-        $items[$path]['access callback'] = FALSE;
218
+        $items[$path]['access callback'] = false;
219 219
       }
220 220
     }
221 221
   }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
       // Since we are in a hook_boot() implementation cache mode is normal, so
274 274
       // we can safely call hook_exit().
275 275
       bootstrap_invoke_all('exit');
276
-      header("Location: $url", TRUE, $code);
276
+      header("Location: $url", true, $code);
277 277
       exit;
278 278
     }
279 279
   }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
  */
292 292
   function locale_language_from_browser() {
293 293
     if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
294
-      return FALSE;
294
+      return false;
295 295
     }
296 296
     
297 297
     $languages = language_list('enabled');
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     // Find the enabled language with the greatest qvalue, following the rules
335 335
     // of RFC 2616 (section 14.4). If several languages have the same qvalue,
336 336
     // prefer the one with the greatest weight.
337
-    $best_match_language = FALSE;
337
+    $best_match_language = false;
338 338
     $max_qvalue = 0;
339 339
     foreach ($languages as $langcode => $language) {
340 340
       // Language tags are case insensitive (RFC2616, sec 3.10).
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
   // Notify moderators if there is site content that requires moderator action
374 374
   $items_in_queue = boincuser_moderation_queue_count('cron');
375 375
   $last_notification = variable_get('boinccore_last_content_moderation_reminder', 0);
376
-  if ($items_in_queue AND $last_notification < time() - 24*60*60) {
376
+  if ($items_in_queue and $last_notification < time() - 24*60*60) {
377 377
     global $base_url;
378 378
     global $base_path;
379 379
     $site_name = variable_get('site_name', 'Drupal-BOINC');
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
     $user_info = '<div class="user">';
429 429
     if ($user_image) {
430 430
       $user_info .= '  <div class="picture">';
431
-      if (is_array($user_image) AND $user_image['image']['filepath']) {
431
+      if (is_array($user_image) and $user_image['image']['filepath']) {
432 432
         $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
433 433
       }
434 434
       elseif (is_string($user_image)) {
@@ -458,13 +458,13 @@  discard block
 block discarded – undo
458 458
     
459 459
     module_load_include('inc', 'bbcode', 'bbcode-help');
460 460
     $form['bbcode_help'] = array(
461
-      '#title' => bts('BBcode help', array(), NULL, 'boinc:help-with-user-input-with-BBCode'),
461
+      '#title' => bts('BBcode help', array(), null, 'boinc:help-with-user-input-with-BBCode'),
462 462
       '#type' => 'fieldset',
463 463
       '#attributes' => array(
464 464
         'class' => 'bbcode_help',
465 465
       ),
466
-      '#collapsible' => TRUE,
467
-      '#collapsed' => TRUE,
466
+      '#collapsible' => true,
467
+      '#collapsed' => true,
468 468
       'content' => array(
469 469
         '#value' => _bbcode_filter_tip(),
470 470
       ),
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
     $form['buttons']['submit'] = $form['submit'];
487 487
     unset($form['submit']);
488 488
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
489
-    $form['buttons']['submit']['#value'] = bts('Post comment', array(), NULL, 'boinc:post-forum-comment');
489
+    $form['buttons']['submit']['#value'] = bts('Post comment', array(), null, 'boinc:post-forum-comment');
490 490
     $form['buttons']['submit']['#suffix'] = '</li>';
491 491
     $form['buttons']['submit']['#weight'] = 1002;
492 492
     // We want all these buttons together under the "buttons" array, but the
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
     $form['buttons']['preview']['#suffix'] = '</li>';
501 501
     $form['buttons']['preview']['#weight'] = 1003;
502 502
     $form['buttons']['cancel'] = array(
503
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url) . '</li>',
503
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $cancel_url) . '</li>',
504 504
       '#weight' => 1004,
505 505
     );
506 506
     $form['buttons']['form control tabs suffix'] = array(
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
         }
531 531
       }
532 532
       else {
533
-        $form = NULL;
533
+        $form = null;
534 534
         $form['from'] = array(
535 535
           '#type'  => 'item',
536 536
           '#value' => 'You do not have permission to post comments in this forum.',
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
       '#weight' => 1001,
556 556
     );
557 557
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
558
-    $form['buttons']['submit']['#value'] = bts('Post topic', array(), NULL, 'boinc:post-forum-comment');
558
+    $form['buttons']['submit']['#value'] = bts('Post topic', array(), null, 'boinc:post-forum-comment');
559 559
     $form['buttons']['submit']['#suffix'] = '</li>';
560 560
     $form['buttons']['submit']['#weight'] = 1002;
561 561
     $form['buttons']['preview']['#prefix'] = '<li class="tab">';
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
566 566
     $form['buttons']['preview_changes']['#weight'] = 1004;
567 567
     $form['buttons']['cancel'] = array(
568
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
568
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
569 569
       '#weight' => 1005,
570 570
     );
571 571
     $form['buttons']['form control tabs suffix'] = array(
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 /**
604 604
  * Implementation of hook_link_alter()
605 605
  */
606
-function boinccore_link_alter(&$links, $node, $comment = NULL) {
606
+function boinccore_link_alter(&$links, $node, $comment = null) {
607 607
   //echo '<pre>' . print_r($links, true) . '</pre>';
608 608
   foreach ($links as $module => $link) {
609 609
     // Remove the ignore user link
@@ -615,15 +615,15 @@  discard block
 block discarded – undo
615 615
   if (!($comment)) {
616 616
     // modify the comment_add link
617 617
     if (isset($links['comment_add'])) {
618
-      $links['comment_add']['title'] = bts('reply', array(), NULL, 'boinc:forum-reply-to-comment');
618
+      $links['comment_add']['title'] = bts('reply', array(), null, 'boinc:forum-reply-to-comment');
619 619
       $links['comment_add']['attributes'] = array(
620
-          'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
620
+          'title' => bts('Reply to this comment', array(), null, 'boinc:forum-reply-to-comment')
621 621
       );
622 622
     }
623 623
     // modify quote link
624 624
     if (isset($links['quote'])) {
625 625
       $links['quote']['attributes'] = array(
626
-          'title' => bts('Reply to this topic with a quote', array(), NULL, 'boinc:forum-reply-to-comment')
626
+          'title' => bts('Reply to this topic with a quote', array(), null, 'boinc:forum-reply-to-comment')
627 627
       );
628 628
     }
629 629
   }
@@ -631,17 +631,17 @@  discard block
 block discarded – undo
631 631
     // Standard EDIT, DELETE, and REPLY links are created by Drupal, but we want to alter them
632 632
     if (isset($links['comment_delete'])) {
633 633
       $links['comment_delete']['attributes'] = array(
634
-          'title' => bts('Delete this comment', array(), NULL, 'boinc:forum-delete-comment')
634
+          'title' => bts('Delete this comment', array(), null, 'boinc:forum-delete-comment')
635 635
       );
636 636
     }
637 637
     if (isset($links['comment_edit'])) {
638 638
       $links['comment_edit']['attributes'] = array(
639
-          'title' => bts('Edit this comment', array(), NULL, 'boinc:forum-edit-comment')
639
+          'title' => bts('Edit this comment', array(), null, 'boinc:forum-edit-comment')
640 640
       );
641 641
     }
642 642
     if (isset($links['comment_reply'])) {
643 643
       $links['comment_reply']['attributes'] = array(
644
-          'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
644
+          'title' => bts('Reply to this comment', array(), null, 'boinc:forum-reply-to-comment')
645 645
       );
646 646
     }
647 647
   }// if !$comment
@@ -650,13 +650,13 @@  discard block
 block discarded – undo
650 650
 /**
651 651
  * Implementation of hook_locale().
652 652
  */
653
-function boinccore_locale($op = 'groups', $group = NULL) {
653
+function boinccore_locale($op = 'groups', $group = null) {
654 654
   switch ($op) {
655 655
     case 'groups':
656 656
         return array('boinc' => 'BOINC');
657 657
     case 'info':
658 658
       //$info['boinc']['refresh callback'] = 'boinccore_locale_refresh';
659
-      $info['boinc']['format'] = FALSE;
659
+      $info['boinc']['format'] = false;
660 660
       return $info;
661 661
   }
662 662
 }
@@ -665,65 +665,65 @@  discard block
 block discarded – undo
665 665
 /**
666 666
  * Implementation of hook_link()
667 667
  */
668
-function boinccore_link($type, $object, $teaser = FALSE) {
668
+function boinccore_link($type, $object, $teaser = false) {
669 669
   // Add custom links with this hook
670 670
 
671 671
   if ($type=='node') {
672
-    if ( ($object->type=='forum') OR ($object->type=='team_forum') ) {
672
+    if ( ($object->type=='forum') or ($object->type=='team_forum') ) {
673 673
       // Add topic moderator controls
674 674
       if (user_access('edit any forum topic')) {
675 675
         $node_control = "node_control/{$object->nid}";
676 676
         if ($object->sticky) {
677 677
           $links['make_unsticky'] = array(
678
-              'title' => bts('Make unsticky', array(), NULL, 'boinc:forum-unsticky-comment'),
678
+              'title' => bts('Make unsticky', array(), null, 'boinc:forum-unsticky-comment'),
679 679
               'href' => "{$node_control}/unsticky",
680 680
               'attributes' => array(
681
-                  'title' => bts('Remove sticky status from this topic', array(), NULL, 'boinc:forum-unsticky-comment')
681
+                  'title' => bts('Remove sticky status from this topic', array(), null, 'boinc:forum-unsticky-comment')
682 682
               )
683 683
           );
684 684
         }
685 685
         else {
686 686
           $links['make_sticky'] = array(
687
-              'title' => bts('Make sticky', array(), NULL, 'boinc:forum-sticky-comment'),
687
+              'title' => bts('Make sticky', array(), null, 'boinc:forum-sticky-comment'),
688 688
               'href' => "{$node_control}/sticky",
689 689
               'attributes' => array(
690
-                  'title' => bts('Make this topic sticky', array(), NULL, 'boinc:forum-sticky-comment')
690
+                  'title' => bts('Make this topic sticky', array(), null, 'boinc:forum-sticky-comment')
691 691
               )
692 692
           );
693 693
         }
694 694
         if ($object->comment == COMMENT_NODE_READ_WRITE) {
695 695
           $links['lock'] = array(
696
-              'title' => bts('Lock', array(), NULL, 'boinc:forum-lock-comment'),
696
+              'title' => bts('Lock', array(), null, 'boinc:forum-lock-comment'),
697 697
               'href' => "{$node_control}/lock",
698 698
               'attributes' => array(
699
-                  'title' => bts('Lock this thread for comments', array(), NULL, 'boinc:forum-lock-comment')
699
+                  'title' => bts('Lock this thread for comments', array(), null, 'boinc:forum-lock-comment')
700 700
               )
701 701
           );
702 702
         }
703 703
         else {
704 704
           $links['unlock'] = array(
705
-              'title' => bts('Unlock', array(), NULL, 'boinc:forum-unlock-comment'),
705
+              'title' => bts('Unlock', array(), null, 'boinc:forum-unlock-comment'),
706 706
               'href' => "{$node_control}/unlock",
707 707
               'attributes' => array(
708
-                  'title' => bts('Unlock this thread for comments', array(), NULL, 'boinc:forum-unlock-comment')
708
+                  'title' => bts('Unlock this thread for comments', array(), null, 'boinc:forum-unlock-comment')
709 709
               )
710 710
           );
711 711
         }
712 712
         if ($object->status) {
713 713
           $links['hide'] = array(
714
-              'title' => bts('Hide', array(), NULL, 'boinc:forum-hide-comment'),
714
+              'title' => bts('Hide', array(), null, 'boinc:forum-hide-comment'),
715 715
               'href' => "{$node_control}/hide",
716 716
               'attributes' => array(
717
-                  'title' => bts('Hide this topic', array(), NULL, 'boinc:forum-hide-comment')
717
+                  'title' => bts('Hide this topic', array(), null, 'boinc:forum-hide-comment')
718 718
               )
719 719
           );
720 720
         }
721 721
         else {
722 722
           $links['unhide'] = array(
723
-              'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
723
+              'title' => bts('Unhide', array(), null, 'boinc:forum-unhide-comment'),
724 724
               'href' => "{$node_control}/unhide",
725 725
               'attributes' => array(
726
-                  'title' => bts('Unhide this topic', array(), NULL, 'boinc:forum-unhide-comment')
726
+                  'title' => bts('Unhide this topic', array(), null, 'boinc:forum-unhide-comment')
727 727
               )
728 728
           );
729 729
         }
@@ -738,10 +738,10 @@  discard block
 block discarded – undo
738 738
     // QUOTE
739 739
     if ($node->comment == COMMENT_NODE_READ_WRITE) {
740 740
         $links['quote'] = array(
741
-            'title' => bts('Quote', array(), NULL, 'boinc:forum-reply-to-comment-with-quote'),
741
+            'title' => bts('Quote', array(), null, 'boinc:forum-reply-to-comment-with-quote'),
742 742
             'href' => "comment/reply/{$nid}/{$cid}",
743 743
             'attributes' => array(
744
-                'title' => bts('Reply to this comment with a quote', array(), NULL, 'boinc:forum-reply-to-comment')
744
+                'title' => bts('Reply to this comment with a quote', array(), null, 'boinc:forum-reply-to-comment')
745 745
             ),
746 746
             'fragment' => 'comment-form',
747 747
             'query' => 'quote=1',
@@ -755,29 +755,29 @@  discard block
 block discarded – undo
755 755
       $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid ));
756 756
       if ($reply_count == 0) {
757 757
         $links['convert'] = array(
758
-            'title' => bts('Convert', array(), NULL, 'boinc:forum-convert-comment-to-topic'),
758
+            'title' => bts('Convert', array(), null, 'boinc:forum-convert-comment-to-topic'),
759 759
             'href' => "{$comment_control}/convert",
760 760
             'attributes' => array(
761
-                'title' => bts('Convert this comment to a new topic', array(), NULL, 'boinc:forum-convert-comment-to-topic')
761
+                'title' => bts('Convert this comment to a new topic', array(), null, 'boinc:forum-convert-comment-to-topic')
762 762
             )
763 763
         );
764 764
       }
765 765
       // Add hide link
766 766
       if ($object->status == 0) {
767 767
         $links['hide'] = array(
768
-            'title' => bts('Hide', array(), NULL, 'boinc:forum-hide-comment'),
768
+            'title' => bts('Hide', array(), null, 'boinc:forum-hide-comment'),
769 769
             'href' => "{$comment_control}/hide",
770 770
             'attributes' => array(
771
-                'title' => bts('Hide this comment', array(), NULL, 'boinc:forum-hide-comment')
771
+                'title' => bts('Hide this comment', array(), null, 'boinc:forum-hide-comment')
772 772
             )
773 773
         );
774 774
       }
775 775
       else {
776 776
         $links['unhide'] = array(
777
-            'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
777
+            'title' => bts('Unhide', array(), null, 'boinc:forum-unhide-comment'),
778 778
             'href' => "{$comment_control}/unhide",
779 779
             'attributes' => array(
780
-                'title' => bts('Unhide this comment', array(), NULL, 'boinc:forum-unhide-comment')
780
+                'title' => bts('Unhide this comment', array(), null, 'boinc:forum-unhide-comment')
781 781
             )
782 782
         );
783 783
       }
@@ -797,12 +797,12 @@  discard block
 block discarded – undo
797 797
  * Allow published, sticky, and comment status to be set on nodes by direct
798 798
  * link rather than through the node form.
799 799
  */
800
-function boinccore_node_control($nid = NULL, $action = NULL) {
801
-  if ((!$nid OR !$node = node_load($nid)) OR
802
-      ($node->type == 'forum' AND !user_access('edit any forum topic')) OR
803
-      ($node->type != 'forum' AND !user_access('administer nodes'))) {
800
+function boinccore_node_control($nid = null, $action = null) {
801
+  if ((!$nid or !$node = node_load($nid)) or
802
+      ($node->type == 'forum' and !user_access('edit any forum topic')) or
803
+      ($node->type != 'forum' and !user_access('administer nodes'))) {
804 804
     // What are you even doing here...
805
-    return FALSE;
805
+    return false;
806 806
   }
807 807
   switch ($action) {
808 808
   case 'unhide':
@@ -838,10 +838,10 @@  discard block
 block discarded – undo
838 838
  * Allow published status to be set on comments by direct link rather than
839 839
  * through the comment edit form.
840 840
  */
841
-function boinccore_comment_control($cid = NULL, $action = NULL) {
842
-  if (!$cid OR !$comment = _comment_load($cid)) {
841
+function boinccore_comment_control($cid = null, $action = null) {
842
+  if (!$cid or !$comment = _comment_load($cid)) {
843 843
     // What are you even doing here...
844
-    return FALSE;
844
+    return false;
845 845
   }
846 846
   $return_path = "node/{$comment->nid}";
847 847
   $return_anchor = "comment-{$cid}";
@@ -894,11 +894,11 @@  discard block
 block discarded – undo
894 894
     rules_invoke_event('boinccore_comment_convert', $comment);
895 895
 
896 896
     $return_path = "node/{$node->nid}";
897
-    $return_anchor = NULL;
897
+    $return_anchor = null;
898 898
     break;
899 899
   default:
900 900
   }
901
-  drupal_goto($return_path, NULL, $return_anchor);
901
+  drupal_goto($return_path, null, $return_anchor);
902 902
 }
903 903
 
904 904
 /**
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
   $uid = !empty($xml['am_get_info_reply']['id']) ? boincuser_lookup_uid($xml['am_get_info_reply']['id']) : 0;
926 926
   if ($uid) {
927 927
     $content_profile = content_profile_load('profile', $uid);
928
-    $profile_is_approved = ($content_profile->status AND !$content_profile->moderate);
928
+    $profile_is_approved = ($content_profile->status and !$content_profile->moderate);
929 929
     $country = check_plain($content_profile->field_country[0]['value']);
930 930
     $website = '';
931 931
     if ($profile_is_approved) {
@@ -947,8 +947,8 @@  discard block
 block discarded – undo
947 947
   // Remove q from the GET request or BOINC will panic
948 948
   unset($_GET['q']);
949 949
   // Validate the XML prefs (in case BOINC does not)
950
-  $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : NULL);
951
-  $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : NULL);
950
+  $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : null);
951
+  $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : null);
952 952
   libxml_use_internal_errors(true);
953 953
   $xml = new DomDocument();
954 954
   if ($global_prefs) {
@@ -987,15 +987,15 @@  discard block
 block discarded – undo
987 987
       $uid = boincuser_lookup_uid($boinc_id);
988 988
       
989 989
       // Apply any relevant updates to the Drupal account, also
990
-      $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : NULL);
991
-      $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : NULL);
992
-      $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : NULL);
990
+      $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : null);
991
+      $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : null);
992
+      $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : null);
993 993
       
994 994
       if ($email_addr) {
995 995
         $account = user_load($uid);
996 996
         user_save($account, array('mail' => $email_addr));
997 997
       }
998
-      if ($country OR $url) {
998
+      if ($country or $url) {
999 999
         $content_profile = content_profile_load('profile', $uid);
1000 1000
         if ($country) $content_profile->field_country[0]['value'] = $country;
1001 1001
         if ($url) $content_profile->field_url[0]['value'] = $url;
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
   $uid = !empty($xml['user']['id']) ? boincuser_lookup_uid($xml['user']['id']) : 0;
1050 1050
   if ($uid) {
1051 1051
     $content_profile = content_profile_load('profile', $uid);
1052
-    $profile_is_approved = ($content_profile->status AND !$content_profile->moderate);
1052
+    $profile_is_approved = ($content_profile->status and !$content_profile->moderate);
1053 1053
     $country = check_plain($content_profile->field_country[0]['value']);
1054 1054
     $website = '';
1055 1055
     if ($profile_is_approved) {
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
   $show_xml = !empty($_POST['xml']) ? $_POST['xml'] : $_GET['xml'];
1212 1212
   if (!$show_xml) {
1213 1213
       // creditonly does not affect non xml output in BOINC
1214
-      $credit_only = FALSE;
1214
+      $credit_only = false;
1215 1215
   }
1216 1216
   $xml = array();
1217 1217
 
@@ -1260,11 +1260,11 @@  discard block
 block discarded – undo
1260 1260
           'cpid' => md5($member->cross_project_id.$member->email_addr),
1261 1261
           'create_time' => $member->create_time,
1262 1262
           'name' => htmlspecialchars($member->name),
1263
-          'country' => NULL,
1263
+          'country' => null,
1264 1264
           'total_credit' => round($member->total_credit),
1265 1265
           'expavg_credit' => round($member->expavg_credit),
1266 1266
           'expavg_time' => round($member->expavg_time),
1267
-          'url' => NULL,
1267
+          'url' => null,
1268 1268
           'has_profile' => 0,
1269 1269
         );
1270 1270
       }
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
       ),
1303 1303
     );
1304 1304
   } // end if boincteam_id
1305
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1305
+  print xml_to_text(array_to_xml($xml), true, true);
1306 1306
 }
1307 1307
 
1308 1308
 /**
@@ -1313,18 +1313,18 @@  discard block
 block discarded – undo
1313 1313
   // Do not pass through to BOINC in this case as BOINC forums are no longer
1314 1314
   // relevant -- use Drupal data only
1315 1315
   
1316
-  $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : NULL);
1316
+  $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : null);
1317 1317
   
1318 1318
   require_boinc('boinc_db');
1319 1319
   $boincuser = BoincUser::lookup_auth($account_key);
1320 1320
   if ($boincuser) {
1321 1321
     $uid = boincuser_lookup_uid($boincuser->id);
1322
-    if ($uid AND $account = user_load($uid)) {
1322
+    if ($uid and $account = user_load($uid)) {
1323 1323
       // Currently supported preferences
1324
-      $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : NULL);
1325
-      $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : NULL);
1326
-      $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : NULL);
1327
-      $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : NULL);
1324
+      $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : null);
1325
+      $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : null);
1326
+      $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : null);
1327
+      $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : null);
1328 1328
       // Update preferences as needed
1329 1329
       if ($avatar_url) {
1330 1330
         $avatar_image = file_get_contents($avatar_url);
@@ -1335,11 +1335,11 @@  discard block
 block discarded – undo
1335 1335
           if ($file) {
1336 1336
             $profile = new stdClass();
1337 1337
             $profile->type = 'profile';
1338
-            $profile->language = NULL;
1338
+            $profile->language = null;
1339 1339
             if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1340 1340
               $profile_node = node_load($profile_nid);
1341 1341
               if ($profile_node) {
1342
-                $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', TRUE);
1342
+                $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', true);
1343 1343
                 if ($avatar_image) {
1344 1344
                   $profile_node->field_image[0] = $avatar_image;
1345 1345
                   node_save($profile_node);
@@ -1364,10 +1364,10 @@  discard block
 block discarded – undo
1364 1364
           $error = 'Could not find avatar image at URL';
1365 1365
         }
1366 1366
       }
1367
-      if ($hide_signatures !== NULL) {
1367
+      if ($hide_signatures !== null) {
1368 1368
         user_save($account, array('hide_signatures' => ($hide_signatures ? 1 : 0)));
1369 1369
       }
1370
-      if ($signature !== NULL) {
1370
+      if ($signature !== null) {
1371 1371
         $signature = check_markup($signature);
1372 1372
         user_save($account, array('signature' => $signature));
1373 1373
       }
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
         // Success
1385 1385
         $xml = array(
1386 1386
           'edit_forum_preferences' => array(
1387
-            'success' => NULL,
1387
+            'success' => null,
1388 1388
           ),
1389 1389
         );
1390 1390
       }
@@ -1417,7 +1417,7 @@  discard block
 block discarded – undo
1417 1417
       ),
1418 1418
     );
1419 1419
   }
1420
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1420
+  print xml_to_text(array_to_xml($xml), true, true);
1421 1421
 }
1422 1422
 
1423 1423
 /**
@@ -1429,17 +1429,17 @@  discard block
 block discarded – undo
1429 1429
   // relevant -- use Drupal data only
1430 1430
   
1431 1431
   $xml = array();
1432
-  $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : NULL);
1432
+  $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : null);
1433 1433
   $uid = boincuser_lookup_uid($boinc_id);
1434 1434
   
1435 1435
   if ($uid) {
1436
-    $method = !empty($_POST['method']) ? $_POST['method'] : (!empty($_GET['method']) ? $_GET['method'] : NULL);
1437
-    $count = !empty($_POST['count']) ? $_POST['count'] : (!empty($_GET['count']) ? $_GET['count'] : NULL);
1436
+    $method = !empty($_POST['method']) ? $_POST['method'] : (!empty($_GET['method']) ? $_GET['method'] : null);
1437
+    $count = !empty($_POST['count']) ? $_POST['count'] : (!empty($_GET['count']) ? $_GET['count'] : null);
1438 1438
     if (!$count) $count = 10;
1439 1439
     
1440 1440
     switch ($method) {
1441 1441
     case 'user_posts':
1442
-      $content_length = !empty($_POST['content_length']) ? $_POST['content_length'] : (!empty($_GET['content_length']) ? $_GET['content_length'] : NULL);
1442
+      $content_length = !empty($_POST['content_length']) ? $_POST['content_length'] : (!empty($_GET['content_length']) ? $_GET['content_length'] : null);
1443 1443
       $posts = db_query("
1444 1444
         SELECT
1445 1445
           c.cid,
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
       ),
1536 1536
     );
1537 1537
   }
1538
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1538
+  print xml_to_text(array_to_xml($xml), true, true);
1539 1539
 }
1540 1540
 
1541 1541
 /**
@@ -1554,9 +1554,9 @@  discard block
 block discarded – undo
1554 1554
  * in advance on which page a given comment will appear. Link instead to this
1555 1555
  * controller function, which can compute the page based on the user's settings
1556 1556
  */
1557
-function boinccore_url_pagination_handler($type, $object_id = NULL) {
1557
+function boinccore_url_pagination_handler($type, $object_id = null) {
1558 1558
   global $user;
1559
-  $path = NULL;
1559
+  $path = null;
1560 1560
   $params = array();
1561 1561
   switch ($type) {
1562 1562
   case 'boinc-forum':
@@ -1943,11 +1943,11 @@  discard block
 block discarded – undo
1943 1943
   $mailing_list = variable_get('boinc_moderator_mailing_list', '');
1944 1944
   $force_individual_notifications = variable_get('boinc_moderator_force_individual_notifications', 0);
1945 1945
   
1946
-  if (!$mailing_list OR $force_individual_notifications) {
1946
+  if (!$mailing_list or $force_individual_notifications) {
1947 1947
     // Send individual emails to all moderators
1948 1948
     $roles = user_roles();
1949 1949
     $moderator_rid = array_search('moderator', $roles);
1950
-    if ($moderator_rid !== FALSE) {
1950
+    if ($moderator_rid !== false) {
1951 1951
       $settings['recipients'] = array($moderator_rid);
1952 1952
       rules_action_mail_to_users_of_role($settings);
1953 1953
     }
@@ -1976,7 +1976,7 @@  discard block
 block discarded – undo
1976 1976
 /*
1977 1977
  * BOINC wrapper for string translation
1978 1978
  */
1979
-function bts($string, $args = array(), $langcode = NULL, $context = 'boinc: ', $update = TRUE) {
1979
+function bts($string, $args = array(), $langcode = null, $context = 'boinc: ', $update = true) {
1980 1980
   if (function_exists('i18nstrings_ts')) {
1981 1981
     $string = i18nstrings_ts($context, $string, $langcode, $update);
1982 1982
   }
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
  * Overview of moderation queues
2016 2016
  */               
2017 2017
 function boinccore_moderation_overview_panel() {
2018
-  $output = '<h2 class="pane-title">' . bts('Moderation', array(), NULL, 'boinc:moderate-profiles') . '</h2>';
2018
+  $output = '<h2 class="pane-title">' . bts('Moderation', array(), null, 'boinc:moderate-profiles') . '</h2>';
2019 2019
   $output .= '<ul class="tab-list action-list">';
2020 2020
   if (module_exists('user_profiles')) {
2021 2021
     $profile_count = db_result(db_query("
@@ -2024,7 +2024,7 @@  discard block
 block discarded – undo
2024 2024
       WHERE n.type = 'profile' AND n.moderate = 1"
2025 2025
     ));
2026 2026
     $output .= '<li class="tab primary">';
2027
-    $output .= l(bts('Unvetted profiles', array(), NULL, 'boinc:moderate-profiles'), 'moderate/profiles');
2027
+    $output .= l(bts('Unvetted profiles', array(), null, 'boinc:moderate-profiles'), 'moderate/profiles');
2028 2028
     $output .= '<div class="item-count-wrapper">';
2029 2029
     $output .= '<span class="item-count">' . $profile_count . '</span>';
2030 2030
     $output .= '</div>';
@@ -2045,6 +2045,6 @@  discard block
 block discarded – undo
2045 2045
 
2046 2046
   $num_deleted = BoincToken::delete_expired();
2047 2047
   if ($num_deleted>0) {
2048
-    watchdog('boinccore', "Deleted ${num_deleted} tokens from table token", WATCHDOG_NOTICE);
2048
+    watchdog('boinccore', "deleted ${num_deleted} tokens from table token", WATCHDOG_NOTICE);
2049 2049
   }
2050 2050
 }
Please login to merge, or discard this patch.
Indentation   +705 added lines, -705 removed lines patch added patch discarded remove patch
@@ -29,22 +29,22 @@  discard block
 block discarded – undo
29 29
  * with defined URL paths
30 30
  */
31 31
 function boinccore_menu() {
32
-  $items['node_control'] = array(
32
+    $items['node_control'] = array(
33 33
     'page callback' => 'boinccore_node_control',
34 34
     'access arguments' => array('access content'),
35 35
     'type' => MENU_CALLBACK
36
-  );
37
-  $items['comment_control'] = array(
36
+    );
37
+    $items['comment_control'] = array(
38 38
     'page callback' => 'boinccore_comment_control',
39 39
     'access arguments' => array('administer comments'),
40 40
     'type' => MENU_CALLBACK
41
-  );
42
-  $items['goto'] = array(
41
+    );
42
+    $items['goto'] = array(
43 43
     'page callback' => 'boinccore_url_pagination_handler',
44 44
     'access arguments' => array('access content'),
45 45
     'type' => MENU_CALLBACK
46
-  );
47
-  $items['admin/boinc/community'] = array(
46
+    );
47
+    $items['admin/boinc/community'] = array(
48 48
     'title' => 'Community',
49 49
     'description' => 'Global settings for community interaction.',
50 50
     'page callback' => 'drupal_get_form',
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     'access arguments' => array('administer site configuration'),
53 53
     'type' => MENU_NORMAL_ITEM,
54 54
     'file' => 'boinccore.admin.inc'
55
-  );
56
-  $items['admin/boinc/standard-content-generator'] = array(
55
+    );
56
+    $items['admin/boinc/standard-content-generator'] = array(
57 57
     'title' => 'Standard page generator',
58 58
     'description' => 'Regenerate standard site content (e.g. Help and About Us
59 59
       pages).',
@@ -62,172 +62,172 @@  discard block
 block discarded – undo
62 62
     'access arguments' => array('administer site configuration'),
63 63
     'type' => MENU_NORMAL_ITEM,
64 64
     'file' => 'boinccore.admin.inc'
65
-  );
65
+    );
66 66
   
67
-  // BOINC RPC wrappers
68
-  $items['lookup_account.php'] = array(
67
+    // BOINC RPC wrappers
68
+    $items['lookup_account.php'] = array(
69 69
     'title' => 'Look up account RPC',
70 70
     'description' => 'RPC for getting the authenticator for a user account.',
71 71
     'page callback' => 'boinccore_lookup_account',
72 72
     'access callback' => TRUE,
73 73
     'type' => MENU_CALLBACK
74
-  );
75
-  $items['am_get_info.php'] = array(
74
+    );
75
+    $items['am_get_info.php'] = array(
76 76
     'title' => 'Account manager get info RPC',
77 77
     'description' => 'RPC for getting assorted details of a user account.',
78 78
     'page callback' => 'boinccore_am_get_info',
79 79
     'access callback' => TRUE,
80 80
     'type' => MENU_CALLBACK
81
-  );
82
-  $items['am_set_info.php'] = array(
81
+    );
82
+    $items['am_set_info.php'] = array(
83 83
     'title' => 'Account manager set info RPC',
84 84
     'description' => 'RPC for updating assorted details of a user account.',
85 85
     'page callback' => 'boinccore_am_set_info',
86 86
     'access callback' => TRUE,
87 87
     'type' => MENU_CALLBACK
88
-  );
89
-  $items['am_set_host_info.php'] = array(
88
+    );
89
+    $items['am_set_host_info.php'] = array(
90 90
     'title' => 'Account manager set host info RPC',
91 91
     'description' => 'RPC for updating the venue for a given host.',
92 92
     'page callback' => 'boinccore_am_set_host_info',
93 93
     'access callback' => TRUE,
94 94
     'type' => MENU_CALLBACK
95
-  );
96
-  $items['show_user.php'] = array(
95
+    );
96
+    $items['show_user.php'] = array(
97 97
     'title' => 'Show user RPC',
98 98
     'description' => 'RPC for getting assorted details of a user account.',
99 99
     'page callback' => 'boinccore_show_user',
100 100
     'access callback' => TRUE,
101 101
     'type' => MENU_CALLBACK
102
-  );
103
-  $items['pending.php'] = array(
102
+    );
103
+    $items['pending.php'] = array(
104 104
     'title' => 'Pending credit RPC',
105 105
     'description' => 'RPC for getting pending credit for a given account.',
106 106
     'page callback' => 'boinccore_pending_credit',
107 107
     'access callback' => TRUE,
108 108
     'type' => MENU_CALLBACK
109
-  );
110
-  $items['create_team.php'] = array(
109
+    );
110
+    $items['create_team.php'] = array(
111 111
     'title' => 'Create team RPC',
112 112
     'description' => 'RPC for creating a new team.',
113 113
     'page callback' => 'boinccore_create_team',
114 114
     'access callback' => TRUE,
115 115
     'type' => MENU_CALLBACK
116
-  );
117
-  $items['team_lookup.php'] = array(
116
+    );
117
+    $items['team_lookup.php'] = array(
118 118
     'title' => 'Team lookup RPC',
119 119
     'description' => 'RPC for getting info on a team or matching teams.',
120 120
     'page callback' => 'boinccore_team_lookup',
121 121
     'access callback' => TRUE,
122 122
     'type' => MENU_CALLBACK
123
-  );
124
-  $items['team_email_list.php'] = array(
123
+    );
124
+    $items['team_email_list.php'] = array(
125 125
     'title' => 'Get team member list RPC',
126 126
     'description' => 'RPC for getting a list of members of a given team.',
127 127
     'page callback' => 'boinccore_team_email_list',
128 128
     'access callback' => TRUE,
129 129
     'type' => MENU_CALLBACK
130
-  );
131
-  $items['edit_forum_preferences_action.php'] = array(
130
+    );
131
+    $items['edit_forum_preferences_action.php'] = array(
132 132
     'title' => 'Forum preferences RPC',
133 133
     'description' => 'RPC for setting forum preferences for a given user.',
134 134
     'page callback' => 'boinccore_edit_forum_preferences',
135 135
     'access callback' => TRUE,
136 136
     'type' => MENU_CALLBACK
137
-  );
138
-  $items['forum_get_data.php'] = array(
137
+    );
138
+    $items['forum_get_data.php'] = array(
139 139
     'title' => 'Forum get data RPC',
140 140
     'description' => 'RPC for getting recent forum activity for a given user.',
141 141
     'page callback' => 'boinccore_forum_get_data',
142 142
     'access callback' => TRUE,
143 143
     'type' => MENU_CALLBACK
144
-  );
145
-  $items['apps.php'] = array(
144
+    );
145
+    $items['apps.php'] = array(
146 146
     'title' => 'Apps RPC',
147 147
     'description' => 'RPC for getting the applications in the system.',
148 148
     'page callback' => 'boinccore_apps',
149 149
     'access callback' => TRUE,
150 150
     'type' => MENU_CALLBACK
151
-  );
151
+    );
152 152
   
153
-  return $items;
153
+    return $items;
154 154
 }
155 155
 
156 156
 /**
157 157
  * Implementation of hook_menu_alter()
158 158
  */
159 159
 function boinccore_menu_alter(&$items) {
160
-  // If using Solr search and not core Drupal search, disable core search!
161
-  if (module_exists('global_search_solr') AND !module_exists('global_search')) {
160
+    // If using Solr search and not core Drupal search, disable core search!
161
+    if (module_exists('global_search_solr') AND !module_exists('global_search')) {
162 162
     // Add permission to user search.
163 163
     $check = array(
164
-      'search/node/%menu_tail',
165
-      'search/user/%menu_tail',
166
-      'user/autocomplete'
164
+        'search/node/%menu_tail',
165
+        'search/user/%menu_tail',
166
+        'user/autocomplete'
167 167
     );
168 168
     foreach ($check as $path) {
169
-      if (isset($items[$path])) {
169
+        if (isset($items[$path])) {
170 170
         $items[$path]['access callback'] = FALSE;
171
-      }
171
+        }
172 172
     }
173
-  }
174
-  // If using content profile module (for user profiles) setup special
175
-  // delete page.
176
-  if (module_exists('content_profile')) {
173
+    }
174
+    // If using content profile module (for user profiles) setup special
175
+    // delete page.
176
+    if (module_exists('content_profile')) {
177 177
     $items['node/%node/delete'] = array(
178
-      'title' => 'Delete',
179
-      'page callback' => 'drupal_get_form',
180
-      'page arguments' => array('boinccore_delete_confirm', 1),
181
-      'access callback' => 'node_access',
182
-      'access arguments' => array('delete', 1),
183
-      'module' => 'boinccore',
184
-      'file' => 'includes/boinccore.forms.inc',
185
-      'weight' => 1,
186
-      'type' => MENU_CALLBACK,
178
+        'title' => 'Delete',
179
+        'page callback' => 'drupal_get_form',
180
+        'page arguments' => array('boinccore_delete_confirm', 1),
181
+        'access callback' => 'node_access',
182
+        'access arguments' => array('delete', 1),
183
+        'module' => 'boinccore',
184
+        'file' => 'includes/boinccore.forms.inc',
185
+        'weight' => 1,
186
+        'type' => MENU_CALLBACK,
187 187
     );
188
-  }
188
+    }
189 189
 
190
-  // 'Remove' menu paths for ignore_user and privatemsg
191
-  // (pm_block_user) module which we have 'overridden' with
192
-  // boincwork's own functions.
193
-  if (module_exists('ignore_user')) {
190
+    // 'Remove' menu paths for ignore_user and privatemsg
191
+    // (pm_block_user) module which we have 'overridden' with
192
+    // boincwork's own functions.
193
+    if (module_exists('ignore_user')) {
194 194
     $check = array(
195
-      'ignore_user/add',
196
-      'ignore_user/remove',
195
+        'ignore_user/add',
196
+        'ignore_user/remove',
197 197
     );
198 198
     foreach ($check as $path) {
199
-      if (isset($items[$path])) {
199
+        if (isset($items[$path])) {
200 200
         $items[$path]['access callback'] = FALSE;
201
-      }
201
+        }
202 202
     }
203 203
 
204 204
     // Redirect user to privacy prefs page.
205 205
     $path1 = 'ignore_user/list';
206 206
     if (isset($items[$path1])) {
207
-      $items[$path1]['page callback'] = 'drupal_goto';
208
-      $items[$path1]['page arguments'] = array('account/prefs/privacy');
207
+        $items[$path1]['page callback'] = 'drupal_goto';
208
+        $items[$path1]['page arguments'] = array('account/prefs/privacy');
209
+    }
209 210
     }
210
-  }
211 211
 
212
-  if (module_exists('pm_block_user')) {
212
+    if (module_exists('pm_block_user')) {
213 213
     $check = array(
214
-      'messages/block/%user',
214
+        'messages/block/%user',
215 215
     );
216 216
     foreach ($check as $path) {
217
-      if (isset($items[$path])) {
217
+        if (isset($items[$path])) {
218 218
         $items[$path]['access callback'] = FALSE;
219
-      }
219
+        }
220
+    }
220 221
     }
221
-  }
222 222
 }
223 223
 
224 224
 /**
225 225
  * Implementation of hook_enable()
226 226
  */
227 227
 function boinccore_enable() {
228
-  // Automatically try to establish standard site content when this module is
229
-  // enabled (e.g. Help and About Us pages)
230
-  boinccore_admin_default_content_generate();
228
+    // Automatically try to establish standard site content when this module is
229
+    // enabled (e.g. Help and About Us pages)
230
+    boinccore_admin_default_content_generate();
231 231
 }
232 232
 
233 233
 /**
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
  * See: https://www.drupal.org/node/339958#comment-3012662
241 241
  */
242 242
 function boinccore_boot() {
243
-  global $user, $language;
244
-  $cache = variable_get('cache', CACHE_DISABLED);
245
-  $language_negotiation = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
246
-
247
-  // If we have an anonymous user, page cache is enabled, the URL has no prefix
248
-  // and browser language negotiation is set, we perform a redirect to the
249
-  // prefixed URL. 
250
-  if (empty($user->uid) && $cache != CACHE_DISABLED && $language_negotiation == LANGUAGE_NEGOTIATION_PATH) {
243
+    global $user, $language;
244
+    $cache = variable_get('cache', CACHE_DISABLED);
245
+    $language_negotiation = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
246
+
247
+    // If we have an anonymous user, page cache is enabled, the URL has no prefix
248
+    // and browser language negotiation is set, we perform a redirect to the
249
+    // prefixed URL. 
250
+    if (empty($user->uid) && $cache != CACHE_DISABLED && $language_negotiation == LANGUAGE_NEGOTIATION_PATH) {
251 251
     $args = isset($_GET['q']) ? explode('/', $_GET['q']) : array();
252 252
     $prefix = array_shift($args);
253 253
 
@@ -259,24 +259,24 @@  discard block
 block discarded – undo
259 259
     // so call this backported Drupal 7 language negotation function, which
260 260
     // does both case insensitive and longest prefix matching
261 261
     if (function_exists('locale_language_from_browser')) {
262
-      $language = locale_language_from_browser();
262
+        $language = locale_language_from_browser();
263 263
     }
264 264
 
265 265
     if (!empty($language->prefix) && $prefix != $language->prefix) {
266
-      // We need full path support to perform the redirect.
267
-      drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);
268
-
269
-      require_once './includes/common.inc';
270
-      $url = url($_GET['q'], array('query' => drupal_query_string_encode($_GET, array('q'))));
271
-      $code = variable_get('locale_redirect_http_code', 302);
272
-
273
-      // Since we are in a hook_boot() implementation cache mode is normal, so
274
-      // we can safely call hook_exit().
275
-      bootstrap_invoke_all('exit');
276
-      header("Location: $url", TRUE, $code);
277
-      exit;
266
+        // We need full path support to perform the redirect.
267
+        drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);
268
+
269
+        require_once './includes/common.inc';
270
+        $url = url($_GET['q'], array('query' => drupal_query_string_encode($_GET, array('q'))));
271
+        $code = variable_get('locale_redirect_http_code', 302);
272
+
273
+        // Since we are in a hook_boot() implementation cache mode is normal, so
274
+        // we can safely call hook_exit().
275
+        bootstrap_invoke_all('exit');
276
+        header("Location: $url", TRUE, $code);
277
+        exit;
278
+    }
278 279
     }
279
-  }
280 280
 }
281 281
 
282 282
 
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
  *
290 290
  * Obsolete in Drupal 7...
291 291
  */
292
-  function locale_language_from_browser() {
292
+    function locale_language_from_browser() {
293 293
     if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
294
-      return FALSE;
294
+        return FALSE;
295 295
     }
296 296
     
297 297
     $languages = language_list('enabled');
@@ -306,14 +306,14 @@  discard block
 block discarded – undo
306 306
     // Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"
307 307
     $browser_langcodes = array();
308 308
     if (preg_match_all('@(?<=[, ]|^)([a-zA-Z-]+|\*)(?:;q=([0-9.]+))?(?:$|\s*,\s*)@', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches, PREG_SET_ORDER)) {
309
-      foreach ($matches as $match) {
309
+        foreach ($matches as $match) {
310 310
         // We can safely use strtolower() here, tags are ASCII.
311 311
         // RFC2616 mandates that the decimal part is no more than three digits,
312 312
         // so we multiply the qvalue by 1000 to avoid floating point comparisons.
313 313
         $langcode = strtolower($match[1]);
314 314
         $qvalue = isset($match[2]) ? (float) $match[2] : 1;
315 315
         $browser_langcodes[$langcode] = (int) ($qvalue * 1000);
316
-      }
316
+        }
317 317
     }
318 318
 
319 319
     // We should take pristine values from the HTTP headers, but Internet Explorer
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
     // http://blogs.msdn.com/b/ie/archive/2006/10/17/accept-language-header-for-internet-explorer-7.aspx
326 326
     asort($browser_langcodes);
327 327
     foreach ($browser_langcodes as $langcode => $qvalue) {
328
-      $generic_tag = strtok($langcode, '-');
329
-      if (!isset($browser_langcodes[$generic_tag])) {
328
+        $generic_tag = strtok($langcode, '-');
329
+        if (!isset($browser_langcodes[$generic_tag])) {
330 330
         $browser_langcodes[$generic_tag] = $qvalue;
331
-      }
331
+        }
332 332
     }
333 333
 
334 334
     // Find the enabled language with the greatest qvalue, following the rules
@@ -337,151 +337,151 @@  discard block
 block discarded – undo
337 337
     $best_match_language = FALSE;
338 338
     $max_qvalue = 0;
339 339
     foreach ($languages as $langcode => $language) {
340
-      // Language tags are case insensitive (RFC2616, sec 3.10).
341
-      $langcode = strtolower($langcode);
340
+        // Language tags are case insensitive (RFC2616, sec 3.10).
341
+        $langcode = strtolower($langcode);
342 342
 
343
-      // If nothing matches below, the default qvalue is the one of the wildcard
344
-      // language, if set, or is 0 (which will never match).
345
-      $qvalue = isset($browser_langcodes['*']) ? $browser_langcodes['*'] : 0;
343
+        // If nothing matches below, the default qvalue is the one of the wildcard
344
+        // language, if set, or is 0 (which will never match).
345
+        $qvalue = isset($browser_langcodes['*']) ? $browser_langcodes['*'] : 0;
346 346
 
347
-      // Find the longest possible prefix of the browser-supplied language
348
-      // ('the language-range') that matches this site language ('the language tag').
349
-      $prefix = $langcode;
350
-      do {
347
+        // Find the longest possible prefix of the browser-supplied language
348
+        // ('the language-range') that matches this site language ('the language tag').
349
+        $prefix = $langcode;
350
+        do {
351 351
         if (isset($browser_langcodes[$prefix])) {
352
-          $qvalue = $browser_langcodes[$prefix];
353
-          break;
352
+            $qvalue = $browser_langcodes[$prefix];
353
+            break;
354 354
         }
355
-      } 
356
-       while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
355
+        } 
356
+        while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
357 357
 
358
-      // Find the best match.
359
-      if ($qvalue > $max_qvalue) {
358
+        // Find the best match.
359
+        if ($qvalue > $max_qvalue) {
360 360
         $best_match_language = $language;
361 361
         $max_qvalue = $qvalue;
362
-      }
362
+        }
363 363
     }
364 364
 
365 365
     return $best_match_language;
366
-  }
366
+    }
367 367
 }
368 368
 
369 369
 /**
370 370
  * Implementation of hook_cron()
371 371
  */
372 372
 function boinccore_cron() {
373
-  // Notify moderators if there is site content that requires moderator action
374
-  $items_in_queue = boincuser_moderation_queue_count('cron');
375
-  $last_notification = variable_get('boinccore_last_content_moderation_reminder', 0);
376
-  if ($items_in_queue AND $last_notification < time() - 24*60*60) {
373
+    // Notify moderators if there is site content that requires moderator action
374
+    $items_in_queue = boincuser_moderation_queue_count('cron');
375
+    $last_notification = variable_get('boinccore_last_content_moderation_reminder', 0);
376
+    if ($items_in_queue AND $last_notification < time() - 24*60*60) {
377 377
     global $base_url;
378 378
     global $base_path;
379 379
     $site_name = variable_get('site_name', 'Drupal-BOINC');
380 380
     $site_url = $base_url . $base_path;
381 381
     $settings = array(
382
-      'from' => '',
383
-      'subject' => "Content at {$site_name} is awaiting moderation",
384
-      'message' => ''
385
-      . "Please visit the moderation queue page to review content that "
386
-      . "requires moderator action: \n"
387
-      . "\n"
388
-      . "{$site_url}moderate",
382
+        'from' => '',
383
+        'subject' => "Content at {$site_name} is awaiting moderation",
384
+        'message' => ''
385
+        . "Please visit the moderation queue page to review content that "
386
+        . "requires moderator action: \n"
387
+        . "\n"
388
+        . "{$site_url}moderate",
389 389
     );
390 390
     boinccore_rules_action_mail_to_moderators($settings);
391 391
     variable_set('boinccore_last_content_moderation_reminder', time());
392
-  }
392
+    }
393 393
 
394
-  // Delete expired tokens in BOINC DB
395
-  _boinccore_delete_expired_tokens();
394
+    // Delete expired tokens in BOINC DB
395
+    _boinccore_delete_expired_tokens();
396 396
 }
397 397
 
398 398
 /**
399 399
  * Implementation of hook_rules_action_info().
400 400
  */
401 401
 function boinccore_rules_action_info() {
402
-  return array(
402
+    return array(
403 403
     'boinccore_rules_action_mail_to_moderators' => array(
404
-      'label' => t('Notify moderators via email'),
405
-      'module' => 'BOINC core',
406
-      'eval input' => array('subject', 'message', 'from'),
404
+        'label' => t('Notify moderators via email'),
405
+        'module' => 'BOINC core',
406
+        'eval input' => array('subject', 'message', 'from'),
407 407
     ),
408 408
     'boinccore_rules_action_mark_content_for_moderation' => array(
409
-      'label' => t('Mark content for moderation'),
410
-      'arguments' => array(
409
+        'label' => t('Mark content for moderation'),
410
+        'arguments' => array(
411 411
         'node' => array('type' => 'node', 'label' => t('Content')),
412
-      ),
413
-      'module' => 'BOINC core',
412
+        ),
413
+        'module' => 'BOINC core',
414 414
     ),
415
-  );
415
+    );
416 416
 }
417 417
 
418 418
 /**
419 419
  * Implementation of hook_form_alter()
420 420
  */
421 421
 function boinccore_form_alter(&$form, $form_state, $form_id) {
422
-  global $user;
423
-  $account = user_load($user->uid);
424
-  switch ($form_id) {
425
-  // Comment form
426
-  case 'comment_form':
422
+    global $user;
423
+    $account = user_load($user->uid);
424
+    switch ($form_id) {
425
+    // Comment form
426
+    case 'comment_form':
427 427
     $user_image = boincuser_get_user_profile_image($user->uid);
428 428
     $user_info = '<div class="user">';
429 429
     if ($user_image) {
430
-      $user_info .= '  <div class="picture">';
431
-      if (is_array($user_image) AND $user_image['image']['filepath']) {
430
+        $user_info .= '  <div class="picture">';
431
+        if (is_array($user_image) AND $user_image['image']['filepath']) {
432 432
         $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
433
-      }
434
-      elseif (is_string($user_image)) {
433
+        }
434
+        elseif (is_string($user_image)) {
435 435
         $user_info .= '<img src="' . $user_image . '"/>';
436
-      }
437
-      $user_info .= '  </div>';
436
+        }
437
+        $user_info .= '  </div>';
438 438
     }
439 439
     $user_info .= '  <div class="name">' . theme('username', $account) . '</div>';
440 440
     if ($account->uid) {
441
-      //$user_info .= '  <div class="join-date">Joined: ' . date('j M y', $account->created) . '</div>';
442
-      //$user_info .= '  <div class="post-count">Posts: ' . $account->post_count . '</div>';
443
-      //$user_info .= '  <div class="credit">Credit: ' . $account->boincuser_total_credit . '</div>';
444
-      //$user_info .= '  <div class="rac">RAC: ' . $account->boincuser_expavg_credit . '</div>';
441
+        //$user_info .= '  <div class="join-date">Joined: ' . date('j M y', $account->created) . '</div>';
442
+        //$user_info .= '  <div class="post-count">Posts: ' . $account->post_count . '</div>';
443
+        //$user_info .= '  <div class="credit">Credit: ' . $account->boincuser_total_credit . '</div>';
444
+        //$user_info .= '  <div class="rac">RAC: ' . $account->boincuser_expavg_credit . '</div>';
445 445
     }
446 446
     $user_info .= '</div>';
447 447
     array_unshift($form, array(
448
-      'user_info' => array(
448
+        'user_info' => array(
449 449
         '#value' => $user_info,
450
-      ),
451
-      'comment_form_prefix' => array(
450
+        ),
451
+        'comment_form_prefix' => array(
452 452
         '#value' => '<div class="form-body">',
453
-      ),
453
+        ),
454 454
     ));
455 455
     $form['comment_form_suffix'] = array(
456
-      '#value' => '</div>',
456
+        '#value' => '</div>',
457 457
     );
458 458
     
459 459
     module_load_include('inc', 'bbcode', 'bbcode-help');
460 460
     $form['bbcode_help'] = array(
461
-      '#title' => bts('BBcode help', array(), NULL, 'boinc:help-with-user-input-with-BBCode'),
462
-      '#type' => 'fieldset',
463
-      '#attributes' => array(
461
+        '#title' => bts('BBcode help', array(), NULL, 'boinc:help-with-user-input-with-BBCode'),
462
+        '#type' => 'fieldset',
463
+        '#attributes' => array(
464 464
         'class' => 'bbcode_help',
465
-      ),
466
-      '#collapsible' => TRUE,
467
-      '#collapsed' => TRUE,
468
-      'content' => array(
465
+        ),
466
+        '#collapsible' => TRUE,
467
+        '#collapsed' => TRUE,
468
+        'content' => array(
469 469
         '#value' => _bbcode_filter_tip(),
470
-      ),
470
+        ),
471 471
     );
472 472
     
473 473
     // If a specific comment is being referenced, go back to it on cancel
474 474
     if ($comment_ref = $form['pid']['#value']) {
475
-      $cancel_url = "goto/comment/{$comment_ref}";
475
+        $cancel_url = "goto/comment/{$comment_ref}";
476 476
     }
477 477
     else {
478
-      $cancel_url = "node/{$form['nid']['#value']}";
478
+        $cancel_url = "node/{$form['nid']['#value']}";
479 479
     }
480 480
     
481 481
     // Wrap action buttons for styling consistency
482 482
     $form['buttons']['form control tabs prefix'] = array(
483
-      '#value' => '<ul class="form-control tab-list">',
484
-      '#weight' => 1001,
483
+        '#value' => '<ul class="form-control tab-list">',
484
+        '#weight' => 1001,
485 485
     );
486 486
     $form['buttons']['submit'] = $form['submit'];
487 487
     unset($form['submit']);
@@ -500,12 +500,12 @@  discard block
 block discarded – undo
500 500
     $form['buttons']['preview']['#suffix'] = '</li>';
501 501
     $form['buttons']['preview']['#weight'] = 1003;
502 502
     $form['buttons']['cancel'] = array(
503
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url) . '</li>',
504
-      '#weight' => 1004,
503
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url) . '</li>',
504
+        '#weight' => 1004,
505 505
     );
506 506
     $form['buttons']['form control tabs suffix'] = array(
507
-      '#value' => '</ul>',
508
-      '#weight' => 1010,
507
+        '#value' => '</ul>',
508
+        '#weight' => 1010,
509 509
     );
510 510
     
511 511
     // Remove redundant name field
@@ -521,38 +521,38 @@  discard block
 block discarded – undo
521 521
     $community_role = array_search('community member', user_roles(true));
522 522
     $unrestricted_role = array_search('verified contributor', user_roles(true));
523 523
     if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
524
-      if ($node->type == 'forum') {
524
+        if ($node->type == 'forum') {
525 525
         if (module_exists('captcha')) {
526
-          $form['comment_captcha'] = array(
526
+            $form['comment_captcha'] = array(
527 527
             '#type' => 'captcha',
528 528
             '#weight' => 1000,
529
-          );
529
+            );
530 530
         }
531
-      }
532
-      else {
531
+        }
532
+        else {
533 533
         $form = NULL;
534 534
         $form['from'] = array(
535
-          '#type'  => 'item',
536
-          '#value' => 'You do not have permission to post comments in this forum.',
535
+            '#type'  => 'item',
536
+            '#value' => 'You do not have permission to post comments in this forum.',
537 537
         );
538
-      }
538
+        }
539 539
     }
540 540
     
541 541
     break;
542 542
     
543
-  // Forum node form
544
-  case 'forum_node_form':
543
+    // Forum node form
544
+    case 'forum_node_form':
545 545
   case 'team_forum_node_form':
546 546
     $forum_id = key($form['#node']->taxonomy);
547 547
     $form['buttons']['separator_bottom'] = array(
548
-      '#value' => '<div class="separator buttons"></div>',
549
-      '#weight' => 999,
548
+        '#value' => '<div class="separator buttons"></div>',
549
+        '#weight' => 999,
550 550
     );
551 551
     
552 552
     // Wrap action buttons for styling consistency
553 553
     $form['buttons']['form control tabs prefix'] = array(
554
-      '#value' => '<ul class="form-control tab-list">',
555
-      '#weight' => 1001,
554
+        '#value' => '<ul class="form-control tab-list">',
555
+        '#weight' => 1001,
556 556
     );
557 557
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
558 558
     $form['buttons']['submit']['#value'] = bts('Post topic', array(), NULL, 'boinc:post-forum-comment');
@@ -565,28 +565,28 @@  discard block
 block discarded – undo
565 565
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
566 566
     $form['buttons']['preview_changes']['#weight'] = 1004;
567 567
     $form['buttons']['cancel'] = array(
568
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
569
-      '#weight' => 1005,
568
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
569
+        '#weight' => 1005,
570 570
     );
571 571
     $form['buttons']['form control tabs suffix'] = array(
572
-      '#value' => '</ul>',
573
-      '#weight' => 1010,
572
+        '#value' => '</ul>',
573
+        '#weight' => 1010,
574 574
     );
575 575
 
576 576
     // Add captcha for role='community member'
577 577
     $community_role = array_search('community member', user_roles(true));
578 578
     $unrestricted_role = array_search('verified contributor', user_roles(true));
579 579
     if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
580
-      if (module_exists('captcha')) {
580
+        if (module_exists('captcha')) {
581 581
         $form['comment_captcha'] = array(
582
-          '#type' => 'captcha',
583
-          '#weight' => 1000,
582
+            '#type' => 'captcha',
583
+            '#weight' => 1000,
584 584
         );
585
-      }
585
+        }
586 586
     }
587 587
 
588 588
     break;
589
-  case 'boinccore_delete_confirm':
589
+    case 'boinccore_delete_confirm':
590 590
     // Wrap action buttons for styling consistency
591 591
     $form['actions']['#prefix'] = '<ul class="form-control tab-list">';
592 592
     $form['actions']['#suffix'] = '</ul>';
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
     $form['actions']['cancel']['#prefix'] = '<li class="tab">';
597 597
     $form['actions']['cancel']['#suffix'] = '</li>';
598 598
     break;
599
-  default:
599
+    default:
600 600
   }
601 601
 }
602 602
 
@@ -604,61 +604,61 @@  discard block
 block discarded – undo
604 604
  * Implementation of hook_link_alter()
605 605
  */
606 606
 function boinccore_link_alter(&$links, $node, $comment = NULL) {
607
-  //echo '<pre>' . print_r($links, true) . '</pre>';
608
-  foreach ($links as $module => $link) {
607
+    //echo '<pre>' . print_r($links, true) . '</pre>';
608
+    foreach ($links as $module => $link) {
609 609
     // Remove the ignore user link
610 610
     if (strstr($module, 'ignore_user')) {
611
-      unset($links[$module]);
611
+        unset($links[$module]);
612 612
     }
613
-  }
614
-  // Node first, then comment: to be consistent with boinccore_link() function
615
-  if (!($comment)) {
613
+    }
614
+    // Node first, then comment: to be consistent with boinccore_link() function
615
+    if (!($comment)) {
616 616
     // modify the comment_add link
617 617
     if (isset($links['comment_add'])) {
618
-      $links['comment_add']['title'] = bts('reply', array(), NULL, 'boinc:forum-reply-to-comment');
619
-      $links['comment_add']['attributes'] = array(
620
-          'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
621
-      );
618
+        $links['comment_add']['title'] = bts('reply', array(), NULL, 'boinc:forum-reply-to-comment');
619
+        $links['comment_add']['attributes'] = array(
620
+            'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
621
+        );
622 622
     }
623 623
     // modify quote link
624 624
     if (isset($links['quote'])) {
625
-      $links['quote']['attributes'] = array(
626
-          'title' => bts('Reply to this topic with a quote', array(), NULL, 'boinc:forum-reply-to-comment')
627
-      );
625
+        $links['quote']['attributes'] = array(
626
+            'title' => bts('Reply to this topic with a quote', array(), NULL, 'boinc:forum-reply-to-comment')
627
+        );
628 628
     }
629
-  }
630
-  else {
629
+    }
630
+    else {
631 631
     // Standard EDIT, DELETE, and REPLY links are created by Drupal, but we want to alter them
632 632
     if (isset($links['comment_delete'])) {
633
-      $links['comment_delete']['attributes'] = array(
634
-          'title' => bts('Delete this comment', array(), NULL, 'boinc:forum-delete-comment')
635
-      );
633
+        $links['comment_delete']['attributes'] = array(
634
+            'title' => bts('Delete this comment', array(), NULL, 'boinc:forum-delete-comment')
635
+        );
636 636
     }
637 637
     if (isset($links['comment_edit'])) {
638
-      $links['comment_edit']['attributes'] = array(
639
-          'title' => bts('Edit this comment', array(), NULL, 'boinc:forum-edit-comment')
640
-      );
638
+        $links['comment_edit']['attributes'] = array(
639
+            'title' => bts('Edit this comment', array(), NULL, 'boinc:forum-edit-comment')
640
+        );
641 641
     }
642 642
     if (isset($links['comment_reply'])) {
643
-      $links['comment_reply']['attributes'] = array(
644
-          'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
645
-      );
643
+        $links['comment_reply']['attributes'] = array(
644
+            'title' => bts('Reply to this comment', array(), NULL, 'boinc:forum-reply-to-comment')
645
+        );
646 646
     }
647
-  }// if !$comment
647
+    }// if !$comment
648 648
 }
649 649
 
650 650
 /**
651 651
  * Implementation of hook_locale().
652 652
  */
653 653
 function boinccore_locale($op = 'groups', $group = NULL) {
654
-  switch ($op) {
654
+    switch ($op) {
655 655
     case 'groups':
656 656
         return array('boinc' => 'BOINC');
657 657
     case 'info':
658 658
       //$info['boinc']['refresh callback'] = 'boinccore_locale_refresh';
659 659
       $info['boinc']['format'] = FALSE;
660
-      return $info;
661
-  }
660
+        return $info;
661
+    }
662 662
 }
663 663
 
664 664
 
@@ -666,71 +666,71 @@  discard block
 block discarded – undo
666 666
  * Implementation of hook_link()
667 667
  */
668 668
 function boinccore_link($type, $object, $teaser = FALSE) {
669
-  // Add custom links with this hook
669
+    // Add custom links with this hook
670 670
 
671
-  if ($type=='node') {
671
+    if ($type=='node') {
672 672
     if ( ($object->type=='forum') OR ($object->type=='team_forum') ) {
673
-      // Add topic moderator controls
674
-      if (user_access('edit any forum topic')) {
673
+        // Add topic moderator controls
674
+        if (user_access('edit any forum topic')) {
675 675
         $node_control = "node_control/{$object->nid}";
676 676
         if ($object->sticky) {
677
-          $links['make_unsticky'] = array(
678
-              'title' => bts('Make unsticky', array(), NULL, 'boinc:forum-unsticky-comment'),
679
-              'href' => "{$node_control}/unsticky",
680
-              'attributes' => array(
681
-                  'title' => bts('Remove sticky status from this topic', array(), NULL, 'boinc:forum-unsticky-comment')
682
-              )
683
-          );
677
+            $links['make_unsticky'] = array(
678
+                'title' => bts('Make unsticky', array(), NULL, 'boinc:forum-unsticky-comment'),
679
+                'href' => "{$node_control}/unsticky",
680
+                'attributes' => array(
681
+                    'title' => bts('Remove sticky status from this topic', array(), NULL, 'boinc:forum-unsticky-comment')
682
+                )
683
+            );
684 684
         }
685 685
         else {
686
-          $links['make_sticky'] = array(
687
-              'title' => bts('Make sticky', array(), NULL, 'boinc:forum-sticky-comment'),
688
-              'href' => "{$node_control}/sticky",
689
-              'attributes' => array(
690
-                  'title' => bts('Make this topic sticky', array(), NULL, 'boinc:forum-sticky-comment')
691
-              )
692
-          );
686
+            $links['make_sticky'] = array(
687
+                'title' => bts('Make sticky', array(), NULL, 'boinc:forum-sticky-comment'),
688
+                'href' => "{$node_control}/sticky",
689
+                'attributes' => array(
690
+                    'title' => bts('Make this topic sticky', array(), NULL, 'boinc:forum-sticky-comment')
691
+                )
692
+            );
693 693
         }
694 694
         if ($object->comment == COMMENT_NODE_READ_WRITE) {
695
-          $links['lock'] = array(
696
-              'title' => bts('Lock', array(), NULL, 'boinc:forum-lock-comment'),
697
-              'href' => "{$node_control}/lock",
698
-              'attributes' => array(
699
-                  'title' => bts('Lock this thread for comments', array(), NULL, 'boinc:forum-lock-comment')
700
-              )
701
-          );
695
+            $links['lock'] = array(
696
+                'title' => bts('Lock', array(), NULL, 'boinc:forum-lock-comment'),
697
+                'href' => "{$node_control}/lock",
698
+                'attributes' => array(
699
+                    'title' => bts('Lock this thread for comments', array(), NULL, 'boinc:forum-lock-comment')
700
+                )
701
+            );
702 702
         }
703 703
         else {
704
-          $links['unlock'] = array(
705
-              'title' => bts('Unlock', array(), NULL, 'boinc:forum-unlock-comment'),
706
-              'href' => "{$node_control}/unlock",
707
-              'attributes' => array(
708
-                  'title' => bts('Unlock this thread for comments', array(), NULL, 'boinc:forum-unlock-comment')
709
-              )
710
-          );
704
+            $links['unlock'] = array(
705
+                'title' => bts('Unlock', array(), NULL, 'boinc:forum-unlock-comment'),
706
+                'href' => "{$node_control}/unlock",
707
+                'attributes' => array(
708
+                    'title' => bts('Unlock this thread for comments', array(), NULL, 'boinc:forum-unlock-comment')
709
+                )
710
+            );
711 711
         }
712 712
         if ($object->status) {
713
-          $links['hide'] = array(
714
-              'title' => bts('Hide', array(), NULL, 'boinc:forum-hide-comment'),
715
-              'href' => "{$node_control}/hide",
716
-              'attributes' => array(
717
-                  'title' => bts('Hide this topic', array(), NULL, 'boinc:forum-hide-comment')
718
-              )
719
-          );
713
+            $links['hide'] = array(
714
+                'title' => bts('Hide', array(), NULL, 'boinc:forum-hide-comment'),
715
+                'href' => "{$node_control}/hide",
716
+                'attributes' => array(
717
+                    'title' => bts('Hide this topic', array(), NULL, 'boinc:forum-hide-comment')
718
+                )
719
+            );
720 720
         }
721 721
         else {
722
-          $links['unhide'] = array(
723
-              'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
724
-              'href' => "{$node_control}/unhide",
725
-              'attributes' => array(
726
-                  'title' => bts('Unhide this topic', array(), NULL, 'boinc:forum-unhide-comment')
727
-              )
728
-          );
722
+            $links['unhide'] = array(
723
+                'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
724
+                'href' => "{$node_control}/unhide",
725
+                'attributes' => array(
726
+                    'title' => bts('Unhide this topic', array(), NULL, 'boinc:forum-unhide-comment')
727
+                )
728
+            );
729 729
         }
730
-      }// if user_access('edit any forum topic')
730
+        }// if user_access('edit any forum topic')
731 731
     }
732
-  }
733
-  else if ($type=='comment') {
732
+    }
733
+    else if ($type=='comment') {
734 734
     $node = node_load($object->nid);
735 735
     $nid = $object->nid;
736 736
     $cid = $object->cid;
@@ -750,10 +750,10 @@  discard block
 block discarded – undo
750 750
     // HIDE and COVERT comment
751 751
     // The following are moderator only links
752 752
     if (user_access('administer comments')) {
753
-      $comment_control = "comment_control/{$cid}";
754
-      // Add link to convert comment into a new topic
755
-      $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid ));
756
-      if ($reply_count == 0) {
753
+        $comment_control = "comment_control/{$cid}";
754
+        // Add link to convert comment into a new topic
755
+        $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid ));
756
+        if ($reply_count == 0) {
757 757
         $links['convert'] = array(
758 758
             'title' => bts('Convert', array(), NULL, 'boinc:forum-convert-comment-to-topic'),
759 759
             'href' => "{$comment_control}/convert",
@@ -761,9 +761,9 @@  discard block
 block discarded – undo
761 761
                 'title' => bts('Convert this comment to a new topic', array(), NULL, 'boinc:forum-convert-comment-to-topic')
762 762
             )
763 763
         );
764
-      }
765
-      // Add hide link
766
-      if ($object->status == 0) {
764
+        }
765
+        // Add hide link
766
+        if ($object->status == 0) {
767 767
         $links['hide'] = array(
768 768
             'title' => bts('Hide', array(), NULL, 'boinc:forum-hide-comment'),
769 769
             'href' => "{$comment_control}/hide",
@@ -771,8 +771,8 @@  discard block
 block discarded – undo
771 771
                 'title' => bts('Hide this comment', array(), NULL, 'boinc:forum-hide-comment')
772 772
             )
773 773
         );
774
-      }
775
-      else {
774
+        }
775
+        else {
776 776
         $links['unhide'] = array(
777 777
             'title' => bts('Unhide', array(), NULL, 'boinc:forum-unhide-comment'),
778 778
             'href' => "{$comment_control}/unhide",
@@ -780,11 +780,11 @@  discard block
 block discarded – undo
780 780
                 'title' => bts('Unhide this comment', array(), NULL, 'boinc:forum-unhide-comment')
781 781
             )
782 782
         );
783
-      }
783
+        }
784 784
     }// if user_access('administer comments')
785
-  }//if $type
785
+    }//if $type
786 786
 
787
-  return $links;
787
+    return $links;
788 788
 }
789 789
 
790 790
 
@@ -798,45 +798,45 @@  discard block
 block discarded – undo
798 798
  * link rather than through the node form.
799 799
  */
800 800
 function boinccore_node_control($nid = NULL, $action = NULL) {
801
-  if ((!$nid OR !$node = node_load($nid)) OR
801
+    if ((!$nid OR !$node = node_load($nid)) OR
802 802
       ($node->type == 'forum' AND !user_access('edit any forum topic')) OR
803 803
       ($node->type != 'forum' AND !user_access('administer nodes'))) {
804 804
     // What are you even doing here...
805 805
     return FALSE;
806
-  }
807
-  switch ($action) {
808
-  case 'unhide':
806
+    }
807
+    switch ($action) {
808
+    case 'unhide':
809 809
     node_publish_action($node);
810 810
     break;
811
-  case 'hide':
811
+    case 'hide':
812 812
     node_unpublish_action($node);
813 813
     break;
814
-  case 'sticky':
814
+    case 'sticky':
815 815
     node_make_sticky_action($node);
816 816
     break;
817
-  case 'unsticky':
817
+    case 'unsticky':
818 818
     node_make_unsticky_action($node);
819 819
     break;
820
-  case 'lock':
820
+    case 'lock':
821 821
     $node->comment = 1;
822 822
     watchdog('action', 'Locked comments on @type %title.', array(
823
-      '@type' => node_get_types('name', $node), '%title' => $node->title));
823
+        '@type' => node_get_types('name', $node), '%title' => $node->title));
824 824
     break;
825
-  case 'unlock':
825
+    case 'unlock':
826 826
     $node->comment = 2;
827 827
     watchdog('action', 'Unlocked comments on @type %title.', array(
828
-      '@type' => node_get_types('name', $node), '%title' => $node->title));
828
+        '@type' => node_get_types('name', $node), '%title' => $node->title));
829 829
     break;
830
-  default:
830
+    default:
831 831
   }
832
-  node_save($node);
833
-  // If hiding a forum topic (node) and not an administrator, go to
834
-  // the forum page. Otherwise the user will reach an access-denied
835
-  // page.
836
-  if (($action=="hide") and (!user_access('administer forums'))) {
832
+    node_save($node);
833
+    // If hiding a forum topic (node) and not an administrator, go to
834
+    // the forum page. Otherwise the user will reach an access-denied
835
+    // page.
836
+    if (($action=="hide") and (!user_access('administer forums'))) {
837 837
     drupal_goto("community/forum/{$node->tid}");
838
-  }
839
-  drupal_goto("node/{$nid}");
838
+    }
839
+    drupal_goto("node/{$nid}");
840 840
 }
841 841
 
842 842
 /**
@@ -845,28 +845,28 @@  discard block
 block discarded – undo
845 845
  * through the comment edit form.
846 846
  */
847 847
 function boinccore_comment_control($cid = NULL, $action = NULL) {
848
-  if (!$cid OR !$comment = _comment_load($cid)) {
848
+    if (!$cid OR !$comment = _comment_load($cid)) {
849 849
     // What are you even doing here...
850 850
     return FALSE;
851
-  }
852
-  $return_path = "node/{$comment->nid}";
853
-  $return_anchor = "comment-{$cid}";
854
-  switch ($action) {
855
-  case 'unhide':
851
+    }
852
+    $return_path = "node/{$comment->nid}";
853
+    $return_anchor = "comment-{$cid}";
854
+    switch ($action) {
855
+    case 'unhide':
856 856
     comment_publish_action($comment);
857 857
     rules_invoke_event('boinccore_comment_unhidden', $comment);
858 858
     if (module_exists("boinc_solr_comments")) {
859
-      boinc_solr_comments_publish($comment);
859
+        boinc_solr_comments_publish($comment);
860 860
     }
861 861
     break;
862
-  case 'hide':
862
+    case 'hide':
863 863
     comment_unpublish_action($comment);
864 864
     rules_invoke_event('comment_unpublish', $comment);
865 865
     if (module_exists("boinc_solr_comments")) {
866
-      boinc_solr_comments_unpublish($comment);
866
+        boinc_solr_comments_unpublish($comment);
867 867
     }
868 868
     break;
869
-  case 'convert':
869
+    case 'convert':
870 870
     $node = new stdClass();
871 871
     $node->name = $comment->subject;
872 872
     $node->title = $node->name;
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
     $node->tid = $parent_node->tid;
887 887
  
888 888
     if (filter_access($comment->format)) {
889
-      $node->format = $comment->format;
889
+        $node->format = $comment->format;
890 890
     }
891 891
     
892 892
     // Save the new node
@@ -902,9 +902,9 @@  discard block
 block discarded – undo
902 902
     $return_path = "node/{$node->nid}";
903 903
     $return_anchor = NULL;
904 904
     break;
905
-  default:
905
+    default:
906 906
   }
907
-  drupal_goto($return_path, NULL, $return_anchor);
907
+    drupal_goto($return_path, NULL, $return_anchor);
908 908
 }
909 909
 
910 910
 /**
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
  * Get the authenticator for a given account
913 913
  */
914 914
 function boinccore_lookup_account() {
915
-  include_boinc('user/lookup_account.php');
915
+    include_boinc('user/lookup_account.php');
916 916
 }
917 917
 
918 918
 /**
@@ -920,29 +920,29 @@  discard block
 block discarded – undo
920 920
  * Get assorted details for a given account
921 921
  */
922 922
 function boinccore_am_get_info() {
923
-  // Remove q from the GET request or BOINC will panic
924
-  unset($_GET['q']);
925
-  // Capture the XML output of the RPC so we can override things
926
-  ob_start();
927
-  include_boinc('user/am_get_info.php');
928
-  $xml = ob_get_clean();
929
-  $xml = load_configuration($xml);
930
-  // See if the account has an approved profile in Drupal
931
-  $uid = !empty($xml['am_get_info_reply']['id']) ? boincuser_lookup_uid($xml['am_get_info_reply']['id']) : 0;
932
-  if ($uid) {
923
+    // Remove q from the GET request or BOINC will panic
924
+    unset($_GET['q']);
925
+    // Capture the XML output of the RPC so we can override things
926
+    ob_start();
927
+    include_boinc('user/am_get_info.php');
928
+    $xml = ob_get_clean();
929
+    $xml = load_configuration($xml);
930
+    // See if the account has an approved profile in Drupal
931
+    $uid = !empty($xml['am_get_info_reply']['id']) ? boincuser_lookup_uid($xml['am_get_info_reply']['id']) : 0;
932
+    if ($uid) {
933 933
     $content_profile = content_profile_load('profile', $uid);
934 934
     $profile_is_approved = ($content_profile->status AND !$content_profile->moderate);
935 935
     $country = check_plain($content_profile->field_country[0]['value']);
936 936
     $website = '';
937 937
     if ($profile_is_approved) {
938
-      $website = check_plain($content_profile->field_url[0]['value']);
938
+        $website = check_plain($content_profile->field_url[0]['value']);
939 939
     }
940 940
     // Override BOINC values with Drupal values as needed
941 941
     $xml['am_get_info_reply']['has_profile']['@value'] = ($profile_is_approved) ? 1 : 0;
942 942
     $xml['am_get_info_reply']['country']['@value'] = $country;
943 943
     $xml['am_get_info_reply']['url']['@value'] = $website;
944
-  }
945
-  print save_configuration($xml);
944
+    }
945
+    print save_configuration($xml);
946 946
 }
947 947
 
948 948
 /**
@@ -950,75 +950,75 @@  discard block
 block discarded – undo
950 950
  * Update assorted details for a given account
951 951
  */
952 952
 function boinccore_am_set_info() {
953
-  // Remove q from the GET request or BOINC will panic
954
-  unset($_GET['q']);
955
-  // Validate the XML prefs (in case BOINC does not)
956
-  $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : NULL);
957
-  $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : NULL);
958
-  libxml_use_internal_errors(true);
959
-  $xml = new DomDocument();
960
-  if ($global_prefs) {
953
+    // Remove q from the GET request or BOINC will panic
954
+    unset($_GET['q']);
955
+    // Validate the XML prefs (in case BOINC does not)
956
+    $global_prefs = !empty($_POST['global_prefs']) ? $_POST['global_prefs'] : (!empty($_GET['global_prefs']) ? $_GET['global_prefs'] : NULL);
957
+    $project_prefs = !empty($_POST['project_prefs']) ? $_POST['project_prefs'] : (!empty($_GET['project_prefs']) ? $_GET['project_prefs'] : NULL);
958
+    libxml_use_internal_errors(true);
959
+    $xml = new DomDocument();
960
+    if ($global_prefs) {
961 961
     $xml->loadXML($global_prefs, LIBXML_NOBLANKS);
962 962
     if ($errors = libxml_get_errors($xml)) {
963
-      $lines = explode("\r", $global_prefs);
964
-      watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
963
+        $lines = explode("\r", $global_prefs);
964
+        watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
965 965
         ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
966 966
     }
967
-  }
968
-  elseif ($project_prefs) {
967
+    }
968
+    elseif ($project_prefs) {
969 969
     $xml->loadXML($project_prefs, LIBXML_NOBLANKS);
970 970
     if ($errors = libxml_get_errors($xml)) {
971
-      $lines = explode("\r", $project_prefs);
972
-      watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
971
+        $lines = explode("\r", $project_prefs);
972
+        watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
973 973
         ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
974 974
     }
975
-  }
976
-  if (!$errors) {
975
+    }
976
+    if (!$errors) {
977 977
     // Capture the XML output of the RPC so we can override things
978 978
     ob_start();
979 979
     include_boinc('user/am_set_info.php');
980 980
     $xml = ob_get_clean();
981 981
     $xml = load_configuration($xml);
982 982
     if (isset($xml['am_set_info_reply']['success'])) {
983
-      // Find the account in Drupal
984
-      $boinc_auth = !empty($_POST['account_key']) ? $_POST['account_key'] : $_GET['account_key'];
985
-      db_set_active('boinc_rw');
986
-      $boinc_id = db_result(db_query("
983
+        // Find the account in Drupal
984
+        $boinc_auth = !empty($_POST['account_key']) ? $_POST['account_key'] : $_GET['account_key'];
985
+        db_set_active('boinc_rw');
986
+        $boinc_id = db_result(db_query("
987 987
         SELECT id
988 988
         FROM {user}
989 989
         WHERE authenticator = '%s'",
990 990
         $boinc_auth
991
-      ));
992
-      db_set_active('default');
993
-      $uid = boincuser_lookup_uid($boinc_id);
991
+        ));
992
+        db_set_active('default');
993
+        $uid = boincuser_lookup_uid($boinc_id);
994 994
       
995
-      // Apply any relevant updates to the Drupal account, also
996
-      $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : NULL);
997
-      $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : NULL);
998
-      $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : NULL);
995
+        // Apply any relevant updates to the Drupal account, also
996
+        $country = !empty($_POST['country']) ? $_POST['country'] : (!empty($_GET['country']) ? $_GET['country'] : NULL);
997
+        $url = !empty($_POST['url']) ? $_POST['url'] : (!empty($_GET['url']) ? $_GET['url'] : NULL);
998
+        $email_addr = !empty($_POST['email_addr']) ? $_POST['email_addr'] : (!empty($_GET['email_addr']) ? $_GET['email_addr'] : NULL);
999 999
       
1000
-      if ($email_addr) {
1000
+        if ($email_addr) {
1001 1001
         $account = user_load($uid);
1002 1002
         user_save($account, array('mail' => $email_addr));
1003
-      }
1004
-      if ($country OR $url) {
1003
+        }
1004
+        if ($country OR $url) {
1005 1005
         $content_profile = content_profile_load('profile', $uid);
1006 1006
         if ($country) $content_profile->field_country[0]['value'] = $country;
1007 1007
         if ($url) $content_profile->field_url[0]['value'] = $url;
1008 1008
         node_save($content_profile);
1009
-      }
1009
+        }
1010 1010
     }
1011
-  }
1012
-  else {
1011
+    }
1012
+    else {
1013 1013
     $xml = array(
1014
-      'error' => array(
1014
+        'error' => array(
1015 1015
         'error_num' => -112,
1016 1016
         'error_msg' => "{$errors[0]->message} at line {$errors[0]->line}" .
1017 1017
         ': <br/>' . htmlentities($lines[$errors[0]->line - 1])
1018
-      ),
1018
+        ),
1019 1019
     );
1020
-  }
1021
-  print save_configuration($xml);
1020
+    }
1021
+    print save_configuration($xml);
1022 1022
 }
1023 1023
 
1024 1024
 /**
@@ -1026,17 +1026,17 @@  discard block
 block discarded – undo
1026 1026
  * Update the venue for the given host
1027 1027
  */
1028 1028
 function boinccore_am_set_host_info() {
1029
-  // Remove q from the GET request or BOINC will panic
1030
-  unset($_GET['q']);
1031
-  // Capture the XML output of the RPC so we can override things
1032
-  ob_start();
1033
-  include_boinc('user/am_set_host_info.php');
1034
-  $xml = ob_get_clean();
1035
-  $xml = load_configuration($xml);
1036
-  if (isset($xml['am_set_host_info_reply']['success'])) {
1029
+    // Remove q from the GET request or BOINC will panic
1030
+    unset($_GET['q']);
1031
+    // Capture the XML output of the RPC so we can override things
1032
+    ob_start();
1033
+    include_boinc('user/am_set_host_info.php');
1034
+    $xml = ob_get_clean();
1035
+    $xml = load_configuration($xml);
1036
+    if (isset($xml['am_set_host_info_reply']['success'])) {
1037 1037
     // Override anything that needs overriding
1038
-  }
1039
-  print save_configuration($xml);
1038
+    }
1039
+    print save_configuration($xml);
1040 1040
 }
1041 1041
 
1042 1042
 /**
@@ -1044,29 +1044,29 @@  discard block
 block discarded – undo
1044 1044
  * Get assorted details for a given account
1045 1045
  */
1046 1046
 function boinccore_show_user() {
1047
-  // Remove q from the GET request or BOINC will panic
1048
-  unset($_GET['q']);
1049
-  // Capture the XML output of the RPC so we can override things
1050
-  ob_start();
1051
-  include_boinc('user/show_user.php');
1052
-  $xml = ob_get_clean();
1053
-  $xml = load_configuration($xml);
1054
-  // See if the account has an approved profile in Drupal
1055
-  $uid = !empty($xml['user']['id']) ? boincuser_lookup_uid($xml['user']['id']) : 0;
1056
-  if ($uid) {
1047
+    // Remove q from the GET request or BOINC will panic
1048
+    unset($_GET['q']);
1049
+    // Capture the XML output of the RPC so we can override things
1050
+    ob_start();
1051
+    include_boinc('user/show_user.php');
1052
+    $xml = ob_get_clean();
1053
+    $xml = load_configuration($xml);
1054
+    // See if the account has an approved profile in Drupal
1055
+    $uid = !empty($xml['user']['id']) ? boincuser_lookup_uid($xml['user']['id']) : 0;
1056
+    if ($uid) {
1057 1057
     $content_profile = content_profile_load('profile', $uid);
1058 1058
     $profile_is_approved = ($content_profile->status AND !$content_profile->moderate);
1059 1059
     $country = check_plain($content_profile->field_country[0]['value']);
1060 1060
     $website = '';
1061 1061
     if ($profile_is_approved) {
1062
-      $website = check_plain($content_profile->field_url[0]['value']);
1062
+        $website = check_plain($content_profile->field_url[0]['value']);
1063 1063
     }
1064 1064
     // Override BOINC values with Drupal values as needed
1065 1065
     $xml['user']['has_profile']['@value'] = ($profile_is_approved) ? 1 : 0;
1066 1066
     $xml['user']['country']['@value'] = $country;
1067 1067
     $xml['user']['url']['@value'] = $website;
1068
-  }
1069
-  print save_configuration($xml);
1068
+    }
1069
+    print save_configuration($xml);
1070 1070
 }
1071 1071
 
1072 1072
 /**
@@ -1074,9 +1074,9 @@  discard block
 block discarded – undo
1074 1074
  * Get pending credit information for a given account
1075 1075
  */
1076 1076
 function boinccore_pending_credit() {
1077
-  // Remove q from the GET request or BOINC will panic
1078
-  unset($_GET['q']);
1079
-  include_boinc('user/pending.php');
1077
+    // Remove q from the GET request or BOINC will panic
1078
+    unset($_GET['q']);
1079
+    include_boinc('user/pending.php');
1080 1080
 }
1081 1081
 
1082 1082
 /**
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
  */
1086 1086
 function boinccore_create_team() {
1087 1087
   
1088
-  if (module_exists('boincteam')) {
1088
+    if (module_exists('boincteam')) {
1089 1089
     module_load_include('module', 'boincteam', 'boincteam');
1090 1090
   
1091 1091
     $input_format = !empty($values['format']) ? $values['format'] : 4;
@@ -1098,9 +1098,9 @@  discard block
 block discarded – undo
1098 1098
     $xml = load_configuration($xml);
1099 1099
     
1100 1100
     if (isset($xml['create_team_reply']['success'])) {
1101
-      $boincteam_id = isset($xml['create_team_reply']['team_id']['@value']) ? $xml['create_team_reply']['team_id']['@value'] : 0;
1101
+        $boincteam_id = isset($xml['create_team_reply']['team_id']['@value']) ? $xml['create_team_reply']['team_id']['@value'] : 0;
1102 1102
       
1103
-      if ($boincteam_id) {
1103
+        if ($boincteam_id) {
1104 1104
         
1105 1105
         $boincteam = boincteam_load($boincteam_id);
1106 1106
         $team_owner_uid = boincuser_lookup_uid($boincteam->userid);
@@ -1108,92 +1108,92 @@  discard block
 block discarded – undo
1108 1108
         // Create the team node in Drupal
1109 1109
         
1110 1110
         $values = array(
1111
-          'name' => isset($_GET['name']) ? $_GET['name'] : '',
1112
-          'description' => isset($_GET['description']) ? $_GET['description'] : '',
1113
-          'type' => isset($_GET['type']) ? $_GET['type'] : '',
1111
+            'name' => isset($_GET['name']) ? $_GET['name'] : '',
1112
+            'description' => isset($_GET['description']) ? $_GET['description'] : '',
1113
+            'type' => isset($_GET['type']) ? $_GET['type'] : '',
1114 1114
         );
1115 1115
         $teaser = node_teaser($values['description']);
1116 1116
         $created_time = time();
1117 1117
         
1118 1118
         $node = array(
1119
-          'type' => 'team',
1120
-          'title' => $values['name'],
1121
-          'body' => $values['description'],
1122
-          'teaser' => $teaser,
1123
-          'uid' => $team_owner_uid,
1124
-          'path' => null,
1125
-          'status' => 1,  // published or not - always publish
1126
-          'promote' => 0,
1127
-          'created' => $created_time,
1128
-          'comment' => 0,  // comments disabled
1129
-          'moderate' => 0,
1130
-          'sticky' => 0,
1131
-          'format' => $input_format
1119
+            'type' => 'team',
1120
+            'title' => $values['name'],
1121
+            'body' => $values['description'],
1122
+            'teaser' => $teaser,
1123
+            'uid' => $team_owner_uid,
1124
+            'path' => null,
1125
+            'status' => 1,  // published or not - always publish
1126
+            'promote' => 0,
1127
+            'created' => $created_time,
1128
+            'comment' => 0,  // comments disabled
1129
+            'moderate' => 0,
1130
+            'sticky' => 0,
1131
+            'format' => $input_format
1132 1132
         );
1133 1133
         
1134 1134
         // Use pathauto function, if available, to clean up the path
1135 1135
         if (module_exists('pathauto')) {
1136
-          module_load_include('inc', 'pathauto', 'pathauto');
1137
-          $node['path'] = pathauto_cleanstring($values['name']);
1136
+            module_load_include('inc', 'pathauto', 'pathauto');
1137
+            $node['path'] = pathauto_cleanstring($values['name']);
1138 1138
         
1139
-          $node = (object) $node; // node_save requires an object form
1140
-          $team_categories = taxonomy_get_term_by_name($values['type']);
1141
-          $node->taxonomy[] = $team_categories[0];
1139
+            $node = (object) $node; // node_save requires an object form
1140
+            $team_categories = taxonomy_get_term_by_name($values['type']);
1141
+            $node->taxonomy[] = $team_categories[0];
1142 1142
           
1143
-          // Save the team node
1144
-          node_save($node);
1145
-          // Save the team IDs to a BOINC <--> Drupal reference table.
1146
-          db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boincteam_id, $node->nid);
1143
+            // Save the team node
1144
+            node_save($node);
1145
+            // Save the team IDs to a BOINC <--> Drupal reference table.
1146
+            db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boincteam_id, $node->nid);
1147 1147
         }
1148 1148
         else {
1149
-          $xml['create_team_reply']['warning'] = t(
1149
+            $xml['create_team_reply']['warning'] = t(
1150 1150
             'There was a problem integrating this team into Drupal. Please
1151 1151
             contact @project administrators!', array('@project' => PROJECT)
1152
-          );
1153
-          watchdog(
1152
+            );
1153
+            watchdog(
1154 1154
             'BOINC team',
1155 1155
             'BOINC teams require the Pathauto module. Team cannot be created in
1156 1156
               Drupal via create_team.php RPC.',
1157 1157
             array(),
1158 1158
             WATCHDOG_ERROR
1159
-          );
1160
-          // Delete from the BOINC DB if we can't sync with Drupal
1161
-          $boincteam::delete();
1159
+            );
1160
+            // Delete from the BOINC DB if we can't sync with Drupal
1161
+            $boincteam::delete();
1162 1162
         }
1163
-      }
1164
-      else {
1163
+        }
1164
+        else {
1165 1165
         $xml['create_team_reply']['warning'] = t(
1166
-          'There was a problem integrating this team into Drupal. Please
1166
+            'There was a problem integrating this team into Drupal. Please
1167 1167
           contact @project administrators!', array('@project' => PROJECT)
1168 1168
         );
1169 1169
         watchdog(
1170
-          'BOINC team',
1171
-          'Team cannot be created in Drupal via create_team.php RPC because no
1170
+            'BOINC team',
1171
+            'Team cannot be created in Drupal via create_team.php RPC because no
1172 1172
             BOINC team ID was returned in the XML.',
1173
-          array(),
1174
-          WATCHDOG_ERROR
1173
+            array(),
1174
+            WATCHDOG_ERROR
1175 1175
         );
1176
-      }
1176
+        }
1177 1177
     }
1178
-  }
1179
-  else {
1178
+    }
1179
+    else {
1180 1180
     $xml = array(
1181
-      'error' => array(
1181
+        'error' => array(
1182 1182
         'error_num' => -1,
1183 1183
         'error_msg' => t(
1184
-          'Teams are not enabled for this project'
1184
+            'Teams are not enabled for this project'
1185
+        ),
1185 1186
         ),
1186
-      ),
1187 1187
     );
1188 1188
     watchdog(
1189
-      'BOINC team',
1190
-      'Team cannot be created in Drupal via create_team.php RPC because the
1189
+        'BOINC team',
1190
+        'Team cannot be created in Drupal via create_team.php RPC because the
1191 1191
         BOINC team module is not enabled.',
1192
-      array(),
1193
-      WATCHDOG_ERROR
1192
+        array(),
1193
+        WATCHDOG_ERROR
1194 1194
     );
1195
-  }
1196
-  print save_configuration($xml);
1195
+    }
1196
+    print save_configuration($xml);
1197 1197
 }
1198 1198
 
1199 1199
 /**
@@ -1201,9 +1201,9 @@  discard block
 block discarded – undo
1201 1201
  * Get info on a team by ID or a list of teams that match a given name
1202 1202
  */
1203 1203
 function boinccore_team_lookup() {
1204
-  // Remove q from the GET request or BOINC will panic
1205
-  unset($_GET['q']);
1206
-  include_boinc('user/team_lookup.php');
1204
+    // Remove q from the GET request or BOINC will panic
1205
+    unset($_GET['q']);
1206
+    include_boinc('user/team_lookup.php');
1207 1207
 }
1208 1208
 
1209 1209
 /**
@@ -1211,72 +1211,72 @@  discard block
 block discarded – undo
1211 1211
  * Get members of a given team
1212 1212
  */
1213 1213
 function boinccore_team_email_list() {
1214
-  // See if the account has an approved profile in Drupal
1215
-  $boincteam_id = !empty($_POST['teamid']) ? $_POST['teamid'] : $_GET['teamid'];
1216
-  $credit_only = !empty($_POST['creditonly']) ? $_POST['creditonly'] : $_GET['creditonly'];
1217
-  $show_xml = !empty($_POST['xml']) ? $_POST['xml'] : $_GET['xml'];
1218
-  if (!$show_xml) {
1219
-      // creditonly does not affect non xml output in BOINC
1220
-      $credit_only = FALSE;
1221
-  }
1222
-  $xml = array();
1214
+    // See if the account has an approved profile in Drupal
1215
+    $boincteam_id = !empty($_POST['teamid']) ? $_POST['teamid'] : $_GET['teamid'];
1216
+    $credit_only = !empty($_POST['creditonly']) ? $_POST['creditonly'] : $_GET['creditonly'];
1217
+    $show_xml = !empty($_POST['xml']) ? $_POST['xml'] : $_GET['xml'];
1218
+    if (!$show_xml) {
1219
+        // creditonly does not affect non xml output in BOINC
1220
+        $credit_only = FALSE;
1221
+    }
1222
+    $xml = array();
1223 1223
 
1224
-  if ($boincteam_id && is_numeric($boincteam_id)) {
1224
+    if ($boincteam_id && is_numeric($boincteam_id)) {
1225 1225
     if ($credit_only) {
1226
-      db_set_active('boinc_rw');
1227
-      $result = db_query("
1226
+        db_set_active('boinc_rw');
1227
+        $result = db_query("
1228 1228
         SELECT
1229 1229
           u.id, u.name, u.cross_project_id, u.email_addr, u.total_credit, u.expavg_credit, u.expavg_time
1230 1230
         FROM {user} u
1231 1231
         WHERE u.teamid = %d and u.total_credit > 0",
1232 1232
         $boincteam_id
1233
-      );
1234
-      db_set_active('default');
1233
+        );
1234
+        db_set_active('default');
1235 1235
 
1236
-      $xml = array('users' => array());
1237
-      while ($member = db_fetch_object($result)) {
1236
+        $xml = array('users' => array());
1237
+        while ($member = db_fetch_object($result)) {
1238 1238
         $team_member = array(
1239
-          'id' => $member->id,
1240
-          'cpid' => md5($member->cross_project_id.$member->email_addr),
1241
-          'name' => htmlspecialchars($member->name),
1242
-          'total_credit' => round($member->total_credit),
1243
-          'expavg_credit' => round($member->expavg_credit),
1244
-          'expavg_time' => round($member->expavg_time),
1239
+            'id' => $member->id,
1240
+            'cpid' => md5($member->cross_project_id.$member->email_addr),
1241
+            'name' => htmlspecialchars($member->name),
1242
+            'total_credit' => round($member->total_credit),
1243
+            'expavg_credit' => round($member->expavg_credit),
1244
+            'expavg_time' => round($member->expavg_time),
1245 1245
         );
1246 1246
         $xml['users']['user'][] = $team_member;
1247
-      }
1247
+        }
1248 1248
     }
1249 1249
     else {
1250
-      // Query BOINC database user table
1251
-      db_set_active('boinc_rw');
1252
-      $result = db_query("
1250
+        // Query BOINC database user table
1251
+        db_set_active('boinc_rw');
1252
+        $result = db_query("
1253 1253
         SELECT
1254 1254
           u.id, u.name, u.cross_project_id, u.create_time, u.email_addr, u.total_credit, u.expavg_credit, u.expavg_time
1255 1255
         FROM {user} u
1256 1256
         WHERE u.teamid = %d ORDER BY u.email_addr ASC",
1257 1257
         $boincteam_id
1258
-      );
1259
-      db_set_active('default');
1258
+        );
1259
+        db_set_active('default');
1260 1260
 
1261
-      // Extract information from BOINC database for team members.
1262
-      $team_members = array();
1263
-      while ($member = db_fetch_object($result)) {
1261
+        // Extract information from BOINC database for team members.
1262
+        $team_members = array();
1263
+        while ($member = db_fetch_object($result)) {
1264 1264
         $team_members[$member->id] = array(
1265
-          'id' => $member->id,
1266
-          'cpid' => md5($member->cross_project_id.$member->email_addr),
1267
-          'create_time' => $member->create_time,
1268
-          'name' => htmlspecialchars($member->name),
1269
-          'country' => NULL,
1270
-          'total_credit' => round($member->total_credit),
1271
-          'expavg_credit' => round($member->expavg_credit),
1272
-          'expavg_time' => round($member->expavg_time),
1273
-          'url' => NULL,
1274
-          'has_profile' => 0,
1265
+            'id' => $member->id,
1266
+            'cpid' => md5($member->cross_project_id.$member->email_addr),
1267
+            'create_time' => $member->create_time,
1268
+            'name' => htmlspecialchars($member->name),
1269
+            'country' => NULL,
1270
+            'total_credit' => round($member->total_credit),
1271
+            'expavg_credit' => round($member->expavg_credit),
1272
+            'expavg_time' => round($member->expavg_time),
1273
+            'url' => NULL,
1274
+            'has_profile' => 0,
1275 1275
         );
1276
-      }
1276
+        }
1277 1277
 
1278
-      // Query Drupal database, multiple tables
1279
-      $sql1 = "
1278
+        // Query Drupal database, multiple tables
1279
+        $sql1 = "
1280 1280
          SELECT
1281 1281
            bu.boinc_id, du.uid, du.name, n.nid, n.type, n.field_country_value, n.field_url_value
1282 1282
          FROM {boincuser} AS bu
@@ -1287,28 +1287,28 @@  discard block
 block discarded – undo
1287 1287
            INNER JOIN {content_type_profile} AS p ON node.nid=p.nid
1288 1288
            WHERE node.type='profile' ) n ON du.uid=n.uid
1289 1289
          WHERE bu.boinc_id IN (%s)";
1290
-      $member_id_list = implode(',', array_keys($team_members));
1291
-      if (!$member_id_list) {
1290
+        $member_id_list = implode(',', array_keys($team_members));
1291
+        if (!$member_id_list) {
1292 1292
         $member_id_list = '-1';
1293
-      }
1294
-      $result = db_query($sql1, $member_id_list);
1295
-      while ($member = db_fetch_object($result)) {
1293
+        }
1294
+        $result = db_query($sql1, $member_id_list);
1295
+        while ($member = db_fetch_object($result)) {
1296 1296
         $team_members[$member->boinc_id]['country'] = $member->field_country_value;
1297 1297
         $team_members[$member->boinc_id]['url'] = $member->field_url_value;
1298 1298
         $team_members[$member->boinc_id]['has_profile'] = isset($member->nid) ? 1:  0;
1299 1299
         $xml['users']['user'][] = $team_members[$member->boinc_id];
1300
-      }
1300
+        }
1301 1301
     } // end if credit_only
1302
-  }
1303
-  else {
1302
+    }
1303
+    else {
1304 1304
     $xml = array(
1305
-      'error' => array(
1305
+        'error' => array(
1306 1306
         'error_num' => -136,
1307 1307
         'error_msg' => 'Not found',
1308
-      ),
1308
+        ),
1309 1309
     );
1310
-  } // end if boincteam_id
1311
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1310
+    } // end if boincteam_id
1311
+    print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1312 1312
 }
1313 1313
 
1314 1314
 /**
@@ -1316,114 +1316,114 @@  discard block
 block discarded – undo
1316 1316
  * Edit the forum preferences for a given user
1317 1317
  */
1318 1318
 function boinccore_edit_forum_preferences() {
1319
-  // Do not pass through to BOINC in this case as BOINC forums are no longer
1320
-  // relevant -- use Drupal data only
1319
+    // Do not pass through to BOINC in this case as BOINC forums are no longer
1320
+    // relevant -- use Drupal data only
1321 1321
   
1322
-  $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : NULL);
1322
+    $account_key = !empty($_POST['account_key']) ? $_POST['account_key'] : (!empty($_GET['account_key']) ? $_GET['account_key'] : NULL);
1323 1323
   
1324
-  require_boinc('boinc_db');
1325
-  $boincuser = BoincUser::lookup_auth($account_key);
1326
-  if ($boincuser) {
1324
+    require_boinc('boinc_db');
1325
+    $boincuser = BoincUser::lookup_auth($account_key);
1326
+    if ($boincuser) {
1327 1327
     $uid = boincuser_lookup_uid($boincuser->id);
1328 1328
     if ($uid AND $account = user_load($uid)) {
1329
-      // Currently supported preferences
1330
-      $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : NULL);
1331
-      $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : NULL);
1332
-      $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : NULL);
1333
-      $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : NULL);
1334
-      // Update preferences as needed
1335
-      if ($avatar_url) {
1329
+        // Currently supported preferences
1330
+        $avatar_url = isset($_POST['avatar_url']) ? $_POST['avatar_url'] : (isset($_GET['avatar_url']) ? $_GET['avatar_url'] : NULL);
1331
+        $hide_signatures = isset($_POST['forum_hide_signatures']) ? $_POST['forum_hide_signatures'] : (isset($_GET['forum_hide_signatures']) ? $_GET['forum_hide_signatures'] : NULL);
1332
+        $signature = isset($_POST['signature']) ? $_POST['signature'] : (isset($_GET['signature']) ? $_GET['signature'] : NULL);
1333
+        $post_order = isset($_POST['thread_sort']) ? $_POST['thread_sort'] : (isset($_GET['thread_sort']) ? $_GET['thread_sort'] : NULL);
1334
+        // Update preferences as needed
1335
+        if ($avatar_url) {
1336 1336
         $avatar_image = file_get_contents($avatar_url);
1337 1337
         if ($avatar_image) {
1338
-          $image_dir = 'profiles';
1339
-          $image_path = "{$image_dir}/{$boincuser->id}_avatar.jpg";
1340
-          $file = file_save_data($avatar_image, $image_path, FILE_EXISTS_REPLACE);
1341
-          if ($file) {
1338
+            $image_dir = 'profiles';
1339
+            $image_path = "{$image_dir}/{$boincuser->id}_avatar.jpg";
1340
+            $file = file_save_data($avatar_image, $image_path, FILE_EXISTS_REPLACE);
1341
+            if ($file) {
1342 1342
             $profile = new stdClass();
1343 1343
             $profile->type = 'profile';
1344 1344
             $profile->language = NULL;
1345 1345
             if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1346
-              $profile_node = node_load($profile_nid);
1347
-              if ($profile_node) {
1346
+                $profile_node = node_load($profile_nid);
1347
+                if ($profile_node) {
1348 1348
                 $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', TRUE);
1349 1349
                 if ($avatar_image) {
1350
-                  $profile_node->field_image[0] = $avatar_image;
1351
-                  node_save($profile_node);
1350
+                    $profile_node->field_image[0] = $avatar_image;
1351
+                    node_save($profile_node);
1352 1352
                 }
1353 1353
                 else {
1354
-                  $error = 'Error saving avatar to profile';
1354
+                    $error = 'Error saving avatar to profile';
1355
+                }
1355 1356
                 }
1356
-              }
1357
-              else {
1357
+                else {
1358 1358
                 $error = 'Unable to load user profile';
1359
-              }
1359
+                }
1360 1360
             }
1361 1361
             else {
1362
-              $error = 'User has no profile, so avatar could not be added';
1362
+                $error = 'User has no profile, so avatar could not be added';
1363
+            }
1363 1364
             }
1364
-          }
1365
-          else {
1365
+            else {
1366 1366
             $error = 'Unable to save remote image';
1367
-          }
1367
+            }
1368 1368
         }
1369 1369
         else {
1370
-          $error = 'Could not find avatar image at URL';
1370
+            $error = 'Could not find avatar image at URL';
1371 1371
         }
1372
-      }
1373
-      if ($hide_signatures !== NULL) {
1372
+        }
1373
+        if ($hide_signatures !== NULL) {
1374 1374
         user_save($account, array('hide_signatures' => ($hide_signatures ? 1 : 0)));
1375
-      }
1376
-      if ($signature !== NULL) {
1375
+        }
1376
+        if ($signature !== NULL) {
1377 1377
         $signature = check_markup($signature);
1378 1378
         user_save($account, array('signature' => $signature));
1379
-      }
1380
-      if ($post_order) {
1379
+        }
1380
+        if ($post_order) {
1381 1381
         require_boinc('forum');
1382 1382
         $post_order_map = array(
1383
-          CREATE_TIME_OLD => 2,
1384
-          CREATE_TIME_NEW => 1,
1383
+            CREATE_TIME_OLD => 2,
1384
+            CREATE_TIME_NEW => 1,
1385 1385
         );
1386 1386
         $drupal_post_order = isset($post_order_map[$post_order]) ? $post_order_map[$post_order] : 2;
1387 1387
         user_save($account, array('sort' => $drupal_post_order));
1388
-      }
1389
-      if (!$error) {
1388
+        }
1389
+        if (!$error) {
1390 1390
         // Success
1391 1391
         $xml = array(
1392
-          'edit_forum_preferences' => array(
1392
+            'edit_forum_preferences' => array(
1393 1393
             'success' => NULL,
1394
-          ),
1394
+            ),
1395 1395
         );
1396
-      }
1397
-      else {
1396
+        }
1397
+        else {
1398 1398
         // Failure
1399 1399
         $xml = array(
1400
-          'error' => array(
1400
+            'error' => array(
1401 1401
             'error_num' => -1,
1402 1402
             'error_msg' => $error,
1403
-          ),
1403
+            ),
1404 1404
         );
1405
-      }
1405
+        }
1406 1406
     }
1407 1407
     else {
1408
-      // Drupal user not found
1409
-      $xml = array(
1408
+        // Drupal user not found
1409
+        $xml = array(
1410 1410
         'error' => array(
1411
-          'error_num' => -1,
1412
-          'error_msg' => 'Unknown error',
1411
+            'error_num' => -1,
1412
+            'error_msg' => 'Unknown error',
1413 1413
         ),
1414
-      );
1414
+        );
1415 1415
     }
1416
-  }
1417
-  else {
1416
+    }
1417
+    else {
1418 1418
     // BOINC user not found
1419 1419
     $xml = array(
1420
-      'error' => array(
1420
+        'error' => array(
1421 1421
         'error_num' => -136,
1422 1422
         'error_msg' => 'Not found',
1423
-      ),
1423
+        ),
1424 1424
     );
1425
-  }
1426
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1425
+    }
1426
+    print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1427 1427
 }
1428 1428
 
1429 1429
 /**
@@ -1431,14 +1431,14 @@  discard block
 block discarded – undo
1431 1431
  * Get the last comments OR threads made by a given user
1432 1432
  */
1433 1433
 function boinccore_forum_get_data() {
1434
-  // Do not pass through to BOINC in this case as BOINC forums are no longer
1435
-  // relevant -- use Drupal data only
1434
+    // Do not pass through to BOINC in this case as BOINC forums are no longer
1435
+    // relevant -- use Drupal data only
1436 1436
   
1437
-  $xml = array();
1438
-  $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : NULL);
1439
-  $uid = boincuser_lookup_uid($boinc_id);
1437
+    $xml = array();
1438
+    $boinc_id = !empty($_POST['userid']) ? $_POST['userid'] : (!empty($_GET['userid']) ? $_GET['userid'] : NULL);
1439
+    $uid = boincuser_lookup_uid($boinc_id);
1440 1440
   
1441
-  if ($uid) {
1441
+    if ($uid) {
1442 1442
     $method = !empty($_POST['method']) ? $_POST['method'] : (!empty($_GET['method']) ? $_GET['method'] : NULL);
1443 1443
     $count = !empty($_POST['count']) ? $_POST['count'] : (!empty($_GET['count']) ? $_GET['count'] : NULL);
1444 1444
     if (!$count) $count = 10;
@@ -1446,7 +1446,7 @@  discard block
 block discarded – undo
1446 1446
     switch ($method) {
1447 1447
     case 'user_posts':
1448 1448
       $content_length = !empty($_POST['content_length']) ? $_POST['content_length'] : (!empty($_GET['content_length']) ? $_GET['content_length'] : NULL);
1449
-      $posts = db_query("
1449
+        $posts = db_query("
1450 1450
         SELECT
1451 1451
           c.cid,
1452 1452
           n.nid,
@@ -1460,26 +1460,26 @@  discard block
 block discarded – undo
1460 1460
         ORDER BY timestamp DESC
1461 1461
         LIMIT %d",
1462 1462
         $uid, (int) $count
1463
-      );
1464
-      $xml = array(
1463
+        );
1464
+        $xml = array(
1465 1465
         'rpc_response' => array(
1466
-          'count' => 0,
1467
-          'posts' => array(),
1466
+            'count' => 0,
1467
+            'posts' => array(),
1468 1468
         ),
1469
-      );
1470
-      $post_count = 0;
1471
-      while ($post = db_fetch_object($posts)) {
1469
+        );
1470
+        $post_count = 0;
1471
+        while ($post = db_fetch_object($posts)) {
1472 1472
         $xml['rpc_response']['posts']['post'][] = array(
1473
-          'id' => $post->cid,
1474
-          'threadid' => $post->nid,
1475
-          'threadtitle' => $post->title,
1476
-          'timestamp' => $post->timestamp,
1477
-          'content' => ($content_length ? substr($post->comment, 0, $content_length) : $post->comment),
1473
+            'id' => $post->cid,
1474
+            'threadid' => $post->nid,
1475
+            'threadtitle' => $post->title,
1476
+            'timestamp' => $post->timestamp,
1477
+            'content' => ($content_length ? substr($post->comment, 0, $content_length) : $post->comment),
1478 1478
         );
1479 1479
         $post_count++;
1480
-      }
1481
-      $xml['rpc_response']['count'] = $post_count;
1482
-      break;
1480
+        }
1481
+        $xml['rpc_response']['count'] = $post_count;
1482
+        break;
1483 1483
       
1484 1484
     case 'user_threads':
1485 1485
       $threads = db_query("
@@ -1503,45 +1503,45 @@  discard block
 block discarded – undo
1503 1503
         ORDER BY changed DESC
1504 1504
         LIMIT %d",
1505 1505
         $uid, (int) $count
1506
-      );
1507
-      $xml = array(
1506
+        );
1507
+        $xml = array(
1508 1508
         'rpc_response' => array(
1509
-          'count' => 0,
1510
-          'threads' => array(),
1509
+            'count' => 0,
1510
+            'threads' => array(),
1511 1511
         ),
1512
-      );
1513
-      $thread_count = 0;
1514
-      while ($thread = db_fetch_object($threads)) {
1512
+        );
1513
+        $thread_count = 0;
1514
+        while ($thread = db_fetch_object($threads)) {
1515 1515
         $xml['rpc_response']['threads']['thread'][] = array(
1516
-          'id' => $thread->nid,
1517
-          'forumid' => $thread->tid,
1518
-          'replies' => $thread->replies,
1519
-          'views' => $thread->views,
1520
-          'timestamp' => $thread->changed,
1521
-          'title' => $thread->title,
1516
+            'id' => $thread->nid,
1517
+            'forumid' => $thread->tid,
1518
+            'replies' => $thread->replies,
1519
+            'views' => $thread->views,
1520
+            'timestamp' => $thread->changed,
1521
+            'title' => $thread->title,
1522 1522
         );
1523 1523
         $thread_count++;
1524
-      }
1525
-      $xml['rpc_response']['count'] = $thread_count;
1526
-      break;
1524
+        }
1525
+        $xml['rpc_response']['count'] = $thread_count;
1526
+        break;
1527 1527
     default:
1528 1528
       $xml = array(
1529 1529
         'error' => array(
1530
-          'error_num' => -1,
1531
-          'error_msg' => 'Unknown error',
1530
+            'error_num' => -1,
1531
+            'error_msg' => 'Unknown error',
1532 1532
         ),
1533
-      );
1533
+        );
1534 1534
     }
1535
-  }
1536
-  else {
1535
+    }
1536
+    else {
1537 1537
     $xml = array(
1538
-      'error' => array(
1538
+        'error' => array(
1539 1539
         'error_num' => -136,
1540 1540
         'error_msg' => 'Not found',
1541
-      ),
1541
+        ),
1542 1542
     );
1543
-  }
1544
-  print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1543
+    }
1544
+    print xml_to_text(array_to_xml($xml), TRUE, TRUE);
1545 1545
 }
1546 1546
 
1547 1547
 /**
@@ -1549,9 +1549,9 @@  discard block
 block discarded – undo
1549 1549
  * Get information on applications in the system
1550 1550
  */
1551 1551
 function boinccore_apps() {
1552
-  // Remove q from the GET request or BOINC will panic
1553
-  unset($_GET['q']);
1554
-  include_boinc('user/apps.php');
1552
+    // Remove q from the GET request or BOINC will panic
1553
+    unset($_GET['q']);
1554
+    include_boinc('user/apps.php');
1555 1555
 }
1556 1556
 
1557 1557
 /**
@@ -1561,141 +1561,141 @@  discard block
 block discarded – undo
1561 1561
  * controller function, which can compute the page based on the user's settings
1562 1562
  */
1563 1563
 function boinccore_url_pagination_handler($type, $object_id = NULL) {
1564
-  global $user;
1565
-  $path = NULL;
1566
-  $params = array();
1567
-  switch ($type) {
1568
-  case 'boinc-forum':
1564
+    global $user;
1565
+    $path = NULL;
1566
+    $params = array();
1567
+    switch ($type) {
1568
+    case 'boinc-forum':
1569 1569
     // Redirect requests to a BOINC forum to the Drupal forum
1570 1570
     $forum_id = db_result(db_query('
1571 1571
       SELECT tid
1572 1572
       FROM {boincimport_temp_forum}
1573 1573
       WHERE forum_id = %d',
1574
-      $object_id
1574
+        $object_id
1575 1575
     ));
1576 1576
     if ($forum_id) {
1577
-      drupal_goto("community/forum/{$forum_id}");
1577
+        drupal_goto("community/forum/{$forum_id}");
1578 1578
     }
1579 1579
     break;
1580
-  case 'boinc-forum-index':
1580
+    case 'boinc-forum-index':
1581 1581
     // Redirect requests to the top level BOINC forum to Drupal forums
1582 1582
     drupal_goto("community/forum");
1583 1583
     break;
1584
-  case 'boinc-forum-post':
1584
+    case 'boinc-forum-post':
1585 1585
     // Redirect requests to a BOINC forum post to the Drupal comment
1586 1586
     $cid = db_result(db_query('
1587 1587
       SELECT cid
1588 1588
       FROM {boincimport_temp_post}
1589 1589
       WHERE post_id = %d',
1590
-      $object_id
1590
+        $object_id
1591 1591
     ));
1592 1592
     if ($cid) {
1593
-      drupal_goto("goto/comment/{$cid}");
1593
+        drupal_goto("goto/comment/{$cid}");
1594 1594
     }
1595 1595
     break;
1596
-  case 'boinc-forum-topic':
1596
+    case 'boinc-forum-topic':
1597 1597
     // Redirect requests to a BOINC forum topic to the Drupal node
1598 1598
     $nid = db_result(db_query('
1599 1599
       SELECT nid
1600 1600
       FROM {boincimport_temp_topic}
1601 1601
       WHERE topic_id = %d',
1602
-      $object_id
1602
+        $object_id
1603 1603
     ));
1604 1604
     if ($nid) {
1605
-      drupal_goto("node/{$nid}");
1605
+        drupal_goto("node/{$nid}");
1606 1606
     }
1607 1607
     break;
1608
-  case 'boinc-host':
1608
+    case 'boinc-host':
1609 1609
     // Redirect requests to BOINC host details to the host page in Drupal
1610 1610
     drupal_goto("host/{$object_id}");
1611 1611
     break;
1612
-  case 'boinc-hosts-user':
1612
+    case 'boinc-hosts-user':
1613 1613
     // Redirect requests to a BOINC user host list to the host list in Drupal
1614 1614
     $uid = boincuser_lookup_uid($object_id);
1615 1615
     if ($uid) {
1616
-      drupal_goto("account/{$uid}/computers");
1616
+        drupal_goto("account/{$uid}/computers");
1617 1617
     }
1618 1618
     break;
1619
-  case 'boinc-result':
1619
+    case 'boinc-result':
1620 1620
     // Redirect requests to BOINC task details to the task page in Drupal
1621 1621
     drupal_goto("task/{$object_id}");
1622
-  case 'boinc-results-host':
1622
+    case 'boinc-results-host':
1623 1623
     // Redirect requests to BOINC tasks by host to the host task page in Drupal
1624 1624
     drupal_goto("host/{$object_id}/tasks");
1625 1625
     break;
1626
-  case 'boinc-results-user':
1626
+    case 'boinc-results-user':
1627 1627
     // Redirect requests to a BOINC user's tasks to the Drupal account tasks
1628 1628
     drupal_goto("account/tasks");
1629 1629
     break;
1630
-  case 'boinc-user':
1630
+    case 'boinc-user':
1631 1631
     // Redirect requests to a BOINC user ID to the Drupal profile
1632 1632
     $uid = boincuser_lookup_uid($object_id);
1633 1633
     if ($uid) {
1634
-      drupal_goto("account/{$uid}");
1634
+        drupal_goto("account/{$uid}");
1635 1635
     }
1636 1636
     break;
1637
-  case 'boinc-workunit':
1637
+    case 'boinc-workunit':
1638 1638
     // Redirect requests to BOINC workunits to the workunit page in Drupal
1639 1639
     drupal_goto("workunit/{$object_id}");
1640 1640
     break;
1641
-  case 'comment':
1641
+    case 'comment':
1642 1642
     $object = _comment_load($object_id);
1643 1643
     if ($object) {
1644
-      $path = "node/{$object->nid}";
1645
-      // Get the sort order
1646
-      $gt_lt = '<';
1647
-      $comment_order = (isset($user->sort)) ? $user->sort : variable_get('comment_default_order_forum', 2);
1648
-      if ($comment_order == COMMENT_ORDER_NEWEST_FIRST) {
1644
+        $path = "node/{$object->nid}";
1645
+        // Get the sort order
1646
+        $gt_lt = '<';
1647
+        $comment_order = (isset($user->sort)) ? $user->sort : variable_get('comment_default_order_forum', 2);
1648
+        if ($comment_order == COMMENT_ORDER_NEWEST_FIRST) {
1649 1649
         $gt_lt = '>';
1650
-      }
1651
-      // See how many comments there are before (or after) this comment...
1652
-      $comment_offset = db_result(db_query('
1650
+        }
1651
+        // See how many comments there are before (or after) this comment...
1652
+        $comment_offset = db_result(db_query('
1653 1653
         SELECT COUNT(*) FROM {comments}
1654 1654
         WHERE nid = %d AND status = 0 AND timestamp %s %d',
1655 1655
         $object->nid, $gt_lt, $object->timestamp));
1656
-      if ($comment_offset) {
1656
+        if ($comment_offset) {
1657 1657
         // Get the number of comments per page
1658 1658
         if ($user->comments_per_page) {
1659
-          $comments_per_page = $user->comments_per_page;
1659
+            $comments_per_page = $user->comments_per_page;
1660 1660
         }
1661 1661
         else {
1662
-          $node = node_load($object->nid);
1663
-          $comments_per_page = variable_get(
1662
+            $node = node_load($object->nid);
1663
+            $comments_per_page = variable_get(
1664 1664
             "comment_default_per_page_{$node->type}", 50
1665
-          );
1665
+            );
1666 1666
         }
1667 1667
         // Determine which page to display in order to show the given comment
1668 1668
         $page = floor($comment_offset / $comments_per_page);
1669 1669
         if ($page) {
1670
-          $params = array('page' => $page);
1670
+            $params = array('page' => $page);
1671
+        }
1671 1672
         }
1672
-      }
1673 1673
     }
1674 1674
     if ($path) {
1675
-      drupal_goto($path, $params, "comment-{$object->cid}");
1675
+        drupal_goto($path, $params, "comment-{$object->cid}");
1676 1676
     }
1677 1677
     break;
1678
-  case 'friend-requests':
1678
+    case 'friend-requests':
1679 1679
     // Check for a login, then redirect to the user's friend requests page
1680 1680
     if ($user->uid) {
1681
-      drupal_goto("account/{$user->uid}/friends/pending");
1681
+        drupal_goto("account/{$user->uid}/friends/pending");
1682 1682
     }
1683 1683
     else {
1684
-      drupal_goto('user/login', array(
1684
+        drupal_goto('user/login', array(
1685 1685
         'destination' => 'goto/friend-requests'
1686
-      ));
1686
+        ));
1687 1687
     }
1688 1688
     break;
1689
-  default:
1689
+    default:
1690 1690
   }
1691
-  drupal_not_found();
1691
+    drupal_not_found();
1692 1692
 }
1693 1693
 
1694 1694
 /*
1695 1695
  * Fetch an array of all countries 
1696 1696
  */
1697 1697
 function boinccore_get_country_list() {
1698
-  return array(
1698
+    return array(
1699 1699
     'None' => 'None',
1700 1700
     'International' => 'International',
1701 1701
     'Afghanistan' => 'Afghanistan',
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
     'Yemen' => 'Yemen',
1930 1930
     'Zambia' => 'Zambia',
1931 1931
     'Zimbabwe' => 'Zimbabwe',
1932
-  );
1932
+    );
1933 1933
 }
1934 1934
 
1935 1935
 
@@ -1937,79 +1937,79 @@  discard block
 block discarded – undo
1937 1937
  * Action: Mark node for moderation
1938 1938
  */
1939 1939
 function boinccore_rules_action_mark_content_for_moderation($node) {
1940
-  $node->moderate = 1;
1941
-  return array('node' => $node);
1940
+    $node->moderate = 1;
1941
+    return array('node' => $node);
1942 1942
 }
1943 1943
 
1944 1944
 /**
1945 1945
  * Action: Send mail to moderators.
1946 1946
  */
1947 1947
 function boinccore_rules_action_mail_to_moderators($settings) {
1948
-  module_load_include('inc', 'rules', 'modules/system.rules');
1949
-  $mailing_list = variable_get('boinc_moderator_mailing_list', '');
1950
-  $force_individual_notifications = variable_get('boinc_moderator_force_individual_notifications', 0);
1948
+    module_load_include('inc', 'rules', 'modules/system.rules');
1949
+    $mailing_list = variable_get('boinc_moderator_mailing_list', '');
1950
+    $force_individual_notifications = variable_get('boinc_moderator_force_individual_notifications', 0);
1951 1951
   
1952
-  if (!$mailing_list OR $force_individual_notifications) {
1952
+    if (!$mailing_list OR $force_individual_notifications) {
1953 1953
     // Send individual emails to all moderators
1954 1954
     $roles = user_roles();
1955 1955
     $moderator_rid = array_search('moderator', $roles);
1956 1956
     if ($moderator_rid !== FALSE) {
1957
-      $settings['recipients'] = array($moderator_rid);
1958
-      rules_action_mail_to_users_of_role($settings);
1957
+        $settings['recipients'] = array($moderator_rid);
1958
+        rules_action_mail_to_users_of_role($settings);
1959 1959
     }
1960 1960
     else {
1961
-      watchdog(
1961
+        watchdog(
1962 1962
         'boinccore',
1963 1963
         'Unable to identify members of the moderator role to send moderator notifications!',
1964 1964
         array(),
1965 1965
         WATCHDOG_ERROR
1966
-      );
1966
+        );
1967 1967
     }
1968
-  }
1969
-  if ($mailing_list) {
1968
+    }
1969
+    if ($mailing_list) {
1970 1970
     $settings['to'] = $mailing_list;
1971 1971
     rules_action_mail($settings);
1972
-  }
1972
+    }
1973 1973
 }
1974 1974
 /**
1975 1975
  * Action "Send mail to moderators" configuration form
1976 1976
  */
1977 1977
 function boinccore_rules_action_mail_to_moderators_form($settings = array(), &$form) {
1978
-  // Select only non-anonymous user roles because anonymous users won't have emails.
1979
-  rules_action_mail_to_user_form($settings, $form);
1978
+    // Select only non-anonymous user roles because anonymous users won't have emails.
1979
+    rules_action_mail_to_user_form($settings, $form);
1980 1980
 }
1981 1981
 
1982 1982
 /*
1983 1983
  * BOINC wrapper for string translation
1984 1984
  */
1985 1985
 function bts($string, $args = array(), $langcode = NULL, $context = 'boinc: ', $update = TRUE) {
1986
-  if (function_exists('i18nstrings_ts')) {
1986
+    if (function_exists('i18nstrings_ts')) {
1987 1987
     $string = i18nstrings_ts($context, $string, $langcode, $update);
1988
-  }
1989
-  if (empty($args)) {
1988
+    }
1989
+    if (empty($args)) {
1990 1990
     return $string;
1991
-  }
1992
-  else {
1991
+    }
1992
+    else {
1993 1993
     // Transform arguments before inserting them.
1994 1994
     foreach ($args as $key => $value) {
1995
-      switch ($key [0]) {
1995
+        switch ($key [0]) {
1996 1996
         case '@':
1997 1997
           // Escaped only.
1998 1998
           $args [$key] = check_plain($value);
1999
-          break;
1999
+            break;
2000 2000
 
2001 2001
         case '%':
2002 2002
         default:
2003 2003
           // Escaped and placeholder.
2004 2004
           $args [$key] = theme('placeholder', $value);
2005
-          break;
2005
+            break;
2006 2006
 
2007 2007
         case '!':
2008 2008
           // Pass-through.
2009 2009
       }
2010 2010
     }
2011 2011
     return strtr($string, $args);
2012
-  }
2012
+    }
2013 2013
 }
2014 2014
 
2015 2015
 
@@ -2021,9 +2021,9 @@  discard block
 block discarded – undo
2021 2021
  * Overview of moderation queues
2022 2022
  */               
2023 2023
 function boinccore_moderation_overview_panel() {
2024
-  $output = '<h2 class="pane-title">' . bts('Moderation', array(), NULL, 'boinc:moderate-profiles') . '</h2>';
2025
-  $output .= '<ul class="tab-list action-list">';
2026
-  if (module_exists('user_profiles')) {
2024
+    $output = '<h2 class="pane-title">' . bts('Moderation', array(), NULL, 'boinc:moderate-profiles') . '</h2>';
2025
+    $output .= '<ul class="tab-list action-list">';
2026
+    if (module_exists('user_profiles')) {
2027 2027
     $profile_count = db_result(db_query("
2028 2028
       SELECT COUNT(DISTINCT(n.nid))
2029 2029
       FROM {node} n
@@ -2035,9 +2035,9 @@  discard block
 block discarded – undo
2035 2035
     $output .= '<span class="item-count">' . $profile_count . '</span>';
2036 2036
     $output .= '</div>';
2037 2037
     $output .= '</li>';
2038
-  }
2039
-  $output .= '</ul>';
2040
-  return $output;
2038
+    }
2039
+    $output .= '</ul>';
2040
+    return $output;
2041 2041
 }
2042 2042
 
2043 2043
 
@@ -2047,10 +2047,10 @@  discard block
 block discarded – undo
2047 2047
  *
2048 2048
  */
2049 2049
 function  _boinccore_delete_expired_tokens() {
2050
-  require_boinc('boinc_db');
2050
+    require_boinc('boinc_db');
2051 2051
 
2052
-  $num_deleted = BoincToken::delete_expired();
2053
-  if ($num_deleted>0) {
2052
+    $num_deleted = BoincToken::delete_expired();
2053
+    if ($num_deleted>0) {
2054 2054
     watchdog('boinccore', "Deleted ${num_deleted} tokens from table token", WATCHDOG_NOTICE);
2055
-  }
2055
+    }
2056 2056
 }
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
         // RFC2616 mandates that the decimal part is no more than three digits,
312 312
         // so we multiply the qvalue by 1000 to avoid floating point comparisons.
313 313
         $langcode = strtolower($match[1]);
314
-        $qvalue = isset($match[2]) ? (float) $match[2] : 1;
315
-        $browser_langcodes[$langcode] = (int) ($qvalue * 1000);
314
+        $qvalue = isset($match[2]) ? (float)$match[2] : 1;
315
+        $browser_langcodes[$langcode] = (int)($qvalue*1000);
316 316
       }
317 317
     }
318 318
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     global $base_url;
378 378
     global $base_path;
379 379
     $site_name = variable_get('site_name', 'Drupal-BOINC');
380
-    $site_url = $base_url . $base_path;
380
+    $site_url = $base_url.$base_path;
381 381
     $settings = array(
382 382
       'from' => '',
383 383
       'subject' => "Content at {$site_name} is awaiting moderation",
@@ -432,11 +432,11 @@  discard block
 block discarded – undo
432 432
         $user_info .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
433 433
       }
434 434
       elseif (is_string($user_image)) {
435
-        $user_info .= '<img src="' . $user_image . '"/>';
435
+        $user_info .= '<img src="'.$user_image.'"/>';
436 436
       }
437 437
       $user_info .= '  </div>';
438 438
     }
439
-    $user_info .= '  <div class="name">' . theme('username', $account) . '</div>';
439
+    $user_info .= '  <div class="name">'.theme('username', $account).'</div>';
440 440
     if ($account->uid) {
441 441
       //$user_info .= '  <div class="join-date">Joined: ' . date('j M y', $account->created) . '</div>';
442 442
       //$user_info .= '  <div class="post-count">Posts: ' . $account->post_count . '</div>';
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
     $form['buttons']['preview']['#suffix'] = '</li>';
501 501
     $form['buttons']['preview']['#weight'] = 1003;
502 502
     $form['buttons']['cancel'] = array(
503
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url) . '</li>',
503
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_url).'</li>',
504 504
       '#weight' => 1004,
505 505
     );
506 506
     $form['buttons']['form control tabs suffix'] = array(
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     $node = node_load($form['nid']['#value']);
521 521
     $community_role = array_search('community member', user_roles(true));
522 522
     $unrestricted_role = array_search('verified contributor', user_roles(true));
523
-    if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
523
+    if ((isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role]))) {
524 524
       if ($node->type == 'forum') {
525 525
         if (module_exists('captcha')) {
526 526
           $form['comment_captcha'] = array(
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
566 566
     $form['buttons']['preview_changes']['#weight'] = 1004;
567 567
     $form['buttons']['cancel'] = array(
568
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}") . '</li>',
568
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "community/forum/{$forum_id}").'</li>',
569 569
       '#weight' => 1005,
570 570
     );
571 571
     $form['buttons']['form control tabs suffix'] = array(
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     // Add captcha for role='community member'
577 577
     $community_role = array_search('community member', user_roles(true));
578 578
     $unrestricted_role = array_search('verified contributor', user_roles(true));
579
-    if ( (isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role])) ) {
579
+    if ((isset($account->roles[$community_role])) and (!isset($account->roles[$unrestricted_role]))) {
580 580
       if (module_exists('captcha')) {
581 581
         $form['comment_captcha'] = array(
582 582
           '#type' => 'captcha',
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
 function boinccore_link($type, $object, $teaser = FALSE) {
669 669
   // Add custom links with this hook
670 670
 
671
-  if ($type=='node') {
672
-    if ( ($object->type=='forum') OR ($object->type=='team_forum') ) {
671
+  if ($type == 'node') {
672
+    if (($object->type == 'forum') OR ($object->type == 'team_forum')) {
673 673
       // Add topic moderator controls
674 674
       if (user_access('edit any forum topic')) {
675 675
         $node_control = "node_control/{$object->nid}";
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
       }// if user_access('edit any forum topic')
731 731
     }
732 732
   }
733
-  else if ($type=='comment') {
733
+  else if ($type == 'comment') {
734 734
     $node = node_load($object->nid);
735 735
     $nid = $object->nid;
736 736
     $cid = $object->cid;
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
     if (user_access('administer comments')) {
753 753
       $comment_control = "comment_control/{$cid}";
754 754
       // Add link to convert comment into a new topic
755
-      $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid ));
755
+      $reply_count = db_result(db_query(' SELECT COUNT(*) FROM comments WHERE pid = %d', $cid));
756 756
       if ($reply_count == 0) {
757 757
         $links['convert'] = array(
758 758
             'title' => bts('Convert', array(), NULL, 'boinc:forum-convert-comment-to-topic'),
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
   // If hiding a forum topic (node) and not an administrator, go to
834 834
   // the forum page. Otherwise the user will reach an access-denied
835 835
   // page.
836
-  if (($action=="hide") and (!user_access('administer forums'))) {
836
+  if (($action == "hide") and (!user_access('administer forums'))) {
837 837
     drupal_goto("community/forum/{$node->tid}");
838 838
   }
839 839
   drupal_goto("node/{$nid}");
@@ -875,8 +875,8 @@  discard block
 block discarded – undo
875 875
     $node->created = $comment->timestamp;
876 876
     $node->changed = $node->created;
877 877
     $node->promote = 0; // Display on front page?
878
-    $node->sticky = 0;  // Display top of page?
879
-    $node->status = 1;   // Published?
878
+    $node->sticky = 0; // Display top of page?
879
+    $node->status = 1; // Published?
880 880
     $node->comment = 2;
881 881
     //$node->language = 'en';
882 882
     $node->uid = $comment->uid;
@@ -961,16 +961,16 @@  discard block
 block discarded – undo
961 961
     $xml->loadXML($global_prefs, LIBXML_NOBLANKS);
962 962
     if ($errors = libxml_get_errors($xml)) {
963 963
       $lines = explode("\r", $global_prefs);
964
-      watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
965
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
964
+      watchdog('am_set_info', "XML validation error in global_prefs: {$errors[0]->message} at line {$errors[0]->line}".
965
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
966 966
     }
967 967
   }
968 968
   elseif ($project_prefs) {
969 969
     $xml->loadXML($project_prefs, LIBXML_NOBLANKS);
970 970
     if ($errors = libxml_get_errors($xml)) {
971 971
       $lines = explode("\r", $project_prefs);
972
-      watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}" .
973
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
972
+      watchdog('am_set_info', "XML validation error in project_prefs: {$errors[0]->message} at line {$errors[0]->line}".
973
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1]), array(), WATCHDOG_ERROR);
974 974
     }
975 975
   }
976 976
   if (!$errors) {
@@ -1013,8 +1013,8 @@  discard block
 block discarded – undo
1013 1013
     $xml = array(
1014 1014
       'error' => array(
1015 1015
         'error_num' => -112,
1016
-        'error_msg' => "{$errors[0]->message} at line {$errors[0]->line}" .
1017
-        ': <br/>' . htmlentities($lines[$errors[0]->line - 1])
1016
+        'error_msg' => "{$errors[0]->message} at line {$errors[0]->line}".
1017
+        ': <br/>'.htmlentities($lines[$errors[0]->line - 1])
1018 1018
       ),
1019 1019
     );
1020 1020
   }
@@ -1122,10 +1122,10 @@  discard block
 block discarded – undo
1122 1122
           'teaser' => $teaser,
1123 1123
           'uid' => $team_owner_uid,
1124 1124
           'path' => null,
1125
-          'status' => 1,  // published or not - always publish
1125
+          'status' => 1, // published or not - always publish
1126 1126
           'promote' => 0,
1127 1127
           'created' => $created_time,
1128
-          'comment' => 0,  // comments disabled
1128
+          'comment' => 0, // comments disabled
1129 1129
           'moderate' => 0,
1130 1130
           'sticky' => 0,
1131 1131
           'format' => $input_format
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
           module_load_include('inc', 'pathauto', 'pathauto');
1137 1137
           $node['path'] = pathauto_cleanstring($values['name']);
1138 1138
         
1139
-          $node = (object) $node; // node_save requires an object form
1139
+          $node = (object)$node; // node_save requires an object form
1140 1140
           $team_categories = taxonomy_get_term_by_name($values['type']);
1141 1141
           $node->taxonomy[] = $team_categories[0];
1142 1142
           
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
       while ($member = db_fetch_object($result)) {
1296 1296
         $team_members[$member->boinc_id]['country'] = $member->field_country_value;
1297 1297
         $team_members[$member->boinc_id]['url'] = $member->field_url_value;
1298
-        $team_members[$member->boinc_id]['has_profile'] = isset($member->nid) ? 1:  0;
1298
+        $team_members[$member->boinc_id]['has_profile'] = isset($member->nid) ? 1 : 0;
1299 1299
         $xml['users']['user'][] = $team_members[$member->boinc_id];
1300 1300
       }
1301 1301
     } // end if credit_only
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
             if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1346 1346
               $profile_node = node_load($profile_nid);
1347 1347
               if ($profile_node) {
1348
-                $avatar_image = get_cck_image_object(file_directory_path() . '/' . $image_path, 'field_image', 'profile', TRUE);
1348
+                $avatar_image = get_cck_image_object(file_directory_path().'/'.$image_path, 'field_image', 'profile', TRUE);
1349 1349
                 if ($avatar_image) {
1350 1350
                   $profile_node->field_image[0] = $avatar_image;
1351 1351
                   node_save($profile_node);
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
         WHERE (n.status = 1) AND (c.uid = '%d')
1460 1460
         ORDER BY timestamp DESC
1461 1461
         LIMIT %d",
1462
-        $uid, (int) $count
1462
+        $uid, (int)$count
1463 1463
       );
1464 1464
       $xml = array(
1465 1465
         'rpc_response' => array(
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
         WHERE (n.status = 1) AND (n.uid = '%d')
1503 1503
         ORDER BY changed DESC
1504 1504
         LIMIT %d",
1505
-        $uid, (int) $count
1505
+        $uid, (int)$count
1506 1506
       );
1507 1507
       $xml = array(
1508 1508
         'rpc_response' => array(
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
           );
1666 1666
         }
1667 1667
         // Determine which page to display in order to show the given comment
1668
-        $page = floor($comment_offset / $comments_per_page);
1668
+        $page = floor($comment_offset/$comments_per_page);
1669 1669
         if ($page) {
1670 1670
           $params = array('page' => $page);
1671 1671
         }
@@ -2021,7 +2021,7 @@  discard block
 block discarded – undo
2021 2021
  * Overview of moderation queues
2022 2022
  */               
2023 2023
 function boinccore_moderation_overview_panel() {
2024
-  $output = '<h2 class="pane-title">' . bts('Moderation', array(), NULL, 'boinc:moderate-profiles') . '</h2>';
2024
+  $output = '<h2 class="pane-title">'.bts('Moderation', array(), NULL, 'boinc:moderate-profiles').'</h2>';
2025 2025
   $output .= '<ul class="tab-list action-list">';
2026 2026
   if (module_exists('user_profiles')) {
2027 2027
     $profile_count = db_result(db_query("
@@ -2032,7 +2032,7 @@  discard block
 block discarded – undo
2032 2032
     $output .= '<li class="tab primary">';
2033 2033
     $output .= l(bts('Unvetted profiles', array(), NULL, 'boinc:moderate-profiles'), 'moderate/profiles');
2034 2034
     $output .= '<div class="item-count-wrapper">';
2035
-    $output .= '<span class="item-count">' . $profile_count . '</span>';
2035
+    $output .= '<span class="item-count">'.$profile_count.'</span>';
2036 2036
     $output .= '</div>';
2037 2037
     $output .= '</li>';
2038 2038
   }
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
   require_boinc('boinc_db');
2051 2051
 
2052 2052
   $num_deleted = BoincToken::delete_expired();
2053
-  if ($num_deleted>0) {
2053
+  if ($num_deleted > 0) {
2054 2054
     watchdog('boinccore', "Deleted ${num_deleted} tokens from table token", WATCHDOG_NOTICE);
2055 2055
   }
2056 2056
 }
Please login to merge, or discard this patch.
sites/default/boinc/modules/boincteam/includes/boincteam_forum.forms.inc 3 patches
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -14,84 +14,84 @@  discard block
 block discarded – undo
14 14
  * The definition of the create team form
15 15
  */
16 16
 function boincteam_forum_create_form(&$form_state) {
17
-  $form = array();
17
+    $form = array();
18 18
   
19
-  global $user;
20
-  $account = user_load($user->uid);
19
+    global $user;
20
+    $account = user_load($user->uid);
21 21
   
22
-  $default = array(
22
+    $default = array(
23 23
     'title' => '',
24 24
     'min_time_between_posts' => '',
25 25
     'min_total_credit_to_post' => '',
26 26
     'min_avg_credit_to_post' => '',
27 27
     'public' => 0,
28 28
     'description' => '',
29
-  );
29
+    );
30 30
   
31
-  // Standard option sets
32
-  $form['boolean_options'] = array(
31
+    // Standard option sets
32
+    $form['boolean_options'] = array(
33 33
     '#type' => 'value',
34 34
     '#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')),
35
-  );
35
+    );
36 36
   
37
-  // Form elements
38
-  $form['title'] = array(
37
+    // Form elements
38
+    $form['title'] = array(
39 39
     '#title' => bts('Message board title', array(), NULL, 'boinc:team-forum-create/edit'),
40 40
     '#type' => 'textfield',
41 41
     '#default_value' => $default['title'],
42 42
     '#size' => 34,
43 43
     '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
44
-  );
45
-  $form['min_time_between_posts'] = array(
44
+    );
45
+    $form['min_time_between_posts'] = array(
46 46
     '#title' => bts('Minimum time between posts', array(), NULL, 'boinc:team-forum-create/edit'),
47 47
     '#type' => 'textfield',
48 48
     '#default_value' => $default['min_time_between_posts'],
49 49
     '#size' => 12,
50 50
     '#description' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
51
-  );
52
-  $form['min_total_credit_to_post'] = array(
51
+    );
52
+    $form['min_total_credit_to_post'] = array(
53 53
     '#title' => bts('Minimum total credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
54 54
     '#type' => 'textfield',
55 55
     '#default_value' => $default['min_total_credit_to_post'],
56 56
     '#size' => 12,
57
-  );
58
-  $form['min_avg_credit_to_post'] = array(
57
+    );
58
+    $form['min_avg_credit_to_post'] = array(
59 59
     '#title' => bts('Minimum avg credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
60 60
     '#type' => 'textfield',
61 61
     '#default_value' => $default['min_avg_credit_to_post'],
62 62
     '#size' => 12,
63
-  );
64
-  $form['public'] = array(
63
+    );
64
+    $form['public'] = array(
65 65
     '#title' => bts('Allow public to read board?', array(), NULL, 'boinc:team-forum-create/edit'),
66 66
     '#type' => 'radios',
67 67
     '#options' => $form['boolean_options']['#value'],
68 68
     '#attributes' => array('class' => 'fancy'),
69 69
     '#default_value' => $default['public'],
70
-  );
71
-  $form['description'] = array(
70
+    );
71
+    $form['description'] = array(
72 72
     '#title' => bts('Description', array(), NULL, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
73 73
     '#type' => 'textarea',
74 74
     '#default_value' => $default['description'],
75 75
     '#size' => 5,
76
-  );
76
+    );
77 77
   
78
-  // Form control
79
-  $form['form control tabs prefix'] = array(
78
+    // Form control
79
+    $form['form control tabs prefix'] = array(
80 80
     '#value' => '<ul class="form-control tab-list">'
81
-  );
82
-  $form['submit'] = array(
81
+    );
82
+    $form['submit'] = array(
83 83
     '#prefix' => '<li class="first tab">',
84 84
     '#type' => 'submit',
85 85
     '#value' => bts('Create message board', array(), NULL, 'boinc:team-forum-create/edit'),
86 86
     '#suffix' => '</li>',
87
-  );
88
-  $form['form control tabs'] = array(
87
+    );
88
+    $form['form control tabs'] = array(
89 89
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum/add', TRUE)) . '</li>'
90
-  );
90
+    );
91 91
   
92
-  $form['#redirect'] = "community/teams/{$account->team}";
92
+    $form['#redirect'] = "community/teams/{$account->team}";
93 93
   
94
-  return $form;
94
+    return $form;
95 95
 }
96 96
 
97 97
 /**
@@ -99,33 +99,33 @@  discard block
 block discarded – undo
99 99
  */
100 100
 function boincteam_forum_create_form_validate($form, &$form_state) {
101 101
 
102
-  $values = $form_state['values'];
102
+    $values = $form_state['values'];
103 103
   
104
-  if (!$values['title']) {
104
+    if (!$values['title']) {
105 105
     form_set_error('name', bts('Message board title is required.', array(), NULL, 'boinc:team-forum-create/edit'));
106
-  }
107
-  if (!is_numeric($values['min_time_between_posts']) OR
106
+    }
107
+    if (!is_numeric($values['min_time_between_posts']) OR
108 108
       $values['min_time_between_posts'] < 0) {
109 109
     form_set_error('min_time_between_posts',
110
-      bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
110
+        bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
111 111
     );
112
-  }
113
-  if (!is_numeric($values['min_total_credit_to_post']) OR
112
+    }
113
+    if (!is_numeric($values['min_total_credit_to_post']) OR
114 114
       $values['min_total_credit_to_post'] < 0) {
115 115
     form_set_error('min_total_credit_to_post',
116
-      bts('Please set the minimum total credit that a user'
116
+        bts('Please set the minimum total credit that a user'
117 117
         . ' must earn in order to post to this message board.',
118 118
         array(), NULL, 'boinc:team-forum-create/edit')
119 119
     );
120
-  }
121
-  if (!is_numeric($values['min_avg_credit_to_post']) OR
120
+    }
121
+    if (!is_numeric($values['min_avg_credit_to_post']) OR
122 122
       $values['min_avg_credit_to_post'] < 0) {
123 123
     form_set_error('min_avg_credit_to_post',
124
-      bts('Please set the minimum average credit that a user'
124
+        bts('Please set the minimum average credit that a user'
125 125
         . ' is required to have in order to post to this message board.',
126 126
         array(), NULL, 'boinc:team-forum-create/edit')
127 127
     );
128
-  }
128
+    }
129 129
 }
130 130
 
131 131
 /**
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
  */
134 134
 function boincteam_forum_create_form_submit($form, &$form_state) {
135 135
   
136
-  $values = $form_state['values'];
136
+    $values = $form_state['values'];
137 137
   
138
-  global $user;
139
-  $account = user_load($user->uid);
138
+    global $user;
139
+    $account = user_load($user->uid);
140 140
   
141
-  // Add the team forum to the db
142
-  db_query("
141
+    // Add the team forum to the db
142
+    db_query("
143 143
     INSERT INTO {boincteam_forum} SET
144 144
       nid = %d,
145 145
       title = '%s',
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
     (int) $values['min_avg_credit_to_post'],
158 158
     ($values['public']) ? 1 : 0,
159 159
     $values['description']
160
-  );
160
+    );
161 161
   
162
-  drupal_set_message(t('Message board "@forum" has been created.',
162
+    drupal_set_message(t('Message board "@forum" has been created.',
163 163
     array('@forum' => $values['title'])));
164 164
 }
165 165
 
@@ -171,84 +171,84 @@  discard block
 block discarded – undo
171 171
  * The definition of the edit team forum form
172 172
  */
173 173
 function boincteam_forum_edit_form(&$form_state, $tfid) {
174
-  $form = array();
175
-  $boincteam_forum = boincteam_forum_load($tfid);
174
+    $form = array();
175
+    $boincteam_forum = boincteam_forum_load($tfid);
176 176
   
177
-  $form_state['storage']['tfid'] = $tfid;
177
+    $form_state['storage']['tfid'] = $tfid;
178 178
   
179
-  $default = array(
179
+    $default = array(
180 180
     'title' => $boincteam_forum->title,
181 181
     'min_time_between_posts' => $boincteam_forum->min_time_between_posts,
182 182
     'min_total_credit_to_post' => $boincteam_forum->min_total_credit_to_post,
183 183
     'min_avg_credit_to_post' => $boincteam_forum->min_avg_credit_to_post,
184 184
     'public' => ($boincteam_forum->public) ? 1 : 0,
185 185
     'description' => $boincteam_forum->description,
186
-  );
186
+    );
187 187
   
188
-  // Standard option sets
189
-  $form['boolean_options'] = array(
188
+    // Standard option sets
189
+    $form['boolean_options'] = array(
190 190
     '#type' => 'value',
191 191
     '#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')),
192
-  );
192
+    );
193 193
   
194
-  // Form elements
195
-  $form['title'] = array(
194
+    // Form elements
195
+    $form['title'] = array(
196 196
     '#title' => bts('Message board title', array(), NULL, 'boinc:team-forum-create/edit'),
197 197
     '#type' => 'textfield',
198 198
     '#default_value' => $default['title'],
199 199
     '#size' => 34,
200 200
     '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
201
-  );
202
-  $form['min_time_between_posts'] = array(
201
+    );
202
+    $form['min_time_between_posts'] = array(
203 203
     '#title' => bts('Minimum time between posts', array(), NULL, 'boinc:team-forum-create/edit'),
204 204
     '#type' => 'textfield',
205 205
     '#default_value' => $default['min_time_between_posts'],
206 206
     '#size' => 12,
207 207
     '#description' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
208
-  );
209
-  $form['min_total_credit_to_post'] = array(
208
+    );
209
+    $form['min_total_credit_to_post'] = array(
210 210
     '#title' => bts('Minimum total credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
211 211
     '#type' => 'textfield',
212 212
     '#default_value' => $default['min_total_credit_to_post'],
213 213
     '#size' => 12,
214
-  );
215
-  $form['min_avg_credit_to_post'] = array(
214
+    );
215
+    $form['min_avg_credit_to_post'] = array(
216 216
     '#title' => bts('Minimum avg credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
217 217
     '#type' => 'textfield',
218 218
     '#default_value' => $default['min_avg_credit_to_post'],
219 219
     '#size' => 12,
220
-  );
221
-  $form['public'] = array(
220
+    );
221
+    $form['public'] = array(
222 222
     '#title' => bts('Allow public to read board?', array(), NULL, 'boinc:team-forum-create/edit'),
223 223
     '#type' => 'radios',
224 224
     '#options' => $form['boolean_options']['#value'],
225 225
     '#attributes' => array('class' => 'fancy'),
226 226
     '#default_value' => $default['public'],
227
-  );
228
-  $form['description'] = array(
227
+    );
228
+    $form['description'] = array(
229 229
     '#title' => bts('Description', array(), NULL, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
230 230
     '#type' => 'textarea',
231 231
     '#default_value' => $default['description'],
232 232
     '#size' => 5,
233
-  );
233
+    );
234 234
   
235
-  // Form control
236
-  $form['form control tabs prefix'] = array(
235
+    // Form control
236
+    $form['form control tabs prefix'] = array(
237 237
     '#value' => '<ul class="form-control tab-list">'
238
-  );
239
-  $form['submit'] = array(
238
+    );
239
+    $form['submit'] = array(
240 240
     '#prefix' => '<li class="first tab">',
241 241
     '#type' => 'submit',
242 242
     '#value' => bts('Save message board', array(), NULL, 'boinc:team-forum-create/edit'),
243 243
     '#suffix' => '</li>',
244
-  );
245
-  $form['form control tabs'] = array(
244
+    );
245
+    $form['form control tabs'] = array(
246 246
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum', TRUE)) . '</li>'
247
-  );
247
+    );
248 248
   
249
-  $form['#redirect'] = "community/teams/{$boincteam_forum->nid}";
249
+    $form['#redirect'] = "community/teams/{$boincteam_forum->nid}";
250 250
   
251
-  return $form;
251
+    return $form;
252 252
 }
253 253
 
254 254
 /**
@@ -256,33 +256,33 @@  discard block
 block discarded – undo
256 256
  */
257 257
 function boincteam_forum_edit_form_validate($form, &$form_state) {
258 258
 
259
-  $values = $form_state['values'];
259
+    $values = $form_state['values'];
260 260
   
261
-  if (!$values['title']) {
261
+    if (!$values['title']) {
262 262
     form_set_error('name', bts('Message board title is required.', array(), NULL, 'boinc:team-forum-create/edit'));
263
-  }
264
-  if (!is_numeric($values['min_time_between_posts']) OR
263
+    }
264
+    if (!is_numeric($values['min_time_between_posts']) OR
265 265
       $values['min_time_between_posts'] < 0) {
266 266
     form_set_error('min_time_between_posts', 
267
-      bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
267
+        bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
268 268
     );
269
-  }
270
-  if (!is_numeric($values['min_total_credit_to_post']) OR
269
+    }
270
+    if (!is_numeric($values['min_total_credit_to_post']) OR
271 271
       $values['min_total_credit_to_post'] < 0) {
272 272
     form_set_error('min_total_credit_to_post',
273
-      bts('Please set the minimum total credit that a user'
273
+        bts('Please set the minimum total credit that a user'
274 274
         . ' must earn in order to post to this message board.',
275 275
         array(), NULL, 'boinc:team-forum-create/edit')
276 276
     );
277
-  }
278
-  if (!is_numeric($values['min_avg_credit_to_post']) OR
277
+    }
278
+    if (!is_numeric($values['min_avg_credit_to_post']) OR
279 279
       $values['min_avg_credit_to_post'] < 0) {
280 280
     form_set_error('min_avg_credit_to_post', 
281
-      bts('Please set the minimum average credit that a user'
281
+        bts('Please set the minimum average credit that a user'
282 282
         . ' is required to have in order to post to this message board.',
283 283
         array(), NULL, 'boinc:team-forum-create/edit')
284 284
     );
285
-  }
285
+    }
286 286
 }
287 287
 
288 288
 /**
@@ -290,11 +290,11 @@  discard block
 block discarded – undo
290 290
  */
291 291
 function boincteam_forum_edit_form_submit($form, &$form_state) {
292 292
   
293
-  $tfid = $form_state['storage']['tfid'];
294
-  $values = $form_state['values'];
293
+    $tfid = $form_state['storage']['tfid'];
294
+    $values = $form_state['values'];
295 295
   
296
-  // Update the team forum in the db
297
-  db_query("
296
+    // Update the team forum in the db
297
+    db_query("
298 298
     UPDATE {boincteam_forum} SET
299 299
       title = '%s',
300 300
       min_time_between_posts = '%d',
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
     ($values['public']) ? 1 : 0,
312 312
     $values['description'],
313 313
     $tfid
314
-  );
314
+    );
315 315
   
316
-  drupal_set_message(t('Details for message board "@forum" have been updated.',
316
+    drupal_set_message(t('Details for message board "@forum" have been updated.',
317 317
     array('@forum' => $values['title'])));
318 318
   
319
-  // The storage variable quietly kills redirection for some reason... unset it
320
-  unset($form_state['storage']);
319
+    // The storage variable quietly kills redirection for some reason... unset it
320
+    unset($form_state['storage']);
321 321
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     '#suffix' => '</li>',
87 87
   );
88 88
   $form['form control tabs'] = array(
89
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum/add', TRUE)) . '</li>'
89
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum/add', TRUE)).'</li>'
90 90
   );
91 91
   
92 92
   $form['#redirect'] = "community/teams/{$account->team}";
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
       updated = UNIX_TIMESTAMP()",
153 153
     $account->team,
154 154
     $values['title'],
155
-    (int) $values['min_time_between_posts'],
156
-    (int) $values['min_total_credit_to_post'],
157
-    (int) $values['min_avg_credit_to_post'],
155
+    (int)$values['min_time_between_posts'],
156
+    (int)$values['min_total_credit_to_post'],
157
+    (int)$values['min_avg_credit_to_post'],
158 158
     ($values['public']) ? 1 : 0,
159 159
     $values['description']
160 160
   );
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     '#suffix' => '</li>',
244 244
   );
245 245
   $form['form control tabs'] = array(
246
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum', TRUE)) . '</li>'
246
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum', TRUE)).'</li>'
247 247
   );
248 248
   
249 249
   $form['#redirect'] = "community/teams/{$boincteam_forum->nid}";
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
       updated = UNIX_TIMESTAMP()
306 306
     WHERE tfid='%d'",
307 307
     $values['title'],
308
-    (int) $values['min_time_between_posts'],
309
-    (int) $values['min_total_credit_to_post'],
310
-    (int) $values['min_avg_credit_to_post'],
308
+    (int)$values['min_time_between_posts'],
309
+    (int)$values['min_total_credit_to_post'],
310
+    (int)$values['min_avg_credit_to_post'],
311 311
     ($values['public']) ? 1 : 0,
312 312
     $values['description'],
313 313
     $tfid
Please login to merge, or discard this patch.
Upper-Lower-Casing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -31,45 +31,45 @@  discard block
 block discarded – undo
31 31
   // Standard option sets
32 32
   $form['boolean_options'] = array(
33 33
     '#type' => 'value',
34
-    '#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')),
34
+    '#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')),
35 35
   );
36 36
   
37 37
   // Form elements
38 38
   $form['title'] = array(
39
-    '#title' => bts('Message board title', array(), NULL, 'boinc:team-forum-create/edit'),
39
+    '#title' => bts('Message board title', array(), null, 'boinc:team-forum-create/edit'),
40 40
     '#type' => 'textfield',
41 41
     '#default_value' => $default['title'],
42 42
     '#size' => 34,
43
-    '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
43
+    '#description' => bts('Text only, no HTML tags', array(), null, 'boinc:team-form-help'),
44 44
   );
45 45
   $form['min_time_between_posts'] = array(
46
-    '#title' => bts('Minimum time between posts', array(), NULL, 'boinc:team-forum-create/edit'),
46
+    '#title' => bts('Minimum time between posts', array(), null, 'boinc:team-forum-create/edit'),
47 47
     '#type' => 'textfield',
48 48
     '#default_value' => $default['min_time_between_posts'],
49 49
     '#size' => 12,
50
-    '#description' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
50
+    '#description' => bts('seconds', array(), null, 'boinc:unit-of-time'),
51 51
   );
52 52
   $form['min_total_credit_to_post'] = array(
53
-    '#title' => bts('Minimum total credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
53
+    '#title' => bts('Minimum total credit to post', array(), null, 'boinc:team-forum-create/edit'),
54 54
     '#type' => 'textfield',
55 55
     '#default_value' => $default['min_total_credit_to_post'],
56 56
     '#size' => 12,
57 57
   );
58 58
   $form['min_avg_credit_to_post'] = array(
59
-    '#title' => bts('Minimum avg credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
59
+    '#title' => bts('Minimum avg credit to post', array(), null, 'boinc:team-forum-create/edit'),
60 60
     '#type' => 'textfield',
61 61
     '#default_value' => $default['min_avg_credit_to_post'],
62 62
     '#size' => 12,
63 63
   );
64 64
   $form['public'] = array(
65
-    '#title' => bts('Allow public to read board?', array(), NULL, 'boinc:team-forum-create/edit'),
65
+    '#title' => bts('Allow public to read board?', array(), null, 'boinc:team-forum-create/edit'),
66 66
     '#type' => 'radios',
67 67
     '#options' => $form['boolean_options']['#value'],
68 68
     '#attributes' => array('class' => 'fancy'),
69 69
     '#default_value' => $default['public'],
70 70
   );
71 71
   $form['description'] = array(
72
-    '#title' => bts('Description', array(), NULL, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
72
+    '#title' => bts('Description', array(), null, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
73 73
     '#type' => 'textarea',
74 74
     '#default_value' => $default['description'],
75 75
     '#size' => 5,
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
   $form['submit'] = array(
83 83
     '#prefix' => '<li class="first tab">',
84 84
     '#type' => 'submit',
85
-    '#value' => bts('Create message board', array(), NULL, 'boinc:team-forum-create/edit'),
85
+    '#value' => bts('Create message board', array(), null, 'boinc:team-forum-create/edit'),
86 86
     '#suffix' => '</li>',
87 87
   );
88 88
   $form['form control tabs'] = array(
89
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum/add', TRUE)) . '</li>'
89
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), strstr($_GET['q'], '/forum/add', true)) . '</li>'
90 90
   );
91 91
   
92 92
   $form['#redirect'] = "community/teams/{$account->team}";
@@ -102,28 +102,28 @@  discard block
 block discarded – undo
102 102
   $values = $form_state['values'];
103 103
   
104 104
   if (!$values['title']) {
105
-    form_set_error('name', bts('Message board title is required.', array(), NULL, 'boinc:team-forum-create/edit'));
105
+    form_set_error('name', bts('Message board title is required.', array(), null, 'boinc:team-forum-create/edit'));
106 106
   }
107
-  if (!is_numeric($values['min_time_between_posts']) OR
107
+  if (!is_numeric($values['min_time_between_posts']) or
108 108
       $values['min_time_between_posts'] < 0) {
109 109
     form_set_error('min_time_between_posts',
110
-      bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
110
+      bts('Please set the minimum time required between posts.', array(), null, 'boinc:team-forum-create/edit')
111 111
     );
112 112
   }
113
-  if (!is_numeric($values['min_total_credit_to_post']) OR
113
+  if (!is_numeric($values['min_total_credit_to_post']) or
114 114
       $values['min_total_credit_to_post'] < 0) {
115 115
     form_set_error('min_total_credit_to_post',
116 116
       bts('Please set the minimum total credit that a user'
117 117
         . ' must earn in order to post to this message board.',
118
-        array(), NULL, 'boinc:team-forum-create/edit')
118
+        array(), null, 'boinc:team-forum-create/edit')
119 119
     );
120 120
   }
121
-  if (!is_numeric($values['min_avg_credit_to_post']) OR
121
+  if (!is_numeric($values['min_avg_credit_to_post']) or
122 122
       $values['min_avg_credit_to_post'] < 0) {
123 123
     form_set_error('min_avg_credit_to_post',
124 124
       bts('Please set the minimum average credit that a user'
125 125
         . ' is required to have in order to post to this message board.',
126
-        array(), NULL, 'boinc:team-forum-create/edit')
126
+        array(), null, 'boinc:team-forum-create/edit')
127 127
     );
128 128
   }
129 129
 }
@@ -188,45 +188,45 @@  discard block
 block discarded – undo
188 188
   // Standard option sets
189 189
   $form['boolean_options'] = array(
190 190
     '#type' => 'value',
191
-    '#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')),
191
+    '#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')),
192 192
   );
193 193
   
194 194
   // Form elements
195 195
   $form['title'] = array(
196
-    '#title' => bts('Message board title', array(), NULL, 'boinc:team-forum-create/edit'),
196
+    '#title' => bts('Message board title', array(), null, 'boinc:team-forum-create/edit'),
197 197
     '#type' => 'textfield',
198 198
     '#default_value' => $default['title'],
199 199
     '#size' => 34,
200
-    '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
200
+    '#description' => bts('Text only, no HTML tags', array(), null, 'boinc:team-form-help'),
201 201
   );
202 202
   $form['min_time_between_posts'] = array(
203
-    '#title' => bts('Minimum time between posts', array(), NULL, 'boinc:team-forum-create/edit'),
203
+    '#title' => bts('Minimum time between posts', array(), null, 'boinc:team-forum-create/edit'),
204 204
     '#type' => 'textfield',
205 205
     '#default_value' => $default['min_time_between_posts'],
206 206
     '#size' => 12,
207
-    '#description' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
207
+    '#description' => bts('seconds', array(), null, 'boinc:unit-of-time'),
208 208
   );
209 209
   $form['min_total_credit_to_post'] = array(
210
-    '#title' => bts('Minimum total credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
210
+    '#title' => bts('Minimum total credit to post', array(), null, 'boinc:team-forum-create/edit'),
211 211
     '#type' => 'textfield',
212 212
     '#default_value' => $default['min_total_credit_to_post'],
213 213
     '#size' => 12,
214 214
   );
215 215
   $form['min_avg_credit_to_post'] = array(
216
-    '#title' => bts('Minimum avg credit to post', array(), NULL, 'boinc:team-forum-create/edit'),
216
+    '#title' => bts('Minimum avg credit to post', array(), null, 'boinc:team-forum-create/edit'),
217 217
     '#type' => 'textfield',
218 218
     '#default_value' => $default['min_avg_credit_to_post'],
219 219
     '#size' => 12,
220 220
   );
221 221
   $form['public'] = array(
222
-    '#title' => bts('Allow public to read board?', array(), NULL, 'boinc:team-forum-create/edit'),
222
+    '#title' => bts('Allow public to read board?', array(), null, 'boinc:team-forum-create/edit'),
223 223
     '#type' => 'radios',
224 224
     '#options' => $form['boolean_options']['#value'],
225 225
     '#attributes' => array('class' => 'fancy'),
226 226
     '#default_value' => $default['public'],
227 227
   );
228 228
   $form['description'] = array(
229
-    '#title' => bts('Description', array(), NULL, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
229
+    '#title' => bts('Description', array(), null, 'boinc:team-forum-create/edit:-1:ignoreoverwrite'),
230 230
     '#type' => 'textarea',
231 231
     '#default_value' => $default['description'],
232 232
     '#size' => 5,
@@ -239,11 +239,11 @@  discard block
 block discarded – undo
239 239
   $form['submit'] = array(
240 240
     '#prefix' => '<li class="first tab">',
241 241
     '#type' => 'submit',
242
-    '#value' => bts('Save message board', array(), NULL, 'boinc:team-forum-create/edit'),
242
+    '#value' => bts('Save message board', array(), null, 'boinc:team-forum-create/edit'),
243 243
     '#suffix' => '</li>',
244 244
   );
245 245
   $form['form control tabs'] = array(
246
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/forum', TRUE)) . '</li>'
246
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), strstr($_GET['q'], '/forum', true)) . '</li>'
247 247
   );
248 248
   
249 249
   $form['#redirect'] = "community/teams/{$boincteam_forum->nid}";
@@ -259,28 +259,28 @@  discard block
 block discarded – undo
259 259
   $values = $form_state['values'];
260 260
   
261 261
   if (!$values['title']) {
262
-    form_set_error('name', bts('Message board title is required.', array(), NULL, 'boinc:team-forum-create/edit'));
262
+    form_set_error('name', bts('Message board title is required.', array(), null, 'boinc:team-forum-create/edit'));
263 263
   }
264
-  if (!is_numeric($values['min_time_between_posts']) OR
264
+  if (!is_numeric($values['min_time_between_posts']) or
265 265
       $values['min_time_between_posts'] < 0) {
266 266
     form_set_error('min_time_between_posts', 
267
-      bts('Please set the minimum time required between posts.', array(), NULL, 'boinc:team-forum-create/edit')
267
+      bts('Please set the minimum time required between posts.', array(), null, 'boinc:team-forum-create/edit')
268 268
     );
269 269
   }
270
-  if (!is_numeric($values['min_total_credit_to_post']) OR
270
+  if (!is_numeric($values['min_total_credit_to_post']) or
271 271
       $values['min_total_credit_to_post'] < 0) {
272 272
     form_set_error('min_total_credit_to_post',
273 273
       bts('Please set the minimum total credit that a user'
274 274
         . ' must earn in order to post to this message board.',
275
-        array(), NULL, 'boinc:team-forum-create/edit')
275
+        array(), null, 'boinc:team-forum-create/edit')
276 276
     );
277 277
   }
278
-  if (!is_numeric($values['min_avg_credit_to_post']) OR
278
+  if (!is_numeric($values['min_avg_credit_to_post']) or
279 279
       $values['min_avg_credit_to_post'] < 0) {
280 280
     form_set_error('min_avg_credit_to_post', 
281 281
       bts('Please set the minimum average credit that a user'
282 282
         . ' is required to have in order to post to this message board.',
283
-        array(), NULL, 'boinc:team-forum-create/edit')
283
+        array(), null, 'boinc:team-forum-create/edit')
284 284
     );
285 285
   }
286 286
 }
Please login to merge, or discard this patch.
html/ops/show_log.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 echo 'Hint: Example greps: "RESULT#106876", "26fe99aa_25636_00119.wu_1", "WU#8152", "too many errors", "2003-07-17", "CRITICAL" <br>';
61 61
 
62 62
 if (strlen($f)) {
63
-	$f = "../log*/". $f;
63
+    $f = "../log*/". $f;
64 64
 } else {
65 65
     $f = "../log*/*.log";
66 66
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
     exit("Error: couldn't get log_dir from config file.");
28 28
 }
29 29
 
30
-if( isset($_GET["f"]) ){
30
+if (isset($_GET["f"])) {
31 31
     $f = $_GET["f"];
32 32
     $f = escapeshellcmd($f);
33 33
 } else {
34 34
     $f = "";
35 35
 }
36
-if( isset($_GET["s"]) ){
36
+if (isset($_GET["s"])) {
37 37
     $s = $_GET["s"];
38 38
     $s = escapeshellcmd($s);
39 39
 } else {
40 40
     $s = "";
41 41
 }
42
-if( isset($_GET["l"]) ){
42
+if (isset($_GET["l"])) {
43 43
     $l = (int)$_GET["l"];
44 44
 } else {
45 45
     $l = 0;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 echo 'Hint: Example greps: "RESULT#106876", "26fe99aa_25636_00119.wu_1", "WU#8152", "too many errors", "2003-07-17", "CRITICAL" <br>';
61 61
 
62 62
 if (strlen($f)) {
63
-	$f = "../log*/". $f;
63
+	$f = "../log*/".$f;
64 64
 } else {
65 65
     $f = "../log*/*.log";
66 66
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@
 block discarded – undo
27 27
     exit("Error: couldn't get log_dir from config file.");
28 28
 }
29 29
 
30
-if( isset($_GET["f"]) ){
30
+if( isset($_GET["f"]) ) {
31 31
     $f = $_GET["f"];
32 32
     $f = escapeshellcmd($f);
33 33
 } else {
34 34
     $f = "";
35 35
 }
36
-if( isset($_GET["s"]) ){
36
+if( isset($_GET["s"]) ) {
37 37
     $s = $_GET["s"];
38 38
     $s = escapeshellcmd($s);
39 39
 } else {
40 40
     $s = "";
41 41
 }
42
-if( isset($_GET["l"]) ){
42
+if( isset($_GET["l"]) ) {
43 43
     $l = (int)$_GET["l"];
44 44
 } else {
45 45
     $l = 0;
Please login to merge, or discard this patch.
drupal/sites/all/features/news/news.views_default.inc 2 patches
Upper-Lower-Casing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $view->base_table = 'node';
15 15
   $view->core = 0;
16 16
   $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
17
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
18 18
   $handler = $view->new_display('default', 'Defaults', 'default');
19 19
   $handler->override_option('relationships', array(
20 20
     'content_profile_rel' => array(
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
         'news' => 'news',
71 71
       ),
72 72
       'group' => '0',
73
-      'exposed' => FALSE,
73
+      'exposed' => false,
74 74
       'expose' => array(
75
-        'operator' => FALSE,
75
+        'operator' => false,
76 76
         'label' => '',
77 77
       ),
78 78
       'id' => 'type',
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
       'operator' => '=',
85 85
       'value' => '1',
86 86
       'group' => '0',
87
-      'exposed' => FALSE,
87
+      'exposed' => false,
88 88
       'expose' => array(
89
-        'operator' => FALSE,
89
+        'operator' => false,
90 90
         'label' => '',
91 91
       ),
92 92
       'id' => 'status',
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
       'hide_empty' => 1,
312 312
       'empty_zero' => 0,
313 313
       'hide_alter_empty' => 0,
314
-      'set_precision' => FALSE,
314
+      'set_precision' => false,
315 315
       'precision' => 0,
316 316
       'decimal' => '.',
317 317
       'separator' => '',
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
         'news' => 'news',
468 468
       ),
469 469
       'group' => '0',
470
-      'exposed' => FALSE,
470
+      'exposed' => false,
471 471
       'expose' => array(
472
-        'operator' => FALSE,
472
+        'operator' => false,
473 473
         'label' => '',
474 474
       ),
475 475
       'id' => 'type',
@@ -481,9 +481,9 @@  discard block
 block discarded – undo
481 481
       'operator' => '=',
482 482
       'value' => '1',
483 483
       'group' => '0',
484
-      'exposed' => FALSE,
484
+      'exposed' => false,
485 485
       'expose' => array(
486
-        'operator' => FALSE,
486
+        'operator' => false,
487 487
         'label' => '',
488 488
       ),
489 489
       'id' => 'status',
@@ -500,9 +500,9 @@  discard block
 block discarded – undo
500 500
         'max' => '',
501 501
       ),
502 502
       'group' => '0',
503
-      'exposed' => FALSE,
503
+      'exposed' => false,
504 504
       'expose' => array(
505
-        'operator' => FALSE,
505
+        'operator' => false,
506 506
         'label' => '',
507 507
       ),
508 508
       'id' => 'changed',
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
   ));
517 517
   $handler->override_option('style_plugin', 'rss');
518 518
   $handler->override_option('style_options', array(
519
-    'mission_description' => FALSE,
519
+    'mission_description' => false,
520 520
     'description' => '',
521 521
   ));
522 522
   $handler->override_option('row_plugin', 'node_rss');
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     'page_2' => 'page_2',
545 545
     'default' => 0,
546 546
   ));
547
-  $handler->override_option('sitename_title', FALSE);
547
+  $handler->override_option('sitename_title', false);
548 548
   $handler = $view->new_display('page', 'Short blurbs', 'page_2');
549 549
   $handler->override_option('relationships', array());
550 550
   $handler->override_option('fields', array(
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
       'hide_empty' => 1,
826 826
       'empty_zero' => 0,
827 827
       'hide_alter_empty' => 0,
828
-      'set_precision' => FALSE,
828
+      'set_precision' => false,
829 829
       'precision' => 0,
830 830
       'decimal' => '.',
831 831
       'separator' => '',
@@ -882,9 +882,9 @@  discard block
 block discarded – undo
882 882
         'news' => 'news',
883 883
       ),
884 884
       'group' => '0',
885
-      'exposed' => FALSE,
885
+      'exposed' => false,
886 886
       'expose' => array(
887
-        'operator' => FALSE,
887
+        'operator' => false,
888 888
         'label' => '',
889 889
       ),
890 890
       'id' => 'type',
@@ -896,9 +896,9 @@  discard block
 block discarded – undo
896 896
       'operator' => '=',
897 897
       'value' => '1',
898 898
       'group' => '0',
899
-      'exposed' => FALSE,
899
+      'exposed' => false,
900 900
       'expose' => array(
901
-        'operator' => FALSE,
901
+        'operator' => false,
902 902
         'label' => '',
903 903
       ),
904 904
       'id' => 'status',
@@ -910,9 +910,9 @@  discard block
 block discarded – undo
910 910
       'operator' => '=',
911 911
       'value' => '1',
912 912
       'group' => '0',
913
-      'exposed' => FALSE,
913
+      'exposed' => false,
914 914
       'expose' => array(
915
-        'operator' => FALSE,
915
+        'operator' => false,
916 916
         'label' => '',
917 917
       ),
918 918
       'id' => 'promote',
Please login to merge, or discard this patch.
Indentation   +491 added lines, -491 removed lines patch added patch discarded remove patch
@@ -4,114 +4,114 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function news_views_default_views() {
7
-  $views = array();
7
+    $views = array();
8 8
 
9
-  // Exported view: news
10
-  $view = new view;
11
-  $view->name = 'news';
12
-  $view->description = '';
13
-  $view->tag = '';
14
-  $view->base_table = 'node';
15
-  $view->core = 0;
16
-  $view->api_version = '2';
17
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
-  $handler = $view->new_display('default', 'Defaults', 'default');
19
-  $handler->override_option('relationships', array(
9
+    // Exported view: news
10
+    $view = new view;
11
+    $view->name = 'news';
12
+    $view->description = '';
13
+    $view->tag = '';
14
+    $view->base_table = 'node';
15
+    $view->core = 0;
16
+    $view->api_version = '2';
17
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
18
+    $handler = $view->new_display('default', 'Defaults', 'default');
19
+    $handler->override_option('relationships', array(
20 20
     'content_profile_rel' => array(
21
-      'id' => 'content_profile_rel',
22
-      'table' => 'users',
23
-      'field' => 'content_profile_rel',
21
+        'id' => 'content_profile_rel',
22
+        'table' => 'users',
23
+        'field' => 'content_profile_rel',
24 24
     ),
25
-  ));
26
-  $handler->override_option('fields', array(
25
+    ));
26
+    $handler->override_option('fields', array(
27 27
     'comment_count' => array(
28
-      'id' => 'comment_count',
29
-      'table' => 'node_comment_statistics',
30
-      'field' => 'comment_count',
28
+        'id' => 'comment_count',
29
+        'table' => 'node_comment_statistics',
30
+        'field' => 'comment_count',
31 31
     ),
32 32
     'view_node' => array(
33
-      'id' => 'view_node',
34
-      'table' => 'node',
35
-      'field' => 'view_node',
33
+        'id' => 'view_node',
34
+        'table' => 'node',
35
+        'field' => 'view_node',
36 36
     ),
37 37
     'created' => array(
38
-      'id' => 'created',
39
-      'table' => 'node',
40
-      'field' => 'created',
38
+        'id' => 'created',
39
+        'table' => 'node',
40
+        'field' => 'created',
41 41
     ),
42 42
     'teaser' => array(
43
-      'id' => 'teaser',
44
-      'table' => 'node_revisions',
45
-      'field' => 'teaser',
43
+        'id' => 'teaser',
44
+        'table' => 'node_revisions',
45
+        'field' => 'teaser',
46 46
     ),
47 47
     'title' => array(
48
-      'id' => 'title',
49
-      'table' => 'node',
50
-      'field' => 'title',
48
+        'id' => 'title',
49
+        'table' => 'node',
50
+        'field' => 'title',
51 51
     ),
52
-  ));
53
-  $handler->override_option('sorts', array(
52
+    ));
53
+    $handler->override_option('sorts', array(
54 54
     'created_1' => array(
55
-      'order' => 'DESC',
56
-      'granularity' => 'second',
57
-      'id' => 'created_1',
58
-      'table' => 'node',
59
-      'field' => 'created',
60
-      'override' => array(
55
+        'order' => 'DESC',
56
+        'granularity' => 'second',
57
+        'id' => 'created_1',
58
+        'table' => 'node',
59
+        'field' => 'created',
60
+        'override' => array(
61 61
         'button' => 'Override',
62
-      ),
63
-      'relationship' => 'none',
62
+        ),
63
+        'relationship' => 'none',
64 64
     ),
65
-  ));
66
-  $handler->override_option('filters', array(
65
+    ));
66
+    $handler->override_option('filters', array(
67 67
     'type' => array(
68
-      'operator' => 'in',
69
-      'value' => array(
68
+        'operator' => 'in',
69
+        'value' => array(
70 70
         'news' => 'news',
71
-      ),
72
-      'group' => '0',
73
-      'exposed' => FALSE,
74
-      'expose' => array(
71
+        ),
72
+        'group' => '0',
73
+        'exposed' => FALSE,
74
+        'expose' => array(
75 75
         'operator' => FALSE,
76 76
         'label' => '',
77
-      ),
78
-      'id' => 'type',
79
-      'table' => 'node',
80
-      'field' => 'type',
81
-      'relationship' => 'none',
77
+        ),
78
+        'id' => 'type',
79
+        'table' => 'node',
80
+        'field' => 'type',
81
+        'relationship' => 'none',
82 82
     ),
83 83
     'status' => array(
84
-      'operator' => '=',
85
-      'value' => '1',
86
-      'group' => '0',
87
-      'exposed' => FALSE,
88
-      'expose' => array(
84
+        'operator' => '=',
85
+        'value' => '1',
86
+        'group' => '0',
87
+        'exposed' => FALSE,
88
+        'expose' => array(
89 89
         'operator' => FALSE,
90 90
         'label' => '',
91
-      ),
92
-      'id' => 'status',
93
-      'table' => 'node',
94
-      'field' => 'status',
95
-      'relationship' => 'none',
96
-    ),
97
-  ));
98
-  $handler->override_option('access', array(
91
+        ),
92
+        'id' => 'status',
93
+        'table' => 'node',
94
+        'field' => 'status',
95
+        'relationship' => 'none',
96
+    ),
97
+    ));
98
+    $handler->override_option('access', array(
99 99
     'type' => 'none',
100
-  ));
101
-  $handler->override_option('cache', array(
100
+    ));
101
+    $handler->override_option('cache', array(
102 102
     'type' => 'none',
103
-  ));
104
-  $handler->override_option('empty', 'No news is good news...');
105
-  $handler->override_option('empty_format', '5');
106
-  $handler->override_option('items_per_page', 3);
107
-  $handler->override_option('use_pager', '1');
108
-  $handler->override_option('row_plugin', 'node');
109
-  $handler = $view->new_display('page', 'Page', 'page_1');
110
-  $handler->override_option('relationships', array());
111
-  $handler->override_option('fields', array(
103
+    ));
104
+    $handler->override_option('empty', 'No news is good news...');
105
+    $handler->override_option('empty_format', '5');
106
+    $handler->override_option('items_per_page', 3);
107
+    $handler->override_option('use_pager', '1');
108
+    $handler->override_option('row_plugin', 'node');
109
+    $handler = $view->new_display('page', 'Page', 'page_1');
110
+    $handler->override_option('relationships', array());
111
+    $handler->override_option('fields', array(
112 112
     'title' => array(
113
-      'label' => '',
114
-      'alter' => array(
113
+        'label' => '',
114
+        'alter' => array(
115 115
         'alter_text' => 1,
116 116
         'text' => '<h2>[title]</h2>',
117 117
         'make_link' => 0,
@@ -128,23 +128,23 @@  discard block
 block discarded – undo
128 128
         'ellipsis' => 1,
129 129
         'html' => 0,
130 130
         'strip_tags' => 0,
131
-      ),
132
-      'empty' => '',
133
-      'hide_empty' => 0,
134
-      'empty_zero' => 0,
135
-      'link_to_node' => 0,
136
-      'exclude' => 0,
137
-      'id' => 'title',
138
-      'table' => 'node',
139
-      'field' => 'title',
140
-      'override' => array(
131
+        ),
132
+        'empty' => '',
133
+        'hide_empty' => 0,
134
+        'empty_zero' => 0,
135
+        'link_to_node' => 0,
136
+        'exclude' => 0,
137
+        'id' => 'title',
138
+        'table' => 'node',
139
+        'field' => 'title',
140
+        'override' => array(
141 141
         'button' => 'Use default',
142
-      ),
143
-      'relationship' => 'none',
142
+        ),
143
+        'relationship' => 'none',
144 144
     ),
145 145
     'created' => array(
146
-      'label' => '',
147
-      'alter' => array(
146
+        'label' => '',
147
+        'alter' => array(
148 148
         'alter_text' => 0,
149 149
         'text' => '',
150 150
         'make_link' => 0,
@@ -161,24 +161,24 @@  discard block
 block discarded – undo
161 161
         'ellipsis' => 1,
162 162
         'html' => 0,
163 163
         'strip_tags' => 0,
164
-      ),
165
-      'empty' => '',
166
-      'hide_empty' => 0,
167
-      'empty_zero' => 0,
168
-      'date_format' => 'custom',
169
-      'custom_date_format' => 'F d, Y',
170
-      'exclude' => 0,
171
-      'id' => 'created',
172
-      'table' => 'node',
173
-      'field' => 'created',
174
-      'override' => array(
164
+        ),
165
+        'empty' => '',
166
+        'hide_empty' => 0,
167
+        'empty_zero' => 0,
168
+        'date_format' => 'custom',
169
+        'custom_date_format' => 'F d, Y',
170
+        'exclude' => 0,
171
+        'id' => 'created',
172
+        'table' => 'node',
173
+        'field' => 'created',
174
+        'override' => array(
175 175
         'button' => 'Use default',
176
-      ),
177
-      'relationship' => 'none',
176
+        ),
177
+        'relationship' => 'none',
178 178
     ),
179 179
     'name' => array(
180
-      'label' => '',
181
-      'alter' => array(
180
+        'label' => '',
181
+        'alter' => array(
182 182
         'alter_text' => 1,
183 183
         'text' => ' / Posted by [name]',
184 184
         'make_link' => 0,
@@ -197,26 +197,26 @@  discard block
 block discarded – undo
197 197
         'ellipsis' => 1,
198 198
         'html' => 0,
199 199
         'strip_tags' => 0,
200
-      ),
201
-      'empty' => '',
202
-      'hide_empty' => 0,
203
-      'empty_zero' => 0,
204
-      'hide_alter_empty' => 1,
205
-      'link_to_user' => 0,
206
-      'overwrite_anonymous' => 0,
207
-      'anonymous_text' => '',
208
-      'exclude' => 1,
209
-      'id' => 'name',
210
-      'table' => 'users',
211
-      'field' => 'name',
212
-      'override' => array(
200
+        ),
201
+        'empty' => '',
202
+        'hide_empty' => 0,
203
+        'empty_zero' => 0,
204
+        'hide_alter_empty' => 1,
205
+        'link_to_user' => 0,
206
+        'overwrite_anonymous' => 0,
207
+        'anonymous_text' => '',
208
+        'exclude' => 1,
209
+        'id' => 'name',
210
+        'table' => 'users',
211
+        'field' => 'name',
212
+        'override' => array(
213 213
         'button' => 'Use default',
214
-      ),
215
-      'relationship' => 'none',
214
+        ),
215
+        'relationship' => 'none',
216 216
     ),
217 217
     'teaser' => array(
218
-      'label' => '',
219
-      'alter' => array(
218
+        'label' => '',
219
+        'alter' => array(
220 220
         'alter_text' => 0,
221 221
         'text' => '',
222 222
         'make_link' => 0,
@@ -235,23 +235,23 @@  discard block
 block discarded – undo
235 235
         'ellipsis' => 1,
236 236
         'html' => 0,
237 237
         'strip_tags' => 0,
238
-      ),
239
-      'empty' => '',
240
-      'hide_empty' => 0,
241
-      'empty_zero' => 0,
242
-      'hide_alter_empty' => 1,
243
-      'exclude' => 0,
244
-      'id' => 'teaser',
245
-      'table' => 'node_revisions',
246
-      'field' => 'teaser',
247
-      'override' => array(
238
+        ),
239
+        'empty' => '',
240
+        'hide_empty' => 0,
241
+        'empty_zero' => 0,
242
+        'hide_alter_empty' => 1,
243
+        'exclude' => 0,
244
+        'id' => 'teaser',
245
+        'table' => 'node_revisions',
246
+        'field' => 'teaser',
247
+        'override' => array(
248 248
         'button' => 'Use default',
249
-      ),
250
-      'relationship' => 'none',
249
+        ),
250
+        'relationship' => 'none',
251 251
     ),
252 252
     'view_node' => array(
253
-      'label' => '',
254
-      'alter' => array(
253
+        'label' => '',
254
+        'alter' => array(
255 255
         'alter_text' => 0,
256 256
         'text' => '',
257 257
         'make_link' => 0,
@@ -270,24 +270,24 @@  discard block
 block discarded – undo
270 270
         'ellipsis' => 1,
271 271
         'html' => 0,
272 272
         'strip_tags' => 0,
273
-      ),
274
-      'empty' => '',
275
-      'hide_empty' => 0,
276
-      'empty_zero' => 0,
277
-      'hide_alter_empty' => 1,
278
-      'text' => 'more',
279
-      'exclude' => 0,
280
-      'id' => 'view_node',
281
-      'table' => 'node',
282
-      'field' => 'view_node',
283
-      'override' => array(
273
+        ),
274
+        'empty' => '',
275
+        'hide_empty' => 0,
276
+        'empty_zero' => 0,
277
+        'hide_alter_empty' => 1,
278
+        'text' => 'more',
279
+        'exclude' => 0,
280
+        'id' => 'view_node',
281
+        'table' => 'node',
282
+        'field' => 'view_node',
283
+        'override' => array(
284 284
         'button' => 'Use default',
285
-      ),
286
-      'relationship' => 'none',
285
+        ),
286
+        'relationship' => 'none',
287 287
     ),
288 288
     'comment_count' => array(
289
-      'label' => '',
290
-      'alter' => array(
289
+        'label' => '',
290
+        'alter' => array(
291 291
         'alter_text' => 0,
292 292
         'text' => '',
293 293
         'make_link' => 0,
@@ -306,32 +306,32 @@  discard block
 block discarded – undo
306 306
         'ellipsis' => 1,
307 307
         'html' => 0,
308 308
         'strip_tags' => 0,
309
-      ),
310
-      'empty' => '0',
311
-      'hide_empty' => 1,
312
-      'empty_zero' => 0,
313
-      'hide_alter_empty' => 0,
314
-      'set_precision' => FALSE,
315
-      'precision' => 0,
316
-      'decimal' => '.',
317
-      'separator' => '',
318
-      'format_plural' => 0,
319
-      'format_plural_singular' => '1',
320
-      'format_plural_plural' => '@count',
321
-      'prefix' => '',
322
-      'suffix' => '',
323
-      'exclude' => 0,
324
-      'id' => 'comment_count',
325
-      'table' => 'node_comment_statistics',
326
-      'field' => 'comment_count',
327
-      'override' => array(
309
+        ),
310
+        'empty' => '0',
311
+        'hide_empty' => 1,
312
+        'empty_zero' => 0,
313
+        'hide_alter_empty' => 0,
314
+        'set_precision' => FALSE,
315
+        'precision' => 0,
316
+        'decimal' => '.',
317
+        'separator' => '',
318
+        'format_plural' => 0,
319
+        'format_plural_singular' => '1',
320
+        'format_plural_plural' => '@count',
321
+        'prefix' => '',
322
+        'suffix' => '',
323
+        'exclude' => 0,
324
+        'id' => 'comment_count',
325
+        'table' => 'node_comment_statistics',
326
+        'field' => 'comment_count',
327
+        'override' => array(
328 328
         'button' => 'Use default',
329
-      ),
330
-      'relationship' => 'none',
329
+        ),
330
+        'relationship' => 'none',
331 331
     ),
332 332
     'nothing' => array(
333
-      'label' => '',
334
-      'alter' => array(
333
+        'label' => '',
334
+        'alter' => array(
335 335
         'text' => '<div class="clearfix"></div>',
336 336
         'make_link' => 0,
337 337
         'path' => '',
@@ -347,210 +347,210 @@  discard block
 block discarded – undo
347 347
         'ellipsis' => 1,
348 348
         'html' => 0,
349 349
         'strip_tags' => 0,
350
-      ),
351
-      'empty' => '',
352
-      'hide_empty' => 0,
353
-      'empty_zero' => 0,
354
-      'exclude' => 0,
355
-      'id' => 'nothing',
356
-      'table' => 'views',
357
-      'field' => 'nothing',
358
-      'override' => array(
350
+        ),
351
+        'empty' => '',
352
+        'hide_empty' => 0,
353
+        'empty_zero' => 0,
354
+        'exclude' => 0,
355
+        'id' => 'nothing',
356
+        'table' => 'views',
357
+        'field' => 'nothing',
358
+        'override' => array(
359 359
         'button' => 'Use default',
360
-      ),
361
-      'relationship' => 'none',
362
-    ),
363
-  ));
364
-  $handler->override_option('title', 'News');
365
-  $handler->override_option('row_plugin', 'fields');
366
-  $handler->override_option('path', 'news');
367
-  $handler->override_option('menu', array(
360
+        ),
361
+        'relationship' => 'none',
362
+    ),
363
+    ));
364
+    $handler->override_option('title', 'News');
365
+    $handler->override_option('row_plugin', 'fields');
366
+    $handler->override_option('path', 'news');
367
+    $handler->override_option('menu', array(
368 368
     'type' => 'normal',
369 369
     'title' => 'News',
370 370
     'description' => '',
371 371
     'weight' => '0',
372 372
     'name' => 'navigation',
373
-  ));
374
-  $handler->override_option('tab_options', array(
373
+    ));
374
+    $handler->override_option('tab_options', array(
375 375
     'type' => 'none',
376 376
     'title' => '',
377 377
     'description' => '',
378 378
     'weight' => 0,
379 379
     'name' => 'navigation',
380
-  ));
381
-  $handler = $view->new_display('feed', 'Feed', 'feed_1');
382
-  $handler->override_option('arguments', array(
380
+    ));
381
+    $handler = $view->new_display('feed', 'Feed', 'feed_1');
382
+    $handler->override_option('arguments', array(
383 383
     'null' => array(
384
-      'default_action' => 'default',
385
-      'style_plugin' => 'default_summary',
386
-      'style_options' => array(),
387
-      'wildcard' => 'all',
388
-      'wildcard_substitution' => 'All',
389
-      'title' => '%1 | News',
390
-      'breadcrumb' => '',
391
-      'default_argument_type' => 'php',
392
-      'default_argument' => '',
393
-      'validate_type' => 'none',
394
-      'validate_fail' => 'not found',
395
-      'must_not_be' => 0,
396
-      'id' => 'null',
397
-      'table' => 'views',
398
-      'field' => 'null',
399
-      'validate_user_argument_type' => 'uid',
400
-      'validate_user_roles' => array(
384
+        'default_action' => 'default',
385
+        'style_plugin' => 'default_summary',
386
+        'style_options' => array(),
387
+        'wildcard' => 'all',
388
+        'wildcard_substitution' => 'All',
389
+        'title' => '%1 | News',
390
+        'breadcrumb' => '',
391
+        'default_argument_type' => 'php',
392
+        'default_argument' => '',
393
+        'validate_type' => 'none',
394
+        'validate_fail' => 'not found',
395
+        'must_not_be' => 0,
396
+        'id' => 'null',
397
+        'table' => 'views',
398
+        'field' => 'null',
399
+        'validate_user_argument_type' => 'uid',
400
+        'validate_user_roles' => array(
401 401
         2 => 0,
402 402
         4 => 0,
403 403
         7 => 0,
404 404
         5 => 0,
405 405
         3 => 0,
406 406
         6 => 0,
407
-      ),
408
-      'me_redirect' => 0,
409
-      'me_validate_user_argument_type' => 'uid',
410
-      'me_validate_user_roles' => array(
407
+        ),
408
+        'me_redirect' => 0,
409
+        'me_validate_user_argument_type' => 'uid',
410
+        'me_validate_user_roles' => array(
411 411
         2 => 0,
412 412
         4 => 0,
413 413
         7 => 0,
414 414
         5 => 0,
415 415
         3 => 0,
416 416
         6 => 0,
417
-      ),
418
-      'override' => array(
417
+        ),
418
+        'override' => array(
419 419
         'button' => 'Use default',
420
-      ),
421
-      'relationship' => 'none',
422
-      'default_options_div_prefix' => '',
423
-      'default_taxonomy_tid_term_page' => 0,
424
-      'default_taxonomy_tid_node' => 0,
425
-      'default_taxonomy_tid_limit' => 0,
426
-      'default_taxonomy_tid_vids' => array(
420
+        ),
421
+        'relationship' => 'none',
422
+        'default_options_div_prefix' => '',
423
+        'default_taxonomy_tid_term_page' => 0,
424
+        'default_taxonomy_tid_node' => 0,
425
+        'default_taxonomy_tid_limit' => 0,
426
+        'default_taxonomy_tid_vids' => array(
427 427
         1 => 0,
428 428
         2 => 0,
429
-      ),
430
-      'default_argument_user' => 0,
431
-      'default_argument_fixed' => '',
432
-      'default_argument_php' => '// Use this to set a custom feed title that works both in the feed and
429
+        ),
430
+        'default_argument_user' => 0,
431
+        'default_argument_fixed' => '',
432
+        'default_argument_php' => '// Use this to set a custom feed title that works both in the feed and
433 433
 // in the auto discovery link in the page header
434 434
 return variable_get(\'site_name\', \'Drupal-BOINC\');
435 435
 ',
436
-      'validate_argument_node_type' => array(
436
+        'validate_argument_node_type' => array(
437 437
         'page' => 0,
438 438
         'news' => 0,
439 439
         'profile' => 0,
440 440
         'forum' => 0,
441 441
         'panel' => 0,
442 442
         'story' => 0,
443
-      ),
444
-      'validate_argument_node_access' => 0,
445
-      'validate_argument_nid_type' => 'nid',
446
-      'validate_argument_vocabulary' => array(
443
+        ),
444
+        'validate_argument_node_access' => 0,
445
+        'validate_argument_nid_type' => 'nid',
446
+        'validate_argument_vocabulary' => array(
447 447
         1 => 0,
448 448
         2 => 0,
449
-      ),
450
-      'validate_argument_type' => 'tid',
451
-      'validate_argument_transform' => 0,
452
-      'validate_user_restrict_roles' => 0,
453
-      'validate_argument_node_flag_name' => '*relationship*',
454
-      'validate_argument_node_flag_test' => 'flaggable',
455
-      'validate_argument_node_flag_id_type' => 'id',
456
-      'validate_argument_user_flag_name' => '*relationship*',
457
-      'validate_argument_user_flag_test' => 'flaggable',
458
-      'validate_argument_user_flag_id_type' => 'id',
459
-      'validate_argument_php' => '',
460
-      'me_validate_user_restrict_roles' => 0,
461
-    ),
462
-  ));
463
-  $handler->override_option('filters', array(
449
+        ),
450
+        'validate_argument_type' => 'tid',
451
+        'validate_argument_transform' => 0,
452
+        'validate_user_restrict_roles' => 0,
453
+        'validate_argument_node_flag_name' => '*relationship*',
454
+        'validate_argument_node_flag_test' => 'flaggable',
455
+        'validate_argument_node_flag_id_type' => 'id',
456
+        'validate_argument_user_flag_name' => '*relationship*',
457
+        'validate_argument_user_flag_test' => 'flaggable',
458
+        'validate_argument_user_flag_id_type' => 'id',
459
+        'validate_argument_php' => '',
460
+        'me_validate_user_restrict_roles' => 0,
461
+    ),
462
+    ));
463
+    $handler->override_option('filters', array(
464 464
     'type' => array(
465
-      'operator' => 'in',
466
-      'value' => array(
465
+        'operator' => 'in',
466
+        'value' => array(
467 467
         'news' => 'news',
468
-      ),
469
-      'group' => '0',
470
-      'exposed' => FALSE,
471
-      'expose' => array(
468
+        ),
469
+        'group' => '0',
470
+        'exposed' => FALSE,
471
+        'expose' => array(
472 472
         'operator' => FALSE,
473 473
         'label' => '',
474
-      ),
475
-      'id' => 'type',
476
-      'table' => 'node',
477
-      'field' => 'type',
478
-      'relationship' => 'none',
474
+        ),
475
+        'id' => 'type',
476
+        'table' => 'node',
477
+        'field' => 'type',
478
+        'relationship' => 'none',
479 479
     ),
480 480
     'status' => array(
481
-      'operator' => '=',
482
-      'value' => '1',
483
-      'group' => '0',
484
-      'exposed' => FALSE,
485
-      'expose' => array(
481
+        'operator' => '=',
482
+        'value' => '1',
483
+        'group' => '0',
484
+        'exposed' => FALSE,
485
+        'expose' => array(
486 486
         'operator' => FALSE,
487 487
         'label' => '',
488
-      ),
489
-      'id' => 'status',
490
-      'table' => 'node',
491
-      'field' => 'status',
492
-      'relationship' => 'none',
488
+        ),
489
+        'id' => 'status',
490
+        'table' => 'node',
491
+        'field' => 'status',
492
+        'relationship' => 'none',
493 493
     ),
494 494
     'changed' => array(
495
-      'operator' => '>=',
496
-      'value' => array(
495
+        'operator' => '>=',
496
+        'value' => array(
497 497
         'type' => 'offset',
498 498
         'value' => '-90 days',
499 499
         'min' => '',
500 500
         'max' => '',
501
-      ),
502
-      'group' => '0',
503
-      'exposed' => FALSE,
504
-      'expose' => array(
501
+        ),
502
+        'group' => '0',
503
+        'exposed' => FALSE,
504
+        'expose' => array(
505 505
         'operator' => FALSE,
506 506
         'label' => '',
507
-      ),
508
-      'id' => 'changed',
509
-      'table' => 'node',
510
-      'field' => 'changed',
511
-      'override' => array(
507
+        ),
508
+        'id' => 'changed',
509
+        'table' => 'node',
510
+        'field' => 'changed',
511
+        'override' => array(
512 512
         'button' => 'Use default',
513
-      ),
514
-      'relationship' => 'none',
513
+        ),
514
+        'relationship' => 'none',
515 515
     ),
516
-  ));
517
-  $handler->override_option('style_plugin', 'rss');
518
-  $handler->override_option('style_options', array(
516
+    ));
517
+    $handler->override_option('style_plugin', 'rss');
518
+    $handler->override_option('style_options', array(
519 519
     'mission_description' => FALSE,
520 520
     'description' => '',
521
-  ));
522
-  $handler->override_option('row_plugin', 'node_rss');
523
-  $handler->override_option('row_options', array(
521
+    ));
522
+    $handler->override_option('row_plugin', 'node_rss');
523
+    $handler->override_option('row_options', array(
524 524
     'relationship' => 'none',
525 525
     'item_length' => 'default',
526
-  ));
527
-  $handler->override_option('path', 'rss_main.php');
528
-  $handler->override_option('menu', array(
526
+    ));
527
+    $handler->override_option('path', 'rss_main.php');
528
+    $handler->override_option('menu', array(
529 529
     'type' => 'none',
530 530
     'title' => '',
531 531
     'description' => '',
532 532
     'weight' => 0,
533 533
     'name' => 'primary-links',
534
-  ));
535
-  $handler->override_option('tab_options', array(
534
+    ));
535
+    $handler->override_option('tab_options', array(
536 536
     'type' => 'none',
537 537
     'title' => '',
538 538
     'description' => '',
539 539
     'weight' => 0,
540 540
     'name' => 'navigation',
541
-  ));
542
-  $handler->override_option('displays', array(
541
+    ));
542
+    $handler->override_option('displays', array(
543 543
     'page_1' => 'page_1',
544 544
     'page_2' => 'page_2',
545 545
     'default' => 0,
546
-  ));
547
-  $handler->override_option('sitename_title', FALSE);
548
-  $handler = $view->new_display('page', 'Short blurbs', 'page_2');
549
-  $handler->override_option('relationships', array());
550
-  $handler->override_option('fields', array(
546
+    ));
547
+    $handler->override_option('sitename_title', FALSE);
548
+    $handler = $view->new_display('page', 'Short blurbs', 'page_2');
549
+    $handler->override_option('relationships', array());
550
+    $handler->override_option('fields', array(
551 551
     'nid' => array(
552
-      'label' => 'Nid',
553
-      'alter' => array(
552
+        'label' => 'Nid',
553
+        'alter' => array(
554 554
         'alter_text' => 0,
555 555
         'text' => '',
556 556
         'make_link' => 0,
@@ -569,24 +569,24 @@  discard block
 block discarded – undo
569 569
         'ellipsis' => 1,
570 570
         'html' => 0,
571 571
         'strip_tags' => 0,
572
-      ),
573
-      'empty' => '',
574
-      'hide_empty' => 0,
575
-      'empty_zero' => 0,
576
-      'hide_alter_empty' => 1,
577
-      'link_to_node' => 0,
578
-      'exclude' => 1,
579
-      'id' => 'nid',
580
-      'table' => 'node',
581
-      'field' => 'nid',
582
-      'override' => array(
572
+        ),
573
+        'empty' => '',
574
+        'hide_empty' => 0,
575
+        'empty_zero' => 0,
576
+        'hide_alter_empty' => 1,
577
+        'link_to_node' => 0,
578
+        'exclude' => 1,
579
+        'id' => 'nid',
580
+        'table' => 'node',
581
+        'field' => 'nid',
582
+        'override' => array(
583 583
         'button' => 'Use default',
584
-      ),
585
-      'relationship' => 'none',
584
+        ),
585
+        'relationship' => 'none',
586 586
     ),
587 587
     'comment' => array(
588
-      'label' => 'Comment status',
589
-      'alter' => array(
588
+        'label' => 'Comment status',
589
+        'alter' => array(
590 590
         'alter_text' => 0,
591 591
         'text' => '',
592 592
         'make_link' => 0,
@@ -605,23 +605,23 @@  discard block
 block discarded – undo
605 605
         'ellipsis' => 1,
606 606
         'html' => 0,
607 607
         'strip_tags' => 0,
608
-      ),
609
-      'empty' => '',
610
-      'hide_empty' => 0,
611
-      'empty_zero' => 0,
612
-      'hide_alter_empty' => 1,
613
-      'exclude' => 1,
614
-      'id' => 'comment',
615
-      'table' => 'node',
616
-      'field' => 'comment',
617
-      'override' => array(
608
+        ),
609
+        'empty' => '',
610
+        'hide_empty' => 0,
611
+        'empty_zero' => 0,
612
+        'hide_alter_empty' => 1,
613
+        'exclude' => 1,
614
+        'id' => 'comment',
615
+        'table' => 'node',
616
+        'field' => 'comment',
617
+        'override' => array(
618 618
         'button' => 'Use default',
619
-      ),
620
-      'relationship' => 'none',
619
+        ),
620
+        'relationship' => 'none',
621 621
     ),
622 622
     'title' => array(
623
-      'label' => '',
624
-      'alter' => array(
623
+        'label' => '',
624
+        'alter' => array(
625 625
         'alter_text' => 1,
626 626
         'text' => '<h2>[title]</h2>',
627 627
         'make_link' => 0,
@@ -638,23 +638,23 @@  discard block
 block discarded – undo
638 638
         'ellipsis' => 1,
639 639
         'html' => 0,
640 640
         'strip_tags' => 0,
641
-      ),
642
-      'empty' => '',
643
-      'hide_empty' => 0,
644
-      'empty_zero' => 0,
645
-      'link_to_node' => 0,
646
-      'exclude' => 0,
647
-      'id' => 'title',
648
-      'table' => 'node',
649
-      'field' => 'title',
650
-      'override' => array(
641
+        ),
642
+        'empty' => '',
643
+        'hide_empty' => 0,
644
+        'empty_zero' => 0,
645
+        'link_to_node' => 0,
646
+        'exclude' => 0,
647
+        'id' => 'title',
648
+        'table' => 'node',
649
+        'field' => 'title',
650
+        'override' => array(
651 651
         'button' => 'Use default',
652
-      ),
653
-      'relationship' => 'none',
652
+        ),
653
+        'relationship' => 'none',
654 654
     ),
655 655
     'created' => array(
656
-      'label' => '',
657
-      'alter' => array(
656
+        'label' => '',
657
+        'alter' => array(
658 658
         'alter_text' => 0,
659 659
         'text' => '',
660 660
         'make_link' => 0,
@@ -671,24 +671,24 @@  discard block
 block discarded – undo
671 671
         'ellipsis' => 1,
672 672
         'html' => 0,
673 673
         'strip_tags' => 0,
674
-      ),
675
-      'empty' => '',
676
-      'hide_empty' => 0,
677
-      'empty_zero' => 0,
678
-      'date_format' => 'custom',
679
-      'custom_date_format' => 'F d, Y',
680
-      'exclude' => 0,
681
-      'id' => 'created',
682
-      'table' => 'node',
683
-      'field' => 'created',
684
-      'override' => array(
674
+        ),
675
+        'empty' => '',
676
+        'hide_empty' => 0,
677
+        'empty_zero' => 0,
678
+        'date_format' => 'custom',
679
+        'custom_date_format' => 'F d, Y',
680
+        'exclude' => 0,
681
+        'id' => 'created',
682
+        'table' => 'node',
683
+        'field' => 'created',
684
+        'override' => array(
685 685
         'button' => 'Use default',
686
-      ),
687
-      'relationship' => 'none',
686
+        ),
687
+        'relationship' => 'none',
688 688
     ),
689 689
     'teaser' => array(
690
-      'label' => '',
691
-      'alter' => array(
690
+        'label' => '',
691
+        'alter' => array(
692 692
         'alter_text' => 0,
693 693
         'text' => '',
694 694
         'make_link' => 0,
@@ -707,23 +707,23 @@  discard block
 block discarded – undo
707 707
         'ellipsis' => 1,
708 708
         'html' => 0,
709 709
         'strip_tags' => 0,
710
-      ),
711
-      'empty' => '',
712
-      'hide_empty' => 0,
713
-      'empty_zero' => 0,
714
-      'hide_alter_empty' => 1,
715
-      'exclude' => 0,
716
-      'id' => 'teaser',
717
-      'table' => 'node_revisions',
718
-      'field' => 'teaser',
719
-      'override' => array(
710
+        ),
711
+        'empty' => '',
712
+        'hide_empty' => 0,
713
+        'empty_zero' => 0,
714
+        'hide_alter_empty' => 1,
715
+        'exclude' => 0,
716
+        'id' => 'teaser',
717
+        'table' => 'node_revisions',
718
+        'field' => 'teaser',
719
+        'override' => array(
720 720
         'button' => 'Use default',
721
-      ),
722
-      'relationship' => 'none',
721
+        ),
722
+        'relationship' => 'none',
723 723
     ),
724 724
     'view_node_1' => array(
725
-      'label' => '',
726
-      'alter' => array(
725
+        'label' => '',
726
+        'alter' => array(
727 727
         'alter_text' => 0,
728 728
         'text' => '',
729 729
         'make_link' => 0,
@@ -742,24 +742,24 @@  discard block
 block discarded – undo
742 742
         'ellipsis' => 1,
743 743
         'html' => 0,
744 744
         'strip_tags' => 0,
745
-      ),
746
-      'empty' => '',
747
-      'hide_empty' => 0,
748
-      'empty_zero' => 0,
749
-      'hide_alter_empty' => 1,
750
-      'text' => 'more',
751
-      'exclude' => 0,
752
-      'id' => 'view_node_1',
753
-      'table' => 'node',
754
-      'field' => 'view_node',
755
-      'override' => array(
745
+        ),
746
+        'empty' => '',
747
+        'hide_empty' => 0,
748
+        'empty_zero' => 0,
749
+        'hide_alter_empty' => 1,
750
+        'text' => 'more',
751
+        'exclude' => 0,
752
+        'id' => 'view_node_1',
753
+        'table' => 'node',
754
+        'field' => 'view_node',
755
+        'override' => array(
756 756
         'button' => 'Use default',
757
-      ),
758
-      'relationship' => 'none',
757
+        ),
758
+        'relationship' => 'none',
759 759
     ),
760 760
     'phpcode' => array(
761
-      'label' => '',
762
-      'alter' => array(
761
+        'label' => '',
762
+        'alter' => array(
763 763
         'alter_text' => 0,
764 764
         'text' => '',
765 765
         'make_link' => 0,
@@ -778,30 +778,30 @@  discard block
 block discarded – undo
778 778
         'ellipsis' => 1,
779 779
         'html' => 0,
780 780
         'strip_tags' => 0,
781
-      ),
782
-      'empty' => '',
783
-      'hide_empty' => 0,
784
-      'empty_zero' => 0,
785
-      'hide_alter_empty' => 1,
786
-      'value' => '<?php
781
+        ),
782
+        'empty' => '',
783
+        'hide_empty' => 0,
784
+        'empty_zero' => 0,
785
+        'hide_alter_empty' => 1,
786
+        'value' => '<?php
787 787
   if ($data->node_comment == COMMENT_NODE_READ_WRITE) {
788 788
     $cid = boincuser_get_first_unread_comment_id($data->nid);
789 789
     $link = ($cid) ? "goto/comment/{$cid}" : "node/{$data->nid}";
790 790
     return l(bts(\'discuss\', array(), NULL, \'boinc:front-page-discuss-news\'), $link);
791 791
   }
792 792
 ?>',
793
-      'exclude' => 0,
794
-      'id' => 'phpcode',
795
-      'table' => 'customfield',
796
-      'field' => 'phpcode',
797
-      'override' => array(
793
+        'exclude' => 0,
794
+        'id' => 'phpcode',
795
+        'table' => 'customfield',
796
+        'field' => 'phpcode',
797
+        'override' => array(
798 798
         'button' => 'Use default',
799
-      ),
800
-      'relationship' => 'none',
799
+        ),
800
+        'relationship' => 'none',
801 801
     ),
802 802
     'comment_count' => array(
803
-      'label' => '',
804
-      'alter' => array(
803
+        'label' => '',
804
+        'alter' => array(
805 805
         'alter_text' => 0,
806 806
         'text' => '',
807 807
         'make_link' => 0,
@@ -820,32 +820,32 @@  discard block
 block discarded – undo
820 820
         'ellipsis' => 1,
821 821
         'html' => 0,
822 822
         'strip_tags' => 0,
823
-      ),
824
-      'empty' => '0',
825
-      'hide_empty' => 1,
826
-      'empty_zero' => 0,
827
-      'hide_alter_empty' => 0,
828
-      'set_precision' => FALSE,
829
-      'precision' => 0,
830
-      'decimal' => '.',
831
-      'separator' => '',
832
-      'format_plural' => 0,
833
-      'format_plural_singular' => '1',
834
-      'format_plural_plural' => '@count',
835
-      'prefix' => '',
836
-      'suffix' => '',
837
-      'exclude' => 0,
838
-      'id' => 'comment_count',
839
-      'table' => 'node_comment_statistics',
840
-      'field' => 'comment_count',
841
-      'override' => array(
823
+        ),
824
+        'empty' => '0',
825
+        'hide_empty' => 1,
826
+        'empty_zero' => 0,
827
+        'hide_alter_empty' => 0,
828
+        'set_precision' => FALSE,
829
+        'precision' => 0,
830
+        'decimal' => '.',
831
+        'separator' => '',
832
+        'format_plural' => 0,
833
+        'format_plural_singular' => '1',
834
+        'format_plural_plural' => '@count',
835
+        'prefix' => '',
836
+        'suffix' => '',
837
+        'exclude' => 0,
838
+        'id' => 'comment_count',
839
+        'table' => 'node_comment_statistics',
840
+        'field' => 'comment_count',
841
+        'override' => array(
842 842
         'button' => 'Use default',
843
-      ),
844
-      'relationship' => 'none',
843
+        ),
844
+        'relationship' => 'none',
845 845
     ),
846 846
     'nothing' => array(
847
-      'label' => '',
848
-      'alter' => array(
847
+        'label' => '',
848
+        'alter' => array(
849 849
         'text' => '<div class="clearfix"></div>',
850 850
         'make_link' => 0,
851 851
         'path' => '',
@@ -861,88 +861,88 @@  discard block
 block discarded – undo
861 861
         'ellipsis' => 1,
862 862
         'html' => 0,
863 863
         'strip_tags' => 0,
864
-      ),
865
-      'empty' => '',
866
-      'hide_empty' => 0,
867
-      'empty_zero' => 0,
868
-      'exclude' => 0,
869
-      'id' => 'nothing',
870
-      'table' => 'views',
871
-      'field' => 'nothing',
872
-      'override' => array(
864
+        ),
865
+        'empty' => '',
866
+        'hide_empty' => 0,
867
+        'empty_zero' => 0,
868
+        'exclude' => 0,
869
+        'id' => 'nothing',
870
+        'table' => 'views',
871
+        'field' => 'nothing',
872
+        'override' => array(
873 873
         'button' => 'Use default',
874
-      ),
875
-      'relationship' => 'none',
874
+        ),
875
+        'relationship' => 'none',
876 876
     ),
877
-  ));
878
-  $handler->override_option('filters', array(
877
+    ));
878
+    $handler->override_option('filters', array(
879 879
     'type' => array(
880
-      'operator' => 'in',
881
-      'value' => array(
880
+        'operator' => 'in',
881
+        'value' => array(
882 882
         'news' => 'news',
883
-      ),
884
-      'group' => '0',
885
-      'exposed' => FALSE,
886
-      'expose' => array(
883
+        ),
884
+        'group' => '0',
885
+        'exposed' => FALSE,
886
+        'expose' => array(
887 887
         'operator' => FALSE,
888 888
         'label' => '',
889
-      ),
890
-      'id' => 'type',
891
-      'table' => 'node',
892
-      'field' => 'type',
893
-      'relationship' => 'none',
889
+        ),
890
+        'id' => 'type',
891
+        'table' => 'node',
892
+        'field' => 'type',
893
+        'relationship' => 'none',
894 894
     ),
895 895
     'status' => array(
896
-      'operator' => '=',
897
-      'value' => '1',
898
-      'group' => '0',
899
-      'exposed' => FALSE,
900
-      'expose' => array(
896
+        'operator' => '=',
897
+        'value' => '1',
898
+        'group' => '0',
899
+        'exposed' => FALSE,
900
+        'expose' => array(
901 901
         'operator' => FALSE,
902 902
         'label' => '',
903
-      ),
904
-      'id' => 'status',
905
-      'table' => 'node',
906
-      'field' => 'status',
907
-      'relationship' => 'none',
903
+        ),
904
+        'id' => 'status',
905
+        'table' => 'node',
906
+        'field' => 'status',
907
+        'relationship' => 'none',
908 908
     ),
909 909
     'promote' => array(
910
-      'operator' => '=',
911
-      'value' => '1',
912
-      'group' => '0',
913
-      'exposed' => FALSE,
914
-      'expose' => array(
910
+        'operator' => '=',
911
+        'value' => '1',
912
+        'group' => '0',
913
+        'exposed' => FALSE,
914
+        'expose' => array(
915 915
         'operator' => FALSE,
916 916
         'label' => '',
917
-      ),
918
-      'id' => 'promote',
919
-      'table' => 'node',
920
-      'field' => 'promote',
921
-      'override' => array(
917
+        ),
918
+        'id' => 'promote',
919
+        'table' => 'node',
920
+        'field' => 'promote',
921
+        'override' => array(
922 922
         'button' => 'Use default',
923
-      ),
924
-      'relationship' => 'none',
925
-    ),
926
-  ));
927
-  $handler->override_option('title', 'News');
928
-  $handler->override_option('row_plugin', 'fields');
929
-  $handler->override_option('path', 'news');
930
-  $handler->override_option('menu', array(
923
+        ),
924
+        'relationship' => 'none',
925
+    ),
926
+    ));
927
+    $handler->override_option('title', 'News');
928
+    $handler->override_option('row_plugin', 'fields');
929
+    $handler->override_option('path', 'news');
930
+    $handler->override_option('menu', array(
931 931
     'type' => 'default tab',
932 932
     'title' => 'News',
933 933
     'description' => '',
934 934
     'weight' => '0',
935 935
     'name' => 'navigation',
936
-  ));
937
-  $handler->override_option('tab_options', array(
936
+    ));
937
+    $handler->override_option('tab_options', array(
938 938
     'type' => 'none',
939 939
     'title' => '',
940 940
     'description' => '',
941 941
     'weight' => 0,
942 942
     'name' => 'navigation',
943
-  ));
943
+    ));
944 944
 
945
-  $views[$view->name] = $view;
945
+    $views[$view->name] = $view;
946 946
 
947
-  return $views;
947
+    return $views;
948 948
 }
Please login to merge, or discard this patch.
html/user/openid_login.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,23 +35,23 @@  discard block
 block discarded – undo
35 35
     $openid = new LightOpenID;
36 36
     echo "<pre>";
37 37
     print_r($openid); exit;
38
-    if(!$openid->mode) {
39
-        if(isset($_POST['openid_identifier'])) {
38
+    if (!$openid->mode) {
39
+        if (isset($_POST['openid_identifier'])) {
40 40
             $openid->identity = $_POST['openid_identifier'];
41 41
             $openid->required = array('namePerson/friendly', 'contact/email');
42 42
             $openid->optional = array('contact/country/home');
43
-            header('Location: ' . $openid->authUrl());
43
+            header('Location: '.$openid->authUrl());
44 44
         }
45
-        if(isset($_GET['openid_identifier'])) {
45
+        if (isset($_GET['openid_identifier'])) {
46 46
             $openid->identity = $_GET['openid_identifier'];
47 47
             $openid->required = array('namePerson/friendly', 'contact/email');
48 48
             $openid->optional = array('contact/country/home');
49
-            header('Location: ' . $openid->authUrl());
49
+            header('Location: '.$openid->authUrl());
50 50
         }
51
-    } elseif($openid->mode == 'cancel') {
51
+    } elseif ($openid->mode == 'cancel') {
52 52
         echo 'User has canceled authentication!';
53 53
     } else {
54
-        echo 'User ' . ($openid->validate() ? $openid->identity . ' has ' : 'has not ') . 'logged in.';
54
+        echo 'User '.($openid->validate() ? $openid->identity.' has ' : 'has not ').'logged in.';
55 55
         //print_r($openid->getAttributes());
56 56
         // Create the user in the DB
57 57
         $data = $openid->getAttributes();
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
             
126 126
             $user = make_user(
127 127
                 $new_email_addr, $new_name, $passwd_hash,
128
-                $country, '', $project_prefs="", $teamid=0
128
+                $country, '', $project_prefs = "", $teamid = 0
129 129
             );
130 130
             if (!$user) {
131 131
                 show_error("Couldn't create account");
132 132
             }
133 133
             
134
-            if(defined('INVITE_CODES')) {
134
+            if (defined('INVITE_CODES')) {
135 135
                 error_log("Account '$new_email_addr' created using invitation code '$invite_code'");
136 136
             }
137 137
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         send_cookie('auth', $user->authenticator, true);
154 154
 
155 155
     }
156
-} catch(ErrorException $e) {
156
+} catch (ErrorException $e) {
157 157
     echo $e->getMessage();
158 158
 }
159 159
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincstats/boincstats.admin.inc 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -8,38 +8,38 @@  discard block
 block discarded – undo
8 8
 
9 9
 
10 10
 /**
11
-  * The BOINC stats configuration determines where statistics are sourced
12
-  */
11
+ * The BOINC stats configuration determines where statistics are sourced
12
+ */
13 13
 function boincstats_admin_stats_system(&$form_state) {
14
-  $form = array();
15
-  $default = array(
14
+    $form = array();
15
+    $default = array(
16 16
     'boinc_stats_server' => variable_get('boinc_stats_server', 'stats.gridrepublic.org'),
17 17
     'boinc_stats_project_list_rpc' => variable_get('boinc_stats_project_list_rpc', 'rpc/get_projects.php'),
18 18
     'boinc_stats_project_credit_history_rpc' => variable_get('boinc_stats_project_credit_history_rpc', 'rpc2/get_project_tc_history.php'),
19 19
     'boinc_stats_user_credit_history_rpc' => variable_get('boinc_stats_user_credit_history_rpc', 'rpc2/get_user_credit_history.php'),
20 20
     'boinc_stats_remote_project_id' => variable_get('boinc_stats_remote_project_id', ''),
21
-  );
22
-  // Define the form
23
-  $form['boinc_stats_server'] = array(
21
+    );
22
+    // Define the form
23
+    $form['boinc_stats_server'] = array(
24 24
     '#type' => 'value',
25 25
     '#value' => $default['boinc_stats_server']
26
-  );
27
-  $form['boinc_stats_project_list_rpc'] = array(
26
+    );
27
+    $form['boinc_stats_project_list_rpc'] = array(
28 28
     '#type' => 'value',
29 29
     '#value' => $default['boinc_stats_project_list_rpc']
30
-  );
31
-  $form['boinc_stats_project_credit_history_rpc'] = array(
30
+    );
31
+    $form['boinc_stats_project_credit_history_rpc'] = array(
32 32
     '#type' => 'value',
33 33
     '#value' => $default['boinc_stats_project_credit_history_rpc']
34
-  );
35
-  $form['boinc_stats_user_credit_history_rpc'] = array(
34
+    );
35
+    $form['boinc_stats_user_credit_history_rpc'] = array(
36 36
     '#type' => 'value',
37 37
     '#value' => $default['boinc_stats_user_credit_history_rpc']
38
-  );
39
-  $form['boinc_stats_remote_project_id'] = array(
38
+    );
39
+    $form['boinc_stats_remote_project_id'] = array(
40 40
     '#type' => 'textfield',
41 41
     '#title' => t('Stats ID for @project', array(
42
-      '@project' => variable_get('site_name', 'Drupal-BOINC'))),
42
+        '@project' => variable_get('site_name', 'Drupal-BOINC'))),
43 43
     '#default_value' => $default['boinc_stats_remote_project_id'], 
44 44
     '#description' => t('This project must be registered with a stats system in
45 45
       order for some statistics to be available. Currently only one system is
@@ -47,26 +47,26 @@  discard block
 block discarded – undo
47 47
         '!find_project_id' => l(t('Find your project ID'),
48 48
         "http://{$default['boinc_stats_server']}/{$default['boinc_stats_project_list_rpc']}",
49 49
         array('attributes' => array('target' => 'external')))
50
-      )
50
+        )
51 51
     )
52
-  );
53
-  return system_settings_form($form);
52
+    );
53
+    return system_settings_form($form);
54 54
 }
55 55
 
56 56
 /**
57
-  * Validate the BOINC stats form.
58
-  */
57
+ * Validate the BOINC stats form.
58
+ */
59 59
 function boincstats_admin_stats_system_validate($form, &$form_state) {
60
-  $values = $form_state['values'];
61
-  if (!$values['boinc_stats_remote_project_id']) {
60
+    $values = $form_state['values'];
61
+    if (!$values['boinc_stats_remote_project_id']) {
62 62
     form_set_error('boinc_stats_remote_project_id',
63
-      t('Stats may not work without a valid stats ID configured!'));
64
-  }
63
+        t('Stats may not work without a valid stats ID configured!'));
64
+    }
65 65
 }
66 66
 
67 67
 /**
68
-  * Handle post-validation submission of BOINC stats form.
69
-  */
68
+ * Handle post-validation submission of BOINC stats form.
69
+ */
70 70
 function boincstats_admin_stats_system_submit($form, &$form_state) {
71
-  drupal_set_message(t('Stats system configuration has been updated.'));
71
+    drupal_set_message(t('Stats system configuration has been updated.'));
72 72
 }
Please login to merge, or discard this patch.