Passed
Push — master ( 8fb909...8ae81c )
by Kevin
08:27 queued 11s
created
sites/default/boinc/modules/node_comment_block/node_comment_block.module 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
   if (is_array($element)) {
43 43
     show($element);
44 44
     return drupal_render($element);
45
-  }
46
-  else {
45
+  } else {
47 46
     // Safe-guard for inappropriate use of render() on flat variables: return
48 47
     // the variable as-is.
49 48
     return $element;
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module 2 patches
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -280,12 +280,12 @@  discard block
 block discarded – undo
280 280
   }
281 281
 
282 282
   switch ($op) {
283
-    case 'delete':
284
-      // Only call delete function on certain node types
285
-      if (in_array( $node->type, $node_types)) {
286
-        boinc_solr_comments_delete($node);
287
-      }
288
-      break;
283
+  case 'delete':
284
+    // Only call delete function on certain node types
285
+    if (in_array( $node->type, $node_types)) {
286
+      boinc_solr_comments_delete($node);
287
+    }
288
+    break;
289 289
   } //switch
290 290
 }
291 291
 
@@ -335,13 +335,13 @@  discard block
 block discarded – undo
335 335
  */
336 336
 function boinc_solr_comments_comment(&$a1, $op) {
337 337
   switch ($op) {
338
-    case 'view':
339
-    case 'update':
340
-      break;
341
-    case 'delete':
342
-      // $a1 should be a comment object
343
-      boinc_solr_comments_deletecomment($a1);
344
-      break;
338
+  case 'view':
339
+  case 'update':
340
+    break;
341
+  case 'delete':
342
+    // $a1 should be a comment object
343
+    boinc_solr_comments_deletecomment($a1);
344
+    break;
345 345
   }// switch
346 346
 }
347 347
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($comment->uid == 0 || strlen($comment->name) == 0) {
132 132
           // @see user_validate_name(). !'0' === TRUE.
133 133
           $comment_document->ss_name = '0';
134
-        }
135
-        else {
134
+        } else {
136 135
           $comment_document->ss_name = $comment->name;
137 136
           // We want the name to be searchable for keywords.
138 137
           $comment_document->tos_name = $comment->name;
@@ -318,8 +317,7 @@  discard block
 block discarded – undo
318 317
     $solr->deleteByQuery($query);
319 318
     // Log the query used for deletion.
320 319
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
321
-  }
322
-  catch (Exception $e) {
320
+  } catch (Exception $e) {
323 321
       watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
324 322
       return FALSE;
325 323
   }// try
@@ -376,8 +374,7 @@  discard block
 block discarded – undo
376 374
     $solr->deleteByQuery($query);
377 375
     // Log the query used for deletion.
378 376
     watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
379
-    }
380
-  catch (Exception $e) {
377
+    } catch (Exception $e) {
381 378
     watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
382 379
     return FALSE;
383 380
   }// try
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.admin.inc 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
   foreach (content_types() as $key => $info) {
20 20
     // Exclude node types profile, team, and panel
21 21
     switch ($key) {
22
-      case 'profile':
23
-      case 'team':
24
-      case 'panel':
25
-        continue 2;
22
+    case 'profile':
23
+    case 'team':
24
+    case 'panel':
25
+      continue 2;
26 26
     }// switch key
27 27
     $options[$key] = $info['name'];
28 28
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincimport/boincimport.module 2 patches
Switch Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -300,125 +300,125 @@
 block discarded – undo
300 300
   }
301 301
   
