Passed
Pull Request — master (#5505)
by David
09:08
created
drupal/sites/default/boinc/modules/boincimport/boincimport.module 1 patch
Switch Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -301,125 +301,125 @@
 block discarded – undo
301 301
   }
302 302
 
303 303
   switch ($form_state['values']['import']) {
304
-    case 'users':
305
-      boincimport_users();
306
-      break;
307
-
308
-    case 'teams':
309
-      boincimport_teams();
310
-      if (!variable_get('boincimport_import_team_successful', 0)) {
311
-        $_SESSION['boincimport_stage_selected'] = 'teams';
312
-      }
313
-      else {
314
-        $_SESSION['boincimport_stage_selected'] = 'friends';
315
-      }
316
-      break;
304
+  case 'users':
305
+    boincimport_users();
306
+    break;
317 307
 
318
-    case 'friends':
319
-      boincimport_friends();
320
-      if (!variable_get('boincimport_import_friend_successful', 0)) {
321
-        $_SESSION['boincimport_stage_selected'] = 'friends';
322
-      }
323
-      else {
324
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
325
-      }
326
-      break;
308
+  case 'teams':
309
+    boincimport_teams();
310
+    if (!variable_get('boincimport_import_team_successful', 0)) {
311
+      $_SESSION['boincimport_stage_selected'] = 'teams';
312
+    }
313
+    else {
314
+      $_SESSION['boincimport_stage_selected'] = 'friends';
315
+    }
316
+    break;
327 317
 
328
-    case 'preferences':
329
-      boincimport_preferences();
330
-      if (!variable_get('boincimport_import_preferences_successful', 0)) {
331
-        $_SESSION['boincimport_stage_selected'] = 'preferences';
332
-      }
333
-      else {
334
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
335
-      }
336
-      break;
318
+  case 'friends':
319
+    boincimport_friends();
320
+    if (!variable_get('boincimport_import_friend_successful', 0)) {
321
+      $_SESSION['boincimport_stage_selected'] = 'friends';
322
+    }
323
+    else {
324
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
325
+    }
326
+    break;
337 327
 
338
-    case 'private messages':
339
-      boincimport_private_msgs();
340
-      if (!variable_get('boincimport_import_private_msg_successful', 0)) {
341
-        $_SESSION['boincimport_stage_selected'] = 'private messages';
342
-      }
343
-      else {
344
-        $_SESSION['boincimport_stage_selected'] = 'categories';
345
-      }
346
-      break;
328
+  case 'preferences':
329
+    boincimport_preferences();
330
+    if (!variable_get('boincimport_import_preferences_successful', 0)) {
331
+      $_SESSION['boincimport_stage_selected'] = 'preferences';
332
+    }
333
+    else {
334
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
335
+    }
336
+    break;
347 337
 
348
-    case 'categories':
349
-      boincimport_forum_categories();
350
-      if (!variable_get('boincimport_import_category_successful', 0)) {
351
-        $_SESSION['boincimport_stage_selected'] = 'categories';
352
-      }
353
-      else {
354
-        $_SESSION['boincimport_stage_selected'] = 'topics';
355
-      }
356
-      break;
338
+  case 'private messages':
339
+    boincimport_private_msgs();
340
+    if (!variable_get('boincimport_import_private_msg_successful', 0)) {
341
+      $_SESSION['boincimport_stage_selected'] = 'private messages';
342
+    }
343
+    else {
344
+      $_SESSION['boincimport_stage_selected'] = 'categories';
345
+    }
346
+    break;
357 347
 
358
-    case 'topics':
359
-      boincimport_forum_topics();
360
-      if (!variable_get('boincimport_import_topic_successful', 0)) {
361
-        $_SESSION['boincimport_stage_selected'] = 'topics';
362
-      }
363
-      else {
364
-        $_SESSION['boincimport_stage_selected'] = 'posts';
365
-      }
366
-      break;
348
+  case 'categories':
349
+    boincimport_forum_categories();
350
+    if (!variable_get('boincimport_import_category_successful', 0)) {
351
+      $_SESSION['boincimport_stage_selected'] = 'categories';
352
+    }
353
+    else {
354
+      $_SESSION['boincimport_stage_selected'] = 'topics';
355
+    }
356
+    break;
367 357
 
368
-    case 'posts':
369
-      boincimport_forum_posts();
370
-      if (!variable_get('boincimport_import_post_successful', 0)) {
371
-        $_SESSION['boincimport_stage_selected'] = 'posts';
372
-      }
373
-      else {
374
-        $_SESSION['boincimport_stage_selected'] = 'url';
375
-      }
376
-      break;
358
+  case 'topics':
359
+    boincimport_forum_topics();
360
+    if (!variable_get('boincimport_import_topic_successful', 0)) {
361
+      $_SESSION['boincimport_stage_selected'] = 'topics';
362
+    }
363
+    else {
364
+      $_SESSION['boincimport_stage_selected'] = 'posts';
365
+    }
366
+    break;
377 367
 
378
-    case 'team forums':
379
-      boincimport_team_forums();
380
-      if (!variable_get('boincimport_team_forum_successful', 0)) {
381
-        $_SESSION['boincimport_stage_selected'] = 'team forums';
382
-      }
383
-      else {
384
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
385
-      }
386
-      break;
368
+  case 'posts':
369
+    boincimport_forum_posts();
370
+    if (!variable_get('boincimport_import_post_successful', 0)) {
371
+      $_SESSION['boincimport_stage_selected'] = 'posts';
372
+    }
373
+    else {
374
+      $_SESSION['boincimport_stage_selected'] = 'url';
375
+    }
376
+    break;
387 377
 
388
-    case 'team topics':
389
-      boincimport_team_forum_topics();
390
-      if (!variable_get('boincimport_team_topic_successful', 0)) {
391
-        $_SESSION['boincimport_stage_selected'] = 'team topics';
392
-      }
393
-      else {
394
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
395
-      }
396
-      break;
378
+  case 'team forums':
379
+    boincimport_team_forums();
380
+    if (!variable_get('boincimport_team_forum_successful', 0)) {
381
+      $_SESSION['boincimport_stage_selected'] = 'team forums';
382
+    }
383
+    else {
384
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
385
+    }
386
+    break;
397 387
 
398
-    case 'team posts':
399
-      boincimport_team_forum_posts();
400
-      if (!variable_get('boincimport_team_post_successful', 0)) {
401
-        $_SESSION['boincimport_stage_selected'] = 'team posts';
402
-      }
403
-      else {
404
-        $_SESSION['boincimport_stage_selected'] = 'url';
405
-      }
406
-      break;
388
+  case 'team topics':
389
+    boincimport_team_forum_topics();
390
+    if (!variable_get('boincimport_team_topic_successful', 0)) {
391
+      $_SESSION['boincimport_stage_selected'] = 'team topics';
392
+    }
393
+    else {
394
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
395
+    }
396
+    break;
407 397
 
408
-    case 'url':
409
-      boincimport_replace_urls();
410
-      if (!variable_get('boincimport_replace_url_successful', 0)) {
411
-        $_SESSION['boincimport_stage_selected'] = 'url';
412
-      }
413
-      else {
414
-        drupal_set_message('Congratulations.  Import Finished');
415
-        drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
416
-        watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO);
417
-        unset($_SESSION['boincimport_stage_selected']);
418
-      }
419
-      break;
420
-    default:
421
-      $_SESSION['boincimport_stage_selected'] = 'users';
422
-      break;
398
+  case 'team posts':
399
+    boincimport_team_forum_posts();
400
+    if (!variable_get('boincimport_team_post_successful', 0)) {
401
+      $_SESSION['boincimport_stage_selected'] = 'team posts';
402
+    }
403
+    else {
404
+      $_SESSION['boincimport_stage_selected'] = 'url';
405
+    }
406
+    break;
407
+
408
+  case 'url':
409
+    boincimport_replace_urls();
410
+    if (!variable_get('boincimport_replace_url_successful', 0)) {
411
+      $_SESSION['boincimport_stage_selected'] = 'url';
412
+    }
413
+    else {
414
+      drupal_set_message('Congratulations.  Import Finished');
415
+      drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
416
+      watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO);
417
+      unset($_SESSION['boincimport_stage_selected']);
418
+    }
419
+    break;
420
+  default:
421
+    $_SESSION['boincimport_stage_selected'] = 'users';
422
+    break;
423 423
   }
424 424
 }
425 425
 
Please login to merge, or discard this patch.