302 302
   switch ($form_state['values']['import']) {
303
-    case 'users':
304
-      boincimport_users();
305
-      break;
306
-
307
-    case 'teams':
308
-      boincimport_teams();
309
-      if (!variable_get('boincimport_import_team_successful', 0)) {
310
-        $_SESSION['boincimport_stage_selected'] = 'teams';
311
-      }
312
-      else {
313
-        $_SESSION['boincimport_stage_selected'] = 'friends';
314
-      }
315
-      break;
303
+  case 'users':
304
+    boincimport_users();
305
+    break;
316 306
 
317
-    case 'friends':
318
-      boincimport_friends();
319
-      if (!variable_get('boincimport_import_friend_successful', 0)) {
320
-        $_SESSION['boincimport_stage_selected'] = 'friends';
321
-      }
322
-      else {
323
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
324
-      }
325
-      break;
307
+  case 'teams':
308
+    boincimport_teams();
309
+    if (!variable_get('boincimport_import_team_successful', 0)) {
310
+      $_SESSION['boincimport_stage_selected'] = 'teams';
311
+    }
312
+    else {
313
+      $_SESSION['boincimport_stage_selected'] = 'friends';
314
+    }
315
+    break;
326 316
 
327
-    case 'preferences':
328
-      boincimport_preferences();
329
-      if (!variable_get('boincimport_import_preferences_successful', 0)) {
330
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
331
-      }
332
-      else {
333
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
334
-      }
335
-      break;
317
+  case 'friends':
318
+    boincimport_friends();
319
+    if (!variable_get('boincimport_import_friend_successful', 0)) {
320
+      $_SESSION['boincimport_stage_selected'] = 'friends';
321
+    }
322
+    else {
323
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
324
+    }
325
+    break;
336 326
 
337
-    case 'private messages':
338
-      boincimport_private_msgs();
339
-      if (!variable_get('boincimport_import_private_msg_successful', 0)) {
340
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
341
-      }
342
-      else {
343
-        $_SESSION['boincimport_stage_selected'] = 'categories';
344
-      }
345
-      break;
327
+  case 'preferences':
328
+    boincimport_preferences();
329
+    if (!variable_get('boincimport_import_preferences_successful', 0)) {
330
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
331
+    }
332
+    else {
333
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
334
+    }
335
+    break;
346 336
 
347
-    case 'categories':
348
-      boincimport_forum_categories();
349
-      if (!variable_get('boincimport_import_category_successful', 0)) {
350
-        $_SESSION['boincimport_stage_selected'] = 'categories';
351
-      }
352
-      else {
353
-        $_SESSION['boincimport_stage_selected'] = 'topics';
354
-      }
355
-      break;
337
+  case 'private messages':
338
+    boincimport_private_msgs();
339
+    if (!variable_get('boincimport_import_private_msg_successful', 0)) {
340
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
341
+    }
342
+    else {
343
+      $_SESSION['boincimport_stage_selected'] = 'categories';
344
+    }
345
+    break;
356 346
 
357
-    case 'topics':      
358
-      boincimport_forum_topics();
359
-      if (!variable_get('boincimport_import_topic_successful', 0)) {
360
-        $_SESSION['boincimport_stage_selected'] = 'topics';
361
-      }
362
-      else {
363
-        $_SESSION['boincimport_stage_selected'] = 'posts';
364
-      }
365
-      break;
347
+  case 'categories':
348
+    boincimport_forum_categories();
349
+    if (!variable_get('boincimport_import_category_successful', 0)) {
350
+      $_SESSION['boincimport_stage_selected'] = 'categories';
351
+    }
352
+    else {
353
+      $_SESSION['boincimport_stage_selected'] = 'topics';
354
+    }
355
+    break;
356
+
357
+  case 'topics':      
358
+    boincimport_forum_topics();
359
+    if (!variable_get('boincimport_import_topic_successful', 0)) {
360
+      $_SESSION['boincimport_stage_selected'] = 'topics';
361
+    }
362
+    else {
363
+      $_SESSION['boincimport_stage_selected'] = 'posts';
364
+    }
365
+    break;
366 366
       
367
-    case 'posts':
368
-      boincimport_forum_posts();
369
-      if (!variable_get('boincimport_import_post_successful', 0)) {
370
-        $_SESSION['boincimport_stage_selected'] = 'posts';
371
-      }
372
-      else {
373
-        $_SESSION['boincimport_stage_selected'] = 'url';
374
-      }
375
-      break;
367
+  case 'posts':
368
+    boincimport_forum_posts();
369
+    if (!variable_get('boincimport_import_post_successful', 0)) {
370
+      $_SESSION['boincimport_stage_selected'] = 'posts';
371
+    }
372
+    else {
373
+      $_SESSION['boincimport_stage_selected'] = 'url';
374
+    }
375
+    break;
376 376
 
377
-    case 'team forums':
378
-      boincimport_team_forums();
379
-      if (!variable_get('boincimport_team_forum_successful', 0)) {
380
-        $_SESSION['boincimport_stage_selected'] = 'team forums';
381
-      }
382
-      else {
383
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
384
-      }
385
-      break;
377
+  case 'team forums':
378
+    boincimport_team_forums();
379
+    if (!variable_get('boincimport_team_forum_successful', 0)) {
380
+      $_SESSION['boincimport_stage_selected'] = 'team forums';
381
+    }
382
+    else {
383
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
384
+    }
385
+    break;
386 386
 
387
-    case 'team topics':      
388
-      boincimport_team_forum_topics();
389
-      if (!variable_get('boincimport_team_topic_successful', 0)) {
390
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
391
-      }
392
-      else {
393
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
394
-      }
395
-      break;
387
+  case 'team topics':      
388
+    boincimport_team_forum_topics();
389
+    if (!variable_get('boincimport_team_topic_successful', 0)) {
390
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
391
+    }
392
+    else {
393
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
394
+    }
395
+    break;
396 396
       
397
-    case 'team posts':
398
-      boincimport_team_forum_posts();
399
-      if (!variable_get('boincimport_team_post_successful', 0)) {
400
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
401
-      }
402
-      else {
403
-        $_SESSION['boincimport_stage_selected'] = 'url';
404
-      }
405
-      break;
397
+  case 'team posts':
398
+    boincimport_team_forum_posts();
399
+    if (!variable_get('boincimport_team_post_successful', 0)) {
400
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
401
+    }
402
+    else {
403
+      $_SESSION['boincimport_stage_selected'] = 'url';
404
+    }
405
+    break;
406 406
 
407
-    case 'url':
408
-      boincimport_replace_urls();
409
-      if (!variable_get('boincimport_replace_url_successful', 0)) {
410
-        $_SESSION['boincimport_stage_selected'] = 'url';
411
-      }
412
-      else {
413
-        drupal_set_message('Congratulations.  Import Finished');
414
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415
-        watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
416
-        unset($_SESSION['boincimport_stage_selected']);
417
-      }
418
-      break;
419
-    default:
420
-      $_SESSION['boincimport_stage_selected'] = 'users';
421
-      break;
407
+  case 'url':
408
+    boincimport_replace_urls();
409
+    if (!variable_get('boincimport_replace_url_successful', 0)) {
410
+      $_SESSION['boincimport_stage_selected'] = 'url';
411
+    }
412
+    else {
413
+      drupal_set_message('Congratulations.  Import Finished');
414
+      drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415
+      watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
416
+      unset($_SESSION['boincimport_stage_selected']);
417
+    }
418
+    break;
419
+  default:
420
+    $_SESSION['boincimport_stage_selected'] = 'users';
421
+    break;
422 422
   }
423 423
 }
424 424
 
Please login to merge, or discard this patch.
Braces   +91 added lines, -180 removed lines patch added patch discarded remove patch
@@ -172,8 +172,7 @@  discard block
 block discarded – undo
172 172
   $out['result'] = $result;
173 173
   if ($result == 1) {
174 174
     $out['html'] .= '<li>'. t('Module %module is enabled. OK!', array('%module' => $module)) .'</li>';
175
-  }
176
-  else {
175
+  } else {
177 176
     $out['html'] .= '<li><span class="marker">'. t('Module %module is disabled.', array('%module' => $module)) .'</span></li>';
178 177
   }
179 178
   $out['html'] .= '</ul>';
@@ -201,16 +200,14 @@  discard block
 block discarded – undo
201 200
     if ($GLOBALS['db_type'] == 'pgsql') {
202 201
       // adapt from db_table_exists in database.pgsql.inc
203 202
       $result = (bool) db_result(db_query("SELECT COUNT(*) FROM pg_class WHERE relname = '%s'", $table));
204
-    }
205
-    else {
203
+    } else {
206 204
       // adapt from db_table_exists in database.mysql.inc
207 205
       $result = (bool) db_fetch_object(db_query("SHOW TABLES LIKE '%s'", $table));
208 206
     }
209 207
     db_set_active('default');
210 208
     if ($result) {
211 209
       $out['html'] .= '<li>'. t('Table %table: OK!', array('%table' => $table)) .'</li>';
212
-    }
213
-    else {
210
+    } else {
214 211
       $out['html'] .= '<li><span class="marker">'. t('Table <strong>%table</strong> does not exist!', array('%table' => $table)) .'</span></li>';
215 212
       $out['result']= 0;
216 213
     }
@@ -252,8 +249,7 @@  discard block
 block discarded – undo
252 249
       array('!unlock_it' => l(t('release the lock'),
253 250
         'admin/boinc/import/unlock')
254 251
       ), WATCHDOG_WARNING); 
255
-  }
256
-  else {
252
+  } else {
257 253
     $boincimport_functions = array(
258 254
       'users' => t('Import users'),
259 255
       'teams' => t('Import teams'),
@@ -288,8 +284,7 @@  discard block
 block discarded – undo
288 284
   // Lock the import process
289 285
   if (!variable_get('boincimport_process_locked', 0)) {
290 286
     variable_set('boincimport_process_locked', 1);
291
-  }
292
-  else {
287
+  } else {
293 288
     watchdog('boincimport', 'The import process is locked, but another process
294 289
       is trying to access it...', array(), WATCHDOG_WARNING); 
295 290
   }
@@ -303,8 +298,7 @@  discard block
 block discarded – undo
303 298
       boincimport_teams();
304 299
       if (!variable_get('boincimport_import_team_successful', 0)) {
305 300
         $_SESSION['boincimport_stage_selected'] = 'teams';
306
-      }
307
-      else {
301
+      } else {
308 302
         $_SESSION['boincimport_stage_selected'] = 'friends';
309 303
       }
310 304
       break;
@@ -313,8 +307,7 @@  discard block
 block discarded – undo
313 307
       boincimport_friends();
314 308
       if (!variable_get('boincimport_import_friend_successful', 0)) {
315 309
         $_SESSION['boincimport_stage_selected'] = 'friends';
316
-      }
317
-      else {
310
+      } else {
318 311
         $_SESSION['boincimport_stage_selected'] = 'preferences';
319 312
       }
320 313
       break;
@@ -323,8 +316,7 @@  discard block
 block discarded – undo
323 316
       boincimport_preferences();
324 317
       if (!variable_get('boincimport_import_preferences_successful', 0)) {
325 318
         $_SESSION['boincimport_stage_selected'] = 'preferences';
326
-      }
327
-      else {
319
+      } else {
328 320
         $_SESSION['boincimport_stage_selected'] = 'private messages';
329 321
       }
330 322
       break;
@@ -333,8 +325,7 @@  discard block
 block discarded – undo
333 325
       boincimport_private_msgs();
334 326
       if (!variable_get('boincimport_import_private_msg_successful', 0)) {
335 327
         $_SESSION['boincimport_stage_selected'] = 'private messages';
336
-      }
337
-      else {
328
+      } else {
338 329
         $_SESSION['boincimport_stage_selected'] = 'categories';
339 330
       }
340 331
       break;
@@ -343,8 +334,7 @@  discard block
 block discarded – undo
343 334
       boincimport_forum_categories();
344 335
       if (!variable_get('boincimport_import_category_successful', 0)) {
345 336
         $_SESSION['boincimport_stage_selected'] = 'categories';
346
-      }
347
-      else {
337
+      } else {
348 338
         $_SESSION['boincimport_stage_selected'] = 'topics';
349 339
       }
350 340
       break;
@@ -353,8 +343,7 @@  discard block
 block discarded – undo
353 343
       boincimport_forum_topics();
354 344
       if (!variable_get('boincimport_import_topic_successful', 0)) {
355 345
         $_SESSION['boincimport_stage_selected'] = 'topics';
356
-      }
357
-      else {
346
+      } else {
358 347
         $_SESSION['boincimport_stage_selected'] = 'posts';
359 348
       }
360 349
       break;
@@ -363,8 +352,7 @@  discard block
 block discarded – undo
363 352
       boincimport_forum_posts();
364 353
       if (!variable_get('boincimport_import_post_successful', 0)) {
365 354
         $_SESSION['boincimport_stage_selected'] = 'posts';
366
-      }
367
-      else {
355
+      } else {
368 356
         $_SESSION['boincimport_stage_selected'] = 'url';
369 357
       }
370 358
       break;
@@ -373,8 +361,7 @@  discard block
 block discarded – undo
373 361
       boincimport_team_forums();
374 362
       if (!variable_get('boincimport_team_forum_successful', 0)) {
375 363
         $_SESSION['boincimport_stage_selected'] = 'team forums';
376
-      }
377
-      else {
364
+      } else {
378 365
         $_SESSION['boincimport_stage_selected'] = 'team topics';
379 366
       }
380 367
       break;
@@ -383,8 +370,7 @@  discard block
 block discarded – undo
383 370
       boincimport_team_forum_topics();
384 371
       if (!variable_get('boincimport_team_topic_successful', 0)) {
385 372
         $_SESSION['boincimport_stage_selected'] = 'team topics';
386
-      }
387
-      else {
373
+      } else {
388 374
         $_SESSION['boincimport_stage_selected'] = 'team posts';
389 375
       }
390 376
       break;
@@ -393,8 +379,7 @@  discard block
 block discarded – undo
393 379
       boincimport_team_forum_posts();
394 380
       if (!variable_get('boincimport_team_post_successful', 0)) {
395 381
         $_SESSION['boincimport_stage_selected'] = 'team posts';
396
-      }
397
-      else {
382
+      } else {
398 383
         $_SESSION['boincimport_stage_selected'] = 'url';
399 384
       }
400 385
       break;
@@ -403,8 +388,7 @@  discard block
 block discarded – undo
403 388
       boincimport_replace_urls();
404 389
       if (!variable_get('boincimport_replace_url_successful', 0)) {
405 390
         $_SESSION['boincimport_stage_selected'] = 'url';
406
-      }
407
-      else {
391
+      } else {
408 392
         drupal_set_message('Congratulations.  Import Finished');
409 393
         drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
410 394
         watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
@@ -473,8 +457,7 @@  discard block
 block discarded – undo
473 457
       ORDER BY id ASC'
474 458
     );
475 459
     $user_count = mysqli_num_rows($boinc_accounts);
476
-  }
477
-  else {
460
+  } else {
478 461
     // Need to import any user who is currently ignored in order to keep them
479 462
     // ignored... not particularly clean (ignored users are stored in a string)
480 463
     $ignored_user_list = array(0);
@@ -550,8 +533,7 @@  discard block
 block discarded – undo
550 533
      if (isset($existing_users[$boinc_account->id])) {
551 534
       // This user has already been imported
552 535
       $duplicates[] = $boinc_account->id;
553
-    }
554
-    else {
536
+    } else {
555 537
       $operations[] = array(
556 538
         'boincimport_users_op', array(
557 539
           $boinc_account->id
@@ -607,8 +589,7 @@  discard block
 block discarded – undo
607 589
     // Store some result for post-processing in the finished callback.
608 590
     $context['results']['success'][] = $boinc_id;
609 591
     $message = "Successfully imported user {$boinc_id}";
610
-  }
611
-  else {
592
+  } else {
612 593
     $context['results']['failure'][] = $boinc_id;
613 594
     $message = "Failed to import user {$boinc_id}!";
614 595
     watchdog('boincimport',
@@ -625,8 +606,7 @@  discard block
 block discarded – undo
625 606
   // Update the progress for the batch engine
626 607
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
627 608
     $context['finished'] = 1;
628
-  }
629
-  else {
609
+  } else {
630 610
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
631 611
   }
632 612
 }
@@ -651,8 +631,7 @@  discard block
 block discarded – undo
651 631
     // Set the user import successful flag in the variable table
652 632
     variable_set('boincimport_import_user_successful', '1');
653 633
     $_SESSION['boincimport_stage_selected'] = 'teams';
654
-  }
655
-  else {
634
+  } else {
656 635
     // An error occurred.
657 636
     // $operations contains the operations that remained unprocessed.
658 637
     $error_operation = reset($operations);
@@ -714,8 +693,7 @@  discard block
 block discarded – undo
714 693
         $team_type = array(
715 694
           'tid' => $team_type_id
716 695
         );
717
-      }
718
-      else {
696
+      } else {
719 697
         if (!$name) continue;
720 698
         $team_type = array(
721 699
           'name' => strip_tags($name),
@@ -778,8 +756,7 @@  discard block
 block discarded – undo
778 756
      if (isset($existing_teams[$boinc_team->id])) {
779 757
       // This team has already been imported
780 758
       $duplicates[] = $boinc_team->id;
781
-    }
782
-    else {
759
+    } else {
783 760
       $operations[] = array(
784 761
         'boincimport_teams_op', array(
785 762
           $boinc_team
@@ -820,8 +797,7 @@  discard block
 block discarded – undo
820 797
     // Store some result for post-processing in the finished callback.
821 798
     $context['results']['success'][] = $boincteam->id;
822 799
     $message = "Successfully imported team {$boincteam->id}";
823
-  }
824
-  else {
800
+  } else {
825 801
     $context['results']['failure'][] = $boincteam->id;
826 802
     $message = "Failed to import team {$boincteam->id}!";
827 803
     watchdog('boincimport',
@@ -838,8 +814,7 @@  discard block
 block discarded – undo
838 814
   // Update the progress for the batch engine
839 815
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
840 816
     $context['finished'] = 1;
841
-  }
842
-  else {
817
+  } else {
843 818
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
844 819
   }
845 820
 }
@@ -862,8 +837,7 @@  discard block
 block discarded – undo
862 837
     // Set the team import successful flag in the variable table
863 838
     variable_set('boincimport_import_team_successful', '1');
864 839
     $_SESSION['boincimport_stage_selected'] = 'friends';
865
-  }
866
-  else {
840
+  } else {
867 841
     // An error occurred.
868 842
     // $operations contains the operations that remained unprocessed.
869 843
     $error_operation = reset($operations);
@@ -984,8 +958,7 @@  discard block
 block discarded – undo
984 958
       SET uid = '%d', friend_uid = '%d', created = '%d'",
985 959
       $uid, $friend_uid, $friendship->create_time
986 960
     );
987
-  }
988
-  else {
961
+  } else {
989 962
     $boinc_id = ($uid) ? $friendship->user_dest : $friendship->user_src;
990 963
     $message = "No Drupal account exists for BOINC user {$boinc_id}!";
991 964
   }
@@ -994,8 +967,7 @@  discard block
 block discarded – undo
994 967
     // Store some result for post-processing in the finished callback.
995 968
     $context['results']['success'][] = $uid;
996 969
     $message = "Successfully made users {$uid} and {$friend_uid} friends";
997
-  }
998
-  else {
970
+  } else {
999 971
     $context['results']['failure'][] = $uid;
1000 972
     if (!$message) {
1001 973
       $message = "Failed to make users {$uid} and {$friend_uid} friends!";
@@ -1011,8 +983,7 @@  discard block
 block discarded – undo
1011 983
   // Update the progress for the batch engine
1012 984
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1013 985
     $context['finished'] = 1;
1014
-  }
1015
-  else {
986
+  } else {
1016 987
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1017 988
   }
1018 989
 }
@@ -1036,8 +1007,7 @@  discard block
 block discarded – undo
1036 1007
     // Set the friend import successful flag in the variable table
1037 1008
     variable_set('boincimport_import_friend_successful', '1');
1038 1009
     $_SESSION['boincimport_stage_selected'] = 'preferences';
1039
-  }
1040
-  else {
1010
+  } else {
1041 1011
     // An error occurred.
1042 1012
     // $operations contains the operations that remained unprocessed.
1043 1013
     $error_operation = reset($operations);
@@ -1161,8 +1131,7 @@  discard block
 block discarded – undo
1161 1131
     );
1162 1132
     if ($user_ignored) {
1163 1133
       $success = TRUE;
1164
-    }
1165
-    else {
1134
+    } else {
1166 1135
       $context['results']['warning'][] = "{$uid}:{$ignored_user_uid}";
1167 1136
       watchdog('boincimport',
1168 1137
         'Could not add user @ignored_uid to the ignore list of user @uid',
@@ -1177,8 +1146,7 @@  discard block
 block discarded – undo
1177 1146
     // Store some result for post-processing in the finished callback.
1178 1147
     $context['results']['success'][] = $uid;
1179 1148
     $message = "Successfully imported ignored users for user {$uid}";
1180
-  }
1181
-  else {
1149
+  } else {
1182 1150
     $context['results']['failure'][] = $uid;
1183 1151
     $message = "Failed to import any user filter preferences for user {$uid}!";
1184 1152
     watchdog('boincimport',
@@ -1195,8 +1163,7 @@  discard block
 block discarded – undo
1195 1163
   // Update the progress for the batch engine
1196 1164
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1197 1165
     $context['finished'] = 1;
1198
-  }
1199
-  else {
1166
+  } else {
1200 1167
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1201 1168
   }
1202 1169
 }
@@ -1221,8 +1188,7 @@  discard block
 block discarded – undo
1221 1188
     // Set the preference import successful flag in the variable table
1222 1189
     variable_set('boincimport_import_preferences_successful', '1');
1223 1190
     $_SESSION['boincimport_stage_selected'] = 'private messages';
1224
-  }
1225
-  else {
1191
+  } else {
1226 1192
     // An error occurred.
1227 1193
     // $operations contains the operations that remained unprocessed.
1228 1194
     $error_operation = reset($operations);
@@ -1356,8 +1322,7 @@  discard block
 block discarded – undo
1356 1322
     // Store some result for post-processing in the finished callback.
1357 1323
     $context['results']['success'][] = $pm->id;
1358 1324
     $message = "Successfully imported private message {$pm->id}";
1359
-  }
1360
-  else {
1325
+  } else {
1361 1326
     $context['results']['failure'][] = $pm->id;
1362 1327
     $message = "Failed to import private message {$pm->id}!";
1363 1328
     watchdog('boincimport',
@@ -1374,8 +1339,7 @@  discard block
 block discarded – undo
1374 1339
   // Update the progress for the batch engine
1375 1340
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1376 1341
     $context['finished'] = 1;
1377
-  }
1378
-  else {
1342
+  } else {
1379 1343
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1380 1344
   }
1381 1345
 }
@@ -1398,8 +1362,7 @@  discard block
 block discarded – undo
1398 1362
     // Set the private message import successful flag in the variable table
1399 1363
     variable_set('boincimport_import_private_msg_successful', '1');
1400 1364
     $_SESSION['boincimport_stage_selected'] = 'categories';
1401
-  }
1402
-  else {
1365
+  } else {
1403 1366
     // An error occurred.
1404 1367
     // $operations contains the operations that remained unprocessed.
1405 1368
     $error_operation = reset($operations);
@@ -1552,8 +1515,7 @@  discard block
 block discarded – undo
1552 1515
     if (in_array($boinc_forum_category->name, $existing_categories)) {
1553 1516
       // This category has already been imported
1554 1517
       $duplicate_categories[] = $boinc_forum_category->name;
1555
-    }
1556
-    else {
1518
+    } else {
1557 1519
       $operations[] = array(
1558 1520
         'boincimport_forum_categories_op', array(
1559 1521
           $boinc_forum_category, $forum_vid, $pre, FALSE
@@ -1567,8 +1529,7 @@  discard block
 block discarded – undo
1567 1529
      if (isset($existing_forums[$boinc_forum->id])) {
1568 1530
       // This forum has already been imported
1569 1531
       $duplicates[] = $boinc_forum->id;
1570
-    }
1571
-    else {
1532
+    } else {
1572 1533
       $operations[] = array(
1573 1534
         'boincimport_forums_op', array(
1574 1535
           $boinc_forum, $forum_vid, $pre
@@ -1635,8 +1596,7 @@  discard block
 block discarded – undo
1635 1596
     $category->name = 'Hidden';
1636 1597
     $category->id = 0;
1637 1598
     $hidden = TRUE;
1638
-  }
1639
-  else {
1599
+  } else {
1640 1600
     // If this container is empty, put it into the hidden container
1641 1601
     db_set_active('boinc_rw');
1642 1602
     $forums_contained = db_result(db_query('
@@ -1679,13 +1639,11 @@  discard block
 block discarded – undo
1679 1639
     // Store some result for post-processing in the finished callback.
1680 1640
     if (!$category AND $create_hidden) {
1681 1641
       $message = "Created special hidden container";
1682
-    }
1683
-    else {
1642
+    } else {
1684 1643
       $context['results']['categories']['success'][] = $category->id;
1685 1644
       $message = "Successfully imported container {$category->id}";
1686 1645
     }
1687
-  }
1688
-  else {
1646
+  } else {
1689 1647
     $context['results']['categories']['failure'][] = $category->id;
1690 1648
     $message = "Failed to import container {$category->id}!";
1691 1649
     watchdog('boincimport',
@@ -1702,8 +1660,7 @@  discard block
 block discarded – undo
1702 1660
   // Update the progress for the batch engine
1703 1661
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1704 1662
     $context['finished'] = 1;
1705
-  }
1706
-  else {
1663
+  } else {
1707 1664
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1708 1665
   }
1709 1666
 }
@@ -1739,8 +1696,7 @@  discard block
 block discarded – undo
1739 1696
     // Save the ID of the News forum for later import
1740 1697
     variable_set('boincimport_news_forum_id', $forum_id);
1741 1698
     $success = TRUE;
1742
-  }
1743
-  else {
1699
+  } else {
1744 1700
     // Save all other forums as taxonomy terms
1745 1701
     $forum = array(
1746 1702
       'name' => $name,
@@ -1766,8 +1722,7 @@  discard block
 block discarded – undo
1766 1722
     // Store some result for post-processing in the finished callback.
1767 1723
     $context['results']['forums']['success'][] = $forum_id;
1768 1724
     $message = "Successfully imported forum {$forum_id}";
1769
-  }
1770
-  else {
1725
+  } else {
1771 1726
     $context['results']['forums']['failure'][] = $forum_id;
1772 1727
     $message = "Failed to import forum {$forum_id}!";
1773 1728
   }
@@ -1780,8 +1735,7 @@  discard block
 block discarded – undo
1780 1735
   // Update the progress for the batch engine
1781 1736
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1782 1737
     $context['finished'] = 1;
1783
-  }
1784
-  else {
1738
+  } else {
1785 1739
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1786 1740
   }
1787 1741
 }
@@ -1882,8 +1836,7 @@  discard block
 block discarded – undo
1882 1836
     // Set the forum import successful flag in the variable table
1883 1837
     variable_set('boincimport_import_forum_successful', '1');
1884 1838
     $_SESSION['boincimport_stage_selected'] = 'topics';
1885
-  }
1886
-  else {
1839
+  } else {
1887 1840
     // An error occurred.
1888 1841
     // $operations contains the operations that remained unprocessed.
1889 1842
     $error_operation = reset($operations);
@@ -2037,9 +1990,7 @@  discard block
 block discarded – undo
2037 1990
     
2038 1991
     if ($duplicate OR !$post) {
2039 1992
       $success = FALSE;
2040
-    }
2041
-    
2042
-    else {
1993
+    } else {
2043 1994
       // Get the user and term IDs along with other data to define the topic
2044 1995
       $uid = boincuser_lookup_uid($topic->owner);
2045 1996
       $tid = db_result(db_query('
@@ -2103,12 +2054,10 @@  discard block
 block discarded – undo
2103 2054
           if (!$success) {
2104 2055
             $error_detail = 'topic imported, but failed to set last comment timestamp';
2105 2056
           }
2106
-        }
2107
-        else {
2057
+        } else {
2108 2058
           $error_detail = 'topic node saved, but failed to link in boincimport_temp_topic table';
2109 2059
         }
2110
-      }
2111
-      else {
2060
+      } else {
2112 2061
         $error_detail = 'failed to save topic node to database';
2113 2062
       }
2114 2063
     }
@@ -2119,16 +2068,13 @@  discard block
 block discarded – undo
2119 2068
       // Store some result for post-processing in the finished callback.
2120 2069
       $context['results']['success'][] = $topic->id;
2121 2070
       $message = "Successfully imported topic {$topic->id}";
2122
-    }
2123
-    elseif ($duplicate) {
2071
+    } elseif ($duplicate) {
2124 2072
       $context['results']['duplicate'][] = $topic->id;
2125 2073
       $message = "Topic {$topic->id} was already imported";
2126
-    }
2127
-    elseif (!$post) {
2074
+    } elseif (!$post) {
2128 2075
       $context['results']['empty'][] = $topic->id;
2129 2076
       $message = "Skipping topic {$topic->id} as empty";
2130
-    }
2131
-    else {
2077
+    } else {
2132 2078
       $context['results']['failure'][] = $topic->id;
2133 2079
       $message = "Failed to import topic {$topic->id}!";
2134 2080
       watchdog('boincimport',
@@ -2149,8 +2095,7 @@  discard block
 block discarded – undo
2149 2095
     // Update the progress for the batch engine
2150 2096
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2151 2097
       $context['finished'] = 1;
2152
-    }
2153
-    else {
2098
+    } else {
2154 2099
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2155 2100
     }
2156 2101
   }
@@ -2184,8 +2129,7 @@  discard block
 block discarded – undo
2184 2129
     // Set the topic import successful flag in the variable table
2185 2130
     variable_set('boincimport_import_topic_successful', '1');
2186 2131
     $_SESSION['boincimport_stage_selected'] = 'posts';
2187
-  }
2188
-  else {
2132
+  } else {
2189 2133
     // An error occurred.
2190 2134
     // $operations contains the operations that remained unprocessed.
2191 2135
     $error_operation = reset($operations);
@@ -2433,18 +2377,15 @@  discard block
 block discarded – undo
2433 2377
           if ($success) {
2434 2378
             $posts_imported++;
2435 2379
             $context['results']['posts']['success'][] = $post->id;
2436
-          }
2437
-          else {
2380
+          } else {
2438 2381
             $context['results']['posts']['failure'][] = $post->id;
2439 2382
             $error_posts++;
2440 2383
           }
2441
-        }
2442
-        else {
2384
+        } else {
2443 2385
           $context['results']['posts']['failure'][] = $post->id;
2444 2386
           $error_posts++;
2445 2387
         }
2446
-      }
2447
-      else {
2388
+      } else {
2448 2389
         $context['results']['posts']['empty'][] = $post->id;
2449 2390
         $empty_posts++;
2450 2391
       }
@@ -2455,8 +2396,7 @@  discard block
 block discarded – undo
2455 2396
       // Store some result for post-processing in the finished callback.
2456 2397
       $context['results']['success'][] = $boinc_topic->id;
2457 2398
       $message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id}";
2458
-    }
2459
-    else {
2399
+    } else {
2460 2400
       $context['results']['failure'][] = $boinc_topic->id;
2461 2401
       $message = "Failed to import any posts for topic {$boinc_topic->id} (excluded {$error_posts} errors, {$duplicate_posts} duplicates, and {$empty_posts} empty)";
2462 2402
       watchdog('boincimport', 'Failed to import any posts for topic @id (excluded @error_posts errors, @duplicate_posts duplicates, and @empty_posts empty)', 
@@ -2477,8 +2417,7 @@  discard block
 block discarded – undo
2477 2417
     // Update the progress for the batch engine
2478 2418
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2479 2419
       $context['finished'] = 1;
2480
-    }
2481
-    else {
2420
+    } else {
2482 2421
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2483 2422
     }
2484 2423
   }
@@ -2518,8 +2457,7 @@  discard block
 block discarded – undo
2518 2457
     // Set the post import successful flag in the variable table
2519 2458
     variable_set('boincimport_import_post_successful', '1');
2520 2459
     $_SESSION['boincimport_stage_selected'] = 'team forums';
2521
-  }
2522
-  else {
2460
+  } else {
2523 2461
     // An error occurred.
2524 2462
     // $operations contains the operations that remained unprocessed.
2525 2463
     $error_operation = reset($operations);
@@ -2606,8 +2544,7 @@  discard block
 block discarded – undo
2606 2544
      if (isset($existing_team_forums[$boincteam_forum->id])) {
2607 2545
       // This team has already been imported
2608 2546
       $duplicates[] = $boincteam_forum->id;
2609
-    }
2610
-    else {
2547
+    } else {
2611 2548
       $operations[] = array(
2612 2549
         'boincimport_team_forums_op', array(
2613 2550
           $boincteam_forum
@@ -2673,8 +2610,7 @@  discard block
 block discarded – undo
2673 2610
     // Store some result for post-processing in the finished callback.
2674 2611
     $context['results']['success'][] = $forum_id;
2675 2612
     $message = "Successfully imported team forum {$forum_id}";
2676
-  }
2677
-  else {
2613
+  } else {
2678 2614
     $context['results']['failure'][] = $forum_id;
2679 2615
     $message = "Failed to import team forum {$forum_id}!";
2680 2616
     watchdog('boincimport',
@@ -2691,8 +2627,7 @@  discard block
 block discarded – undo
2691 2627
   // Update the progress for the batch engine
2692 2628
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2693 2629
     $context['finished'] = 1;
2694
-  }
2695
-  else {
2630
+  } else {
2696 2631
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2697 2632
   }
2698 2633
 }
@@ -2715,8 +2650,7 @@  discard block
 block discarded – undo
2715 2650
     // Set the team forum import successful flag in the variable table
2716 2651
     variable_set('boincimport_import_team_forum_successful', '1');
2717 2652
     $_SESSION['boincimport_stage_selected'] = 'team topics';
2718
-  }
2719
-  else {
2653
+  } else {
2720 2654
     // An error occurred.
2721 2655
     // $operations contains the operations that remained unprocessed.
2722 2656
     $error_operation = reset($operations);
@@ -2811,8 +2745,7 @@  discard block
 block discarded – undo
2811 2745
      if (isset($existing_team_topics[$boincteam_topic->id])) {
2812 2746
       // This team topic has already been imported
2813 2747
       $duplicates[] = $boincteam_topic->id;
2814
-    }
2815
-    else {
2748
+    } else {
2816 2749
       $operations[] = array(
2817 2750
         'boincimport_team_topics_op', array(
2818 2751
           $boincteam_topic
@@ -2859,8 +2792,7 @@  discard block
 block discarded – undo
2859 2792
   ));
2860 2793
   if (!$team_forum_id) {
2861 2794
     $missing_parent[] = $topic->id;
2862
-  }
2863
-  else {
2795
+  } else {
2864 2796
     // Get the content of the post that started the topic
2865 2797
     db_set_active('boinc_rw');
2866 2798
     $query = db_query('
@@ -2877,8 +2809,7 @@  discard block
 block discarded – undo
2877 2809
       // Empty topics should have already been filtered out of the import, so
2878 2810
       // consider this an error condition
2879 2811
       $empty_topics[] = $topic->id;
2880
-    }
2881
-    else {
2812
+    } else {
2882 2813
       // Get the user ID along with other data to define the topic
2883 2814
       $uid = boincuser_lookup_uid($topic->owner);
2884 2815
        if (!$topic->owner) {
@@ -2942,8 +2873,7 @@  discard block
 block discarded – undo
2942 2873
     // Store some result for post-processing in the finished callback.
2943 2874
     $context['results']['success'][] = $topic->id;
2944 2875
     $message = "Successfully imported team topic {$topic->id}";
2945
-  }
2946
-  else {
2876
+  } else {
2947 2877
     $context['results']['failure'][] = $topic->id;
2948 2878
     $message = "Failed to import team topic {$topic->id}!";
2949 2879
     watchdog('boincimport',
@@ -2960,8 +2890,7 @@  discard block
 block discarded – undo
2960 2890
   // Update the progress for the batch engine
2961 2891
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2962 2892
     $context['finished'] = 1;
2963
-  }
2964
-  else {
2893
+  } else {
2965 2894
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2966 2895
   }
2967 2896
 }
@@ -2984,8 +2913,7 @@  discard block
 block discarded – undo
2984 2913
     // Set the BLAH import successful flag in the variable table
2985 2914
     variable_set('boincimport_import_team_topic_successful', '1');
2986 2915
     $_SESSION['boincimport_stage_selected'] = 'team posts';
2987
-  }
2988
-  else {
2916
+  } else {
2989 2917
     // An error occurred.
2990 2918
     // $operations contains the operations that remained unprocessed.
2991 2919
     $error_operation = reset($operations);
@@ -3107,8 +3035,7 @@  discard block
 block discarded – undo
3107 3035
       if (isset($existing_posts[$boincteam_post->id])) {
3108 3036
         // This post has already been imported
3109 3037
         $duplicates[] = $boincteam_post->id;
3110
-      }
3111
-      else {
3038
+      } else {
3112 3039
         $operations[] = array(
3113 3040
           'boincimport_team_posts_op', array(
3114 3041
             $boincteam_post
@@ -3224,8 +3151,7 @@  discard block
 block discarded – undo
3224 3151
     // Store some result for post-processing in the finished callback.
3225 3152
     $context['results']['success'][] = $post->id;
3226 3153
     $message = "Successfully imported team post {$post->id}";
3227
-  }
3228
-  else {
3154
+  } else {
3229 3155
     $context['results']['failure'][] = $post->id;
3230 3156
     $message = "Failed to import team post {$post->id}!";
3231 3157
     watchdog('boincimport',
@@ -3242,8 +3168,7 @@  discard block
 block discarded – undo
3242 3168
   // Update the progress for the batch engine
3243 3169
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3244 3170
     $context['finished'] = 1;
3245
-  }
3246
-  else {
3171
+  } else {
3247 3172
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3248 3173
   }
3249 3174
 }
@@ -3266,8 +3191,7 @@  discard block
 block discarded – undo
3266 3191
     // Set the team post import successful flag in the variable table
3267 3192
     variable_set('boincimport_import_team_post_successful', '1');
3268 3193
     $_SESSION['boincimport_stage_selected'] = 'url';
3269
-  }
3270
-  else {
3194
+  } else {
3271 3195
     // An error occurred.
3272 3196
     // $operations contains the operations that remained unprocessed.
3273 3197
     $error_operation = reset($operations);
@@ -3373,8 +3297,7 @@  discard block
 block discarded – undo
3373 3297
     $context['results']['success'][] = $boincuser_id;
3374 3298
     $context['results']['subscriptions'][$boincuser_id] = $count;
3375 3299
     $message = "Successfully imported {$count} subscriptions for user {$boincuser_id}";
3376
-  }
3377
-  else {
3300
+  } else {
3378 3301
     $context['results']['failure'][] = $boincuser_id;
3379 3302
     $message = "Failed to import subscriptions for user {$boincuser_id}!";
3380 3303
     watchdog('boincimport',
@@ -3391,8 +3314,7 @@  discard block
 block discarded – undo
3391 3314
   // Update the progress for the batch engine
3392 3315
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3393 3316
     $context['finished'] = 1;
3394
-  }
3395
-  else {
3317
+  } else {
3396 3318
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3397 3319
   }
3398 3320
 }
@@ -3417,8 +3339,7 @@  discard block
 block discarded – undo
3417 3339
     // Set the subscription import successful flag in the variable table
3418 3340
     variable_set('boincimport_import_subscription_successful', '1');
3419 3341
     $_SESSION['boincimport_stage_selected'] = 'url';
3420
-  }
3421
-  else {
3342
+  } else {
3422 3343
     // An error occurred.
3423 3344
     // $operations contains the operations that remained unprocessed.
3424 3345
     $error_operation = reset($operations);
@@ -3596,8 +3517,7 @@  discard block
 block discarded – undo
3596 3517
       // Store some result for post-processing in the finished callback.
3597 3518
       $context['results']['nodes']['updated'][] = $node->nid;
3598 3519
       $message = "Successfully updated node {$node->nid}";
3599
-    }
3600
-    else {
3520
+    } else {
3601 3521
       $message = "No changes made to node {$node->nid}!";
3602 3522
     }
3603 3523
     
@@ -3609,8 +3529,7 @@  discard block
 block discarded – undo
3609 3529
     // Update the progress for the batch engine
3610 3530
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3611 3531
       $context['finished'] = 1;
3612
-    }
3613
-    else {
3532
+    } else {
3614 3533
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3615 3534
     }
3616 3535
   }
@@ -3660,8 +3579,7 @@  discard block
 block discarded – undo
3660 3579
       // Store some result for post-processing in the finished callback.
3661 3580
       $context['results']['comments']['updated'][] = $comment->cid;
3662 3581
       $message = "Successfully updated comment {$comment->cid}";
3663
-    }
3664
-    else {
3582
+    } else {
3665 3583
       $message = "No changes made to comment {$comment->cid}!";
3666 3584
     }
3667 3585
     
@@ -3673,8 +3591,7 @@  discard block
 block discarded – undo
3673 3591
     // Update the progress for the batch engine
3674 3592
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3675 3593
       $context['finished'] = 1;
3676
-    }
3677
-    else {
3594
+    } else {
3678 3595
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3679 3596
     }
3680 3597
   }
@@ -3723,8 +3640,7 @@  discard block
 block discarded – undo
3723 3640
       // Store some result for post-processing in the finished callback.
3724 3641
       $context['results']['pm']['updated'][] = $pm->mid;
3725 3642
       $message = "Successfully updated private message {$pm->mid}";
3726
-    }
3727
-    else {
3643
+    } else {
3728 3644
       $message = "No changes made to private message {$pm->mid}!";
3729 3645
     }
3730 3646
     
@@ -3736,8 +3652,7 @@  discard block
 block discarded – undo
3736 3652
     // Update the progress for the batch engine
3737 3653
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3738 3654
       $context['finished'] = 1;
3739
-    }
3740
-    else {
3655
+    } else {
3741 3656
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3742 3657
     }
3743 3658
   }
@@ -3802,8 +3717,7 @@  discard block
 block discarded – undo
3802 3717
     // Set the replace URLs successful flag in the variable table
3803 3718
     variable_set('boincimport_replace_urls_successful', '1');
3804 3719
     $_SESSION['boincimport_stage_selected'] = 'users';
3805
-  }
3806
-  else {
3720
+  } else {
3807 3721
     // An error occurred.
3808 3722
     // $operations contains the operations that remained unprocessed.
3809 3723
     $error_operation = reset($operations);
@@ -3905,7 +3819,8 @@  discard block
 block discarded – undo
3905 3819
   $score = 0; // 0 default value, comments get higher score depending on the author's roles
3906 3820
   $users = serialize(array(0 => 1));  // default value for everybody!!
3907 3821
   
3908
-  if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too
3822
+  if ($edit['uid'] === $user->uid) {
3823
+// '===' because we want to modify anonymous users too
3909 3824
     $edit['name'] = $user->name;
3910 3825
   }
3911 3826
 
@@ -4028,13 +3943,11 @@  discard block
 block discarded – undo
4028 3943
       if (isset($this->boincDomains[$domain])) {
4029 3944
         // This is a URL configured to be transformed
4030 3945
         return "{$http}://{$this->drupalDomain}{$this->basePath}";
4031
-      }
4032
-      else {
3946
+      } else {
4033 3947
         // This URL should not be transformed
4034 3948
         return NULL;
4035 3949
       }
4036
-    }
4037
-    else {
3950
+    } else {
4038 3951
       // This is a relative URL
4039 3952
       return $this->basePath;
4040 3953
     }
@@ -4056,8 +3969,7 @@  discard block
 block discarded – undo
4056 3969
       ));
4057 3970
       if ($id) {
4058 3971
         $link = "{$newBaseUrl}goto/comment/{$id}";
4059
-      }
4060
-      else {
3972
+      } else {
4061 3973
         // This post is not in the post import table, so it's probably a topic
4062 3974
         $link = $this->transformTopicLinks($matches);
4063 3975
       }
@@ -4081,8 +3993,7 @@  discard block
 block discarded – undo
4081 3993
       ));
4082 3994
       if ($id) {
4083 3995
         $link = "{$newBaseUrl}goto/comment/{$id}";
4084
-      }
4085
-      else {
3996
+      } else {
4086 3997
         // This post is not in the post import table, so it's probably a topic
4087 3998
         $link = $this->transformTopicLinks($matches);
4088 3999
       }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boinctranslate/boinctranslate.admin.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -220,8 +220,7 @@  discard block
 block discarded – undo
220 220
   if (!$values['boinc_translate_transifex_pass']) {
221 221
     if (!variable_get('boinc_translate_transifex_pass', '')) {
222 222
       form_set_error('boinc_translate_transifex_pass', t('Password is required.'));
223
-    }
224
-    else {
223
+    } else {
225 224
       unset($form_state['values']['boinc_translate_transifex_pass']);
226 225
     }
227 226
   }
@@ -260,8 +259,7 @@  discard block
 block discarded – undo
260 259
           'boinc_translate_transifex_pass',
261 260
           t('Transifex authentication failed.')
262 261
         );
263
-      }
264
-      else {
262
+      } else {
265 263
         $authenticated = TRUE;
266 264
       }
267 265
     }
@@ -278,14 +276,12 @@  discard block
 block discarded – undo
278 276
       );
279 277
       if ($project_name AND $project_resources) {
280 278
         $transifex_resources[$project_name] = $project_resources;
281
-      }
282
-      elseif ($project_name AND !$project_resources) {
279
+      } elseif ($project_name AND !$project_resources) {
283 280
         drupal_set_message(
284 281
           t('No project-specific resources were provided'),
285 282
           'warning'
286 283
         );
287
-      }
288
-      elseif ($project_resources AND !$project_name) {
284
+      } elseif ($project_resources AND !$project_name) {
289 285
         drupal_set_message(
290 286
           t('No project-specific Transifex project name was provided'),
291 287
           'warning'
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.admin.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,13 +157,11 @@  discard block
 block discarded – undo
157 157
   if (!$values['boinc_root_dir']) {
158 158
     form_set_error('boinc_root_dir', t('BOINC project root directory must be
159 159
       defined!'));
160
-  }
161
-  elseif (!is_dir($values['boinc_root_dir'])) {
160
+  } elseif (!is_dir($values['boinc_root_dir'])) {
162 161
     form_set_error('boinc_root_dir', t('BOINC project root not found at %directory',
163 162
       array('%directory' => $values['boinc_root_dir'])
164 163
     ));
165
-  }
166
-  else {
164
+  } else {
167 165
     // By default, try to automatically set specific directories from the root
168 166
     if (!$values['boinc_config_xml_dir']) {
169 167
       $values['boinc_config_xml_dir'] = $values['boinc_root_dir'];
@@ -285,8 +283,7 @@  discard block
 block discarded – undo
285 283
   if (!$values['boinc_scheduler_urls']) {
286 284
     form_set_error('boinc_scheduler_urls', t('At least one scheduling server
287 285
       URL must be specified.'));
288
-  }
289
-  else {
286
+  } else {
290 287
     $urls = explode("\r\n", $values['boinc_scheduler_urls']);
291 288
     foreach ($urls as $key => $url) {
292 289
       if (!$url) {
Please login to merge, or discard this patch.
sites/all/features/global_search_solr/global_search_solr.features.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,11 +7,9 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "apachesolr" && $api == "apachesolr_environments") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") {
10
+  } elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") {
12 11
     return array("version" => 3);
13
-  }
14
-  elseif ($module == "facetapi" && $api == "facetapi_defaults") {
12
+  } elseif ($module == "facetapi" && $api == "facetapi_defaults") {
15 13
     return array("version" => 1);
16 14
   }
17 15
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/news/news.features.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "context" && $api == "context") {
9 9
     return array("version" => 3);
10
-  }
11
-  elseif ($module == "strongarm" && $api == "strongarm") {
10
+  } elseif ($module == "strongarm" && $api == "strongarm") {
12 11
     return array("version" => 1);
13 12
   }
14 13
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/discussion_forums/discussion_forums.module 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
   
27 27
   if (isset($roles[$rid]) AND $roles[$rid] == $better_name) {
28 28
     // Life is good
29
-  }
30
-  else {
29
+  } else {
31 30
     $better_rid = array_search($better_name, $roles);
32 31
     $old_rid = array_search('Forum Moderator', $roles);
33 32
     if (!$better_rid) {
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
           $better_name, $old_rid);
37 36
         $better_rid = $old_rid;
38 37
         $old_rid = NULL;
39
-      }
40
-      else {
38
+      } else {
41 39
         drupal_set_message(t('The Forum Access module is not set up right. Try disabling the Discussion Forums feature and then manually uninstall the Forum Access module before enabling Discussion Forums again.', 'error'));
42 40
       }
43 41
     }
Please login to merge, or discard this patch.