Passed
Pull Request — master (#2980)
by Serghei
08:40
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/boincwork/boincwork.module 2 patches
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -180,12 +180,12 @@
 block discarded – undo
180 180
  */
181 181
 function boincwork_locale($op = 'groups', $group = NULL) {
182 182
   switch ($op) {
183
-    case 'groups':
184
-      return array('project' => bts('Project'));
185
-    case 'info':
186
-      $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
-      $info['project']['format'] = FALSE;
188
-      return $info;
183
+  case 'groups':
184
+    return array('project' => bts('Project'));
185
+  case 'info':
186
+    $info['project']['refresh callback'] = 'boincwork_locale_refresh';
187
+    $info['project']['format'] = FALSE;
188
+    return $info;
189 189
   }
190 190
 }
191 191
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -279,8 +279,7 @@  discard block
 block discarded – undo
279 279
         'href' => 'account/prefs/privacy/ignore_user/remove/'. $author->uid,
280 280
         'query' => 'destination=messages/view/' . $thread_id,
281 281
       );
282
-    }
283
-    else {
282
+    } else {
284 283
       $vars['message_actions']['ignore_user'] = array(
285 284
         'title' => bts('Ignore User', array(), NULL, 'boinc:ignore-user-add'),
286 285
         'href' => 'account/prefs/privacy/ignore_user/add/'. $author->uid,
@@ -387,8 +386,7 @@  discard block
 block discarded – undo
387 386
             }
388 387
             if (!$special) {
389 388
               $output .= "<td>{$value} {$pref_setting['#field_suffix']}</td>";
390
-            }
391
-            else {
389
+            } else {
392 390
               // The "very special" case where we merge two prefs
393 391
               $second_pref = $special_map[$name];
394 392
               $second_pref_setting = $prefs[$pref_set]['prefs']['advanced'][$category][$second_pref];
@@ -396,8 +394,7 @@  discard block
 block discarded – undo
396 394
               $output .= "<td>{$value} {$pref_setting['#field_suffix']} {$special_delimiter[$name]}" .
397 395
                 " {$second_value} {$second_pref_setting['#field_suffix']} </td>";
398 396
             }
399
-          }
400
-          else  {
397
+          } else {
401 398
             $output .= '<td>---</td>';
402 399
           }
403 400
         }
@@ -923,22 +920,19 @@  discard block
 block discarded – undo
923 920
         drupal_set_message(t('Host @id has been removed from your account.',
924 921
           array('@id' => $host_id)));
925 922
         drupal_goto('account/computers');
926
-      }
927
-      else {
923
+      } else {
928 924
         drupal_set_message(t('Host @id could not be deleted. Not sure why...',
929 925
           array('@id' => $host_id)), 'error'
930 926
         );
931 927
       }
932
-    }
933
-    else {
928
+    } else {
934 929
       drupal_set_message(t('Host @id cannot be deleted because it still has
935 930
         tasks associated with it. These tasks should be processed within the
936 931
         next few days, after which the host can be deleted.', 
937 932
         array('@id' => $host_id)), 'warning'
938 933
       );
939 934
     }
940
-  }
941
-  else {
935
+  } else {
942 936
     drupal_set_message(t('You are not the owner of host @id, so you cannot
943 937
       delete it.', 
944 938
       array('@id' => $host_id)), 'error'
@@ -986,15 +980,13 @@  discard block
 block discarded – undo
986 980
         bts('The location for this host has been updated.', array(), NULL, 'boinc:account-host-details')
987 981
         . bts('This will take effect next time the host contacts the project.', array(), NULL, 'boinc:account-host-details')
988 982
       );
989
-    }
990
-    else {
983
+    } else {
991 984
       drupal_set_message(
992 985
         bts('Unable to save changes to this host for some reason!', array(), NULL, 'boinc:account-host-details'),
993 986
         'error'
994 987
       );
995 988
     }
996
-  }
997
-  else {
989
+  } else {
998 990
     drupal_set_message(
999 991
       bts('You are not allowed to make changes to this host.', array(), NULL, 'boinc:account-host-details'),
1000 992
       'warning'
@@ -1129,8 +1121,7 @@  discard block
 block discarded – undo
1129 1121
       $venue = $active_venue;
1130 1122
       //unset($_SESSION['prefs venue']);
1131 1123
     }
1132
-  }
1133
-  else {
1124
+  } else {
1134 1125
     // Set the active venue to keep it selected between computing and project
1135 1126
     // preference pages
1136 1127
     $_SESSION['prefs venue'] = $venue;
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
     }
@@ -257,8 +254,7 @@  discard block
 block discarded – undo
257 254
       array('!unlock_it' => l(t('release the lock'),
258 255
         'admin/boinc/import/unlock')
259 256
       ), WATCHDOG_WARNING); 
260
-  }
261
-  else {
257
+  } else {
262 258
     $boincimport_functions = array(
263 259
       'users' => t('Import users'),
264 260
       'teams' => t('Import teams'),
@@ -293,8 +289,7 @@  discard block
 block discarded – undo
293 289
   // Lock the import process
294 290
   if (!variable_get('boincimport_process_locked', 0)) {
295 291
     variable_set('boincimport_process_locked', 1);
296
-  }
297
-  else {
292
+  } else {
298 293
     watchdog('boincimport', 'The import process is locked, but another process
299 294
       is trying to access it...', array(), WATCHDOG_WARNING); 
300 295
   }
@@ -308,8 +303,7 @@  discard block
 block discarded – undo
308 303
       boincimport_teams();
309 304
       if (!variable_get('boincimport_import_team_successful', 0)) {
310 305
         $_SESSION['boincimport_stage_selected'] = 'teams';
311
-      }
312
-      else {
306
+      } else {
313 307
         $_SESSION['boincimport_stage_selected'] = 'friends';
314 308
       }
315 309
       break;
@@ -318,8 +312,7 @@  discard block
 block discarded – undo
318 312
       boincimport_friends();
319 313
       if (!variable_get('boincimport_import_friend_successful', 0)) {
320 314
         $_SESSION['boincimport_stage_selected'] = 'friends';
321
-      }
322
-      else {
315
+      } else {
323 316
         $_SESSION['boincimport_stage_selected'] = 'preferences';
324 317
       }
325 318
       break;
@@ -328,8 +321,7 @@  discard block
 block discarded – undo
328 321
       boincimport_preferences();
329 322
       if (!variable_get('boincimport_import_preferences_successful', 0)) {
330 323
         $_SESSION['boincimport_stage_selected'] = 'preferences';
331
-      }
332
-      else {
324
+      } else {
333 325
         $_SESSION['boincimport_stage_selected'] = 'private messages';
334 326
       }
335 327
       break;
@@ -338,8 +330,7 @@  discard block
 block discarded – undo
338 330
       boincimport_private_msgs();
339 331
       if (!variable_get('boincimport_import_private_msg_successful', 0)) {
340 332
         $_SESSION['boincimport_stage_selected'] = 'private messages';
341
-      }
342
-      else {
333
+      } else {
343 334
         $_SESSION['boincimport_stage_selected'] = 'categories';
344 335
       }
345 336
       break;
@@ -348,8 +339,7 @@  discard block
 block discarded – undo
348 339
       boincimport_forum_categories();
349 340
       if (!variable_get('boincimport_import_category_successful', 0)) {
350 341
         $_SESSION['boincimport_stage_selected'] = 'categories';
351
-      }
352
-      else {
342
+      } else {
353 343
         $_SESSION['boincimport_stage_selected'] = 'topics';
354 344
       }
355 345
       break;
@@ -358,8 +348,7 @@  discard block
 block discarded – undo
358 348
       boincimport_forum_topics();
359 349
       if (!variable_get('boincimport_import_topic_successful', 0)) {
360 350
         $_SESSION['boincimport_stage_selected'] = 'topics';
361
-      }
362
-      else {
351
+      } else {
363 352
         $_SESSION['boincimport_stage_selected'] = 'posts';
364 353
       }
365 354
       break;
@@ -368,8 +357,7 @@  discard block
 block discarded – undo
368 357
       boincimport_forum_posts();
369 358
       if (!variable_get('boincimport_import_post_successful', 0)) {
370 359
         $_SESSION['boincimport_stage_selected'] = 'posts';
371
-      }
372
-      else {
360
+      } else {
373 361
         $_SESSION['boincimport_stage_selected'] = 'url';
374 362
       }
375 363
       break;
@@ -378,8 +366,7 @@  discard block
 block discarded – undo
378 366
       boincimport_team_forums();
379 367
       if (!variable_get('boincimport_team_forum_successful', 0)) {
380 368
         $_SESSION['boincimport_stage_selected'] = 'team forums';
381
-      }
382
-      else {
369
+      } else {
383 370
         $_SESSION['boincimport_stage_selected'] = 'team topics';
384 371
       }
385 372
       break;
@@ -388,8 +375,7 @@  discard block
 block discarded – undo
388 375
       boincimport_team_forum_topics();
389 376
       if (!variable_get('boincimport_team_topic_successful', 0)) {
390 377
         $_SESSION['boincimport_stage_selected'] = 'team topics';
391
-      }
392
-      else {
378
+      } else {
393 379
         $_SESSION['boincimport_stage_selected'] = 'team posts';
394 380
       }
395 381
       break;
@@ -398,8 +384,7 @@  discard block
 block discarded – undo
398 384
       boincimport_team_forum_posts();
399 385
       if (!variable_get('boincimport_team_post_successful', 0)) {
400 386
         $_SESSION['boincimport_stage_selected'] = 'team posts';
401
-      }
402
-      else {
387
+      } else {
403 388
         $_SESSION['boincimport_stage_selected'] = 'url';
404 389
       }
405 390
       break;
@@ -408,8 +393,7 @@  discard block
 block discarded – undo
408 393
       boincimport_replace_urls();
409 394
       if (!variable_get('boincimport_replace_url_successful', 0)) {
410 395
         $_SESSION['boincimport_stage_selected'] = 'url';
411
-      }
412
-      else {
396
+      } else {
413 397
         drupal_set_message('Congratulations.  Import Finished');
414 398
         drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page');
415 399
         watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); 
@@ -478,8 +462,7 @@  discard block
 block discarded – undo
478 462
       ORDER BY id ASC'
479 463
     );
480 464
     $user_count = mysql_num_rows($boinc_accounts);
481
-  }
482
-  else {
465
+  } else {
483 466
     // Need to import any user who is currently ignored in order to keep them
484 467
     // ignored... not particularly clean (ignored users are stored in a string)
485 468
     $ignored_user_list = array(0);
@@ -555,8 +538,7 @@  discard block
 block discarded – undo
555 538
      if (isset($existing_users[$boinc_account->id])) {
556 539
       // This user has already been imported
557 540
       $duplicates[] = $boinc_account->id;
558
-    }
559
-    else {
541
+    } else {
560 542
       $operations[] = array(
561 543
         'boincimport_users_op', array(
562 544
           $boinc_account->id
@@ -612,8 +594,7 @@  discard block
 block discarded – undo
612 594
     // Store some result for post-processing in the finished callback.
613 595
     $context['results']['success'][] = $boinc_id;
614 596
     $message = "Successfully imported user {$boinc_id}";
615
-  }
616
-  else {
597
+  } else {
617 598
     $context['results']['failure'][] = $boinc_id;
618 599
     $message = "Failed to import user {$boinc_id}!";
619 600
     watchdog('boincimport',
@@ -630,8 +611,7 @@  discard block
 block discarded – undo
630 611
   // Update the progress for the batch engine
631 612
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
632 613
     $context['finished'] = 1;
633
-  }
634
-  else {
614
+  } else {
635 615
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
636 616
   }
637 617
 }
@@ -656,8 +636,7 @@  discard block
 block discarded – undo
656 636
     // Set the user import successful flag in the variable table
657 637
     variable_set('boincimport_import_user_successful', '1');
658 638
     $_SESSION['boincimport_stage_selected'] = 'teams';
659
-  }
660
-  else {
639
+  } else {
661 640
     // An error occurred.
662 641
     // $operations contains the operations that remained unprocessed.
663 642
     $error_operation = reset($operations);
@@ -719,8 +698,7 @@  discard block
 block discarded – undo
719 698
         $team_type = array(
720 699
           'tid' => $team_type_id
721 700
         );
722
-      }
723
-      else {
701
+      } else {
724 702
         if (!$name) continue;
725 703
         $team_type = array(
726 704
           'name' => strip_tags($name),
@@ -783,8 +761,7 @@  discard block
 block discarded – undo
783 761
      if (isset($existing_teams[$boinc_team->id])) {
784 762
       // This team has already been imported
785 763
       $duplicates[] = $boinc_team->id;
786
-    }
787
-    else {
764
+    } else {
788 765
       $operations[] = array(
789 766
         'boincimport_teams_op', array(
790 767
           $boinc_team
@@ -825,8 +802,7 @@  discard block
 block discarded – undo
825 802
     // Store some result for post-processing in the finished callback.
826 803
     $context['results']['success'][] = $boincteam->id;
827 804
     $message = "Successfully imported team {$boincteam->id}";
828
-  }
829
-  else {
805
+  } else {
830 806
     $context['results']['failure'][] = $boincteam->id;
831 807
     $message = "Failed to import team {$boincteam->id}!";
832 808
     watchdog('boincimport',
@@ -843,8 +819,7 @@  discard block
 block discarded – undo
843 819
   // Update the progress for the batch engine
844 820
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
845 821
     $context['finished'] = 1;
846
-  }
847
-  else {
822
+  } else {
848 823
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
849 824
   }
850 825
 }
@@ -867,8 +842,7 @@  discard block
 block discarded – undo
867 842
     // Set the team import successful flag in the variable table
868 843
     variable_set('boincimport_import_team_successful', '1');
869 844
     $_SESSION['boincimport_stage_selected'] = 'friends';
870
-  }
871
-  else {
845
+  } else {
872 846
     // An error occurred.
873 847
     // $operations contains the operations that remained unprocessed.
874 848
     $error_operation = reset($operations);
@@ -989,8 +963,7 @@  discard block
 block discarded – undo
989 963
       SET uid = '%d', friend_uid = '%d', created = '%d'",
990 964
       $uid, $friend_uid, $friendship->create_time
991 965
     );
992
-  }
993
-  else {
966
+  } else {
994 967
     $boinc_id = ($uid) ? $friendship->user_dest : $friendship->user_src;
995 968
     $message = "No Drupal account exists for BOINC user {$boinc_id}!";
996 969
   }
@@ -999,8 +972,7 @@  discard block
 block discarded – undo
999 972
     // Store some result for post-processing in the finished callback.
1000 973
     $context['results']['success'][] = $uid;
1001 974
     $message = "Successfully made users {$uid} and {$friend_uid} friends";
1002
-  }
1003
-  else {
975
+  } else {
1004 976
     $context['results']['failure'][] = $uid;
1005 977
     if (!$message) {
1006 978
       $message = "Failed to make users {$uid} and {$friend_uid} friends!";
@@ -1016,8 +988,7 @@  discard block
 block discarded – undo
1016 988
   // Update the progress for the batch engine
1017 989
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1018 990
     $context['finished'] = 1;
1019
-  }
1020
-  else {
991
+  } else {
1021 992
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1022 993
   }
1023 994
 }
@@ -1041,8 +1012,7 @@  discard block
 block discarded – undo
1041 1012
     // Set the friend import successful flag in the variable table
1042 1013
     variable_set('boincimport_import_friend_successful', '1');
1043 1014
     $_SESSION['boincimport_stage_selected'] = 'preferences';
1044
-  }
1045
-  else {
1015
+  } else {
1046 1016
     // An error occurred.
1047 1017
     // $operations contains the operations that remained unprocessed.
1048 1018
     $error_operation = reset($operations);
@@ -1166,8 +1136,7 @@  discard block
 block discarded – undo
1166 1136
     );
1167 1137
     if ($user_ignored) {
1168 1138
       $success = TRUE;
1169
-    }
1170
-    else {
1139
+    } else {
1171 1140
       $context['results']['warning'][] = "{$uid}:{$ignored_user_uid}";
1172 1141
       watchdog('boincimport',
1173 1142
         'Could not add user @ignored_uid to the ignore list of user @uid',
@@ -1182,8 +1151,7 @@  discard block
 block discarded – undo
1182 1151
     // Store some result for post-processing in the finished callback.
1183 1152
     $context['results']['success'][] = $uid;
1184 1153
     $message = "Successfully imported ignored users for user {$uid}";
1185
-  }
1186
-  else {
1154
+  } else {
1187 1155
     $context['results']['failure'][] = $uid;
1188 1156
     $message = "Failed to import any user filter preferences for user {$uid}!";
1189 1157
     watchdog('boincimport',
@@ -1200,8 +1168,7 @@  discard block
 block discarded – undo
1200 1168
   // Update the progress for the batch engine
1201 1169
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1202 1170
     $context['finished'] = 1;
1203
-  }
1204
-  else {
1171
+  } else {
1205 1172
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1206 1173
   }
1207 1174
 }
@@ -1226,8 +1193,7 @@  discard block
 block discarded – undo
1226 1193
     // Set the preference import successful flag in the variable table
1227 1194
     variable_set('boincimport_import_preferences_successful', '1');
1228 1195
     $_SESSION['boincimport_stage_selected'] = 'private messages';
1229
-  }
1230
-  else {
1196
+  } else {
1231 1197
     // An error occurred.
1232 1198
     // $operations contains the operations that remained unprocessed.
1233 1199
     $error_operation = reset($operations);
@@ -1361,8 +1327,7 @@  discard block
 block discarded – undo
1361 1327
     // Store some result for post-processing in the finished callback.
1362 1328
     $context['results']['success'][] = $pm->id;
1363 1329
     $message = "Successfully imported private message {$pm->id}";
1364
-  }
1365
-  else {
1330
+  } else {
1366 1331
     $context['results']['failure'][] = $pm->id;
1367 1332
     $message = "Failed to import private message {$pm->id}!";
1368 1333
     watchdog('boincimport',
@@ -1379,8 +1344,7 @@  discard block
 block discarded – undo
1379 1344
   // Update the progress for the batch engine
1380 1345
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1381 1346
     $context['finished'] = 1;
1382
-  }
1383
-  else {
1347
+  } else {
1384 1348
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1385 1349
   }
1386 1350
 }
@@ -1403,8 +1367,7 @@  discard block
 block discarded – undo
1403 1367
     // Set the private message import successful flag in the variable table
1404 1368
     variable_set('boincimport_import_private_msg_successful', '1');
1405 1369
     $_SESSION['boincimport_stage_selected'] = 'categories';
1406
-  }
1407
-  else {
1370
+  } else {
1408 1371
     // An error occurred.
1409 1372
     // $operations contains the operations that remained unprocessed.
1410 1373
     $error_operation = reset($operations);
@@ -1557,8 +1520,7 @@  discard block
 block discarded – undo
1557 1520
     if (in_array($boinc_forum_category->name, $existing_categories)) {
1558 1521
       // This category has already been imported
1559 1522
       $duplicate_categories[] = $boinc_forum_category->name;
1560
-    }
1561
-    else {
1523
+    } else {
1562 1524
       $operations[] = array(
1563 1525
         'boincimport_forum_categories_op', array(
1564 1526
           $boinc_forum_category, $forum_vid, $pre, FALSE
@@ -1572,8 +1534,7 @@  discard block
 block discarded – undo
1572 1534
      if (isset($existing_forums[$boinc_forum->id])) {
1573 1535
       // This forum has already been imported
1574 1536
       $duplicates[] = $boinc_forum->id;
1575
-    }
1576
-    else {
1537
+    } else {
1577 1538
       $operations[] = array(
1578 1539
         'boincimport_forums_op', array(
1579 1540
           $boinc_forum, $forum_vid, $pre
@@ -1640,8 +1601,7 @@  discard block
 block discarded – undo
1640 1601
     $category->name = 'Hidden';
1641 1602
     $category->id = 0;
1642 1603
     $hidden = TRUE;
1643
-  }
1644
-  else {
1604
+  } else {
1645 1605
     // If this container is empty, put it into the hidden container
1646 1606
     db_set_active('boinc_rw');
1647 1607
     $forums_contained = db_result(db_query('
@@ -1684,13 +1644,11 @@  discard block
 block discarded – undo
1684 1644
     // Store some result for post-processing in the finished callback.
1685 1645
     if (!$category AND $create_hidden) {
1686 1646
       $message = "Created special hidden container";
1687
-    }
1688
-    else {
1647
+    } else {
1689 1648
       $context['results']['categories']['success'][] = $category->id;
1690 1649
       $message = "Successfully imported container {$category->id}";
1691 1650
     }
1692
-  }
1693
-  else {
1651
+  } else {
1694 1652
     $context['results']['categories']['failure'][] = $category->id;
1695 1653
     $message = "Failed to import container {$category->id}!";
1696 1654
     watchdog('boincimport',
@@ -1707,8 +1665,7 @@  discard block
 block discarded – undo
1707 1665
   // Update the progress for the batch engine
1708 1666
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1709 1667
     $context['finished'] = 1;
1710
-  }
1711
-  else {
1668
+  } else {
1712 1669
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1713 1670
   }
1714 1671
 }
@@ -1744,8 +1701,7 @@  discard block
 block discarded – undo
1744 1701
     // Save the ID of the News forum for later import
1745 1702
     variable_set('boincimport_news_forum_id', $forum_id);
1746 1703
     $success = TRUE;
1747
-  }
1748
-  else {
1704
+  } else {
1749 1705
     // Save all other forums as taxonomy terms
1750 1706
     $forum = array(
1751 1707
       'name' => $name,
@@ -1771,8 +1727,7 @@  discard block
 block discarded – undo
1771 1727
     // Store some result for post-processing in the finished callback.
1772 1728
     $context['results']['forums']['success'][] = $forum_id;
1773 1729
     $message = "Successfully imported forum {$forum_id}";
1774
-  }
1775
-  else {
1730
+  } else {
1776 1731
     $context['results']['forums']['failure'][] = $forum_id;
1777 1732
     $message = "Failed to import forum {$forum_id}!";
1778 1733
   }
@@ -1785,8 +1740,7 @@  discard block
 block discarded – undo
1785 1740
   // Update the progress for the batch engine
1786 1741
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
1787 1742
     $context['finished'] = 1;
1788
-  }
1789
-  else {
1743
+  } else {
1790 1744
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
1791 1745
   }
1792 1746
 }
@@ -1887,8 +1841,7 @@  discard block
 block discarded – undo
1887 1841
     // Set the forum import successful flag in the variable table
1888 1842
     variable_set('boincimport_import_forum_successful', '1');
1889 1843
     $_SESSION['boincimport_stage_selected'] = 'topics';
1890
-  }
1891
-  else {
1844
+  } else {
1892 1845
     // An error occurred.
1893 1846
     // $operations contains the operations that remained unprocessed.
1894 1847
     $error_operation = reset($operations);
@@ -2042,9 +1995,7 @@  discard block
 block discarded – undo
2042 1995
     
2043 1996
     if ($duplicate OR !$post) {
2044 1997
       $success = FALSE;
2045
-    }
2046
-    
2047
-    else {
1998
+    } else {
2048 1999
       // Get the user and term IDs along with other data to define the topic
2049 2000
       $uid = boincuser_lookup_uid($topic->owner);
2050 2001
       $tid = db_result(db_query('
@@ -2108,12 +2059,10 @@  discard block
 block discarded – undo
2108 2059
           if (!$success) {
2109 2060
             $error_detail = 'topic imported, but failed to set last comment timestamp';
2110 2061
           }
2111
-        }
2112
-        else {
2062
+        } else {
2113 2063
           $error_detail = 'topic node saved, but failed to link in boincimport_temp_topic table';
2114 2064
         }
2115
-      }
2116
-      else {
2065
+      } else {
2117 2066
         $error_detail = 'failed to save topic node to database';
2118 2067
       }
2119 2068
     }
@@ -2124,16 +2073,13 @@  discard block
 block discarded – undo
2124 2073
       // Store some result for post-processing in the finished callback.
2125 2074
       $context['results']['success'][] = $topic->id;
2126 2075
       $message = "Successfully imported topic {$topic->id}";
2127
-    }
2128
-    elseif ($duplicate) {
2076
+    } elseif ($duplicate) {
2129 2077
       $context['results']['duplicate'][] = $topic->id;
2130 2078
       $message = "Topic {$topic->id} was already imported";
2131
-    }
2132
-    elseif (!$post) {
2079
+    } elseif (!$post) {
2133 2080
       $context['results']['empty'][] = $topic->id;
2134 2081
       $message = "Skipping topic {$topic->id} as empty";
2135
-    }
2136
-    else {
2082
+    } else {
2137 2083
       $context['results']['failure'][] = $topic->id;
2138 2084
       $message = "Failed to import topic {$topic->id}!";
2139 2085
       watchdog('boincimport',
@@ -2154,8 +2100,7 @@  discard block
 block discarded – undo
2154 2100
     // Update the progress for the batch engine
2155 2101
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2156 2102
       $context['finished'] = 1;
2157
-    }
2158
-    else {
2103
+    } else {
2159 2104
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2160 2105
     }
2161 2106
   }
@@ -2189,8 +2134,7 @@  discard block
 block discarded – undo
2189 2134
     // Set the topic import successful flag in the variable table
2190 2135
     variable_set('boincimport_import_topic_successful', '1');
2191 2136
     $_SESSION['boincimport_stage_selected'] = 'posts';
2192
-  }
2193
-  else {
2137
+  } else {
2194 2138
     // An error occurred.
2195 2139
     // $operations contains the operations that remained unprocessed.
2196 2140
     $error_operation = reset($operations);
@@ -2438,18 +2382,15 @@  discard block
 block discarded – undo
2438 2382
           if ($success) {
2439 2383
             $posts_imported++;
2440 2384
             $context['results']['posts']['success'][] = $post->id;
2441
-          }
2442
-          else {
2385
+          } else {
2443 2386
             $context['results']['posts']['failure'][] = $post->id;
2444 2387
             $error_posts++;
2445 2388
           }
2446
-        }
2447
-        else {
2389
+        } else {
2448 2390
           $context['results']['posts']['failure'][] = $post->id;
2449 2391
           $error_posts++;
2450 2392
         }
2451
-      }
2452
-      else {
2393
+      } else {
2453 2394
         $context['results']['posts']['empty'][] = $post->id;
2454 2395
         $empty_posts++;
2455 2396
       }
@@ -2460,8 +2401,7 @@  discard block
 block discarded – undo
2460 2401
       // Store some result for post-processing in the finished callback.
2461 2402
       $context['results']['success'][] = $boinc_topic->id;
2462 2403
       $message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id}";
2463
-    }
2464
-    else {
2404
+    } else {
2465 2405
       $context['results']['failure'][] = $boinc_topic->id;
2466 2406
       $message = "Failed to import any posts for topic {$boinc_topic->id} (excluded {$error_posts} errors, {$duplicate_posts} duplicates, and {$empty_posts} empty)";
2467 2407
       watchdog('boincimport', 'Failed to import any posts for topic @id (excluded @error_posts errors, @duplicate_posts duplicates, and @empty_posts empty)', 
@@ -2482,8 +2422,7 @@  discard block
 block discarded – undo
2482 2422
     // Update the progress for the batch engine
2483 2423
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2484 2424
       $context['finished'] = 1;
2485
-    }
2486
-    else {
2425
+    } else {
2487 2426
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2488 2427
     }
2489 2428
   }
@@ -2523,8 +2462,7 @@  discard block
 block discarded – undo
2523 2462
     // Set the post import successful flag in the variable table
2524 2463
     variable_set('boincimport_import_post_successful', '1');
2525 2464
     $_SESSION['boincimport_stage_selected'] = 'team forums';
2526
-  }
2527
-  else {
2465
+  } else {
2528 2466
     // An error occurred.
2529 2467
     // $operations contains the operations that remained unprocessed.
2530 2468
     $error_operation = reset($operations);
@@ -2611,8 +2549,7 @@  discard block
 block discarded – undo
2611 2549
      if (isset($existing_team_forums[$boincteam_forum->id])) {
2612 2550
       // This team has already been imported
2613 2551
       $duplicates[] = $boincteam_forum->id;
2614
-    }
2615
-    else {
2552
+    } else {
2616 2553
       $operations[] = array(
2617 2554
         'boincimport_team_forums_op', array(
2618 2555
           $boincteam_forum
@@ -2678,8 +2615,7 @@  discard block
 block discarded – undo
2678 2615
     // Store some result for post-processing in the finished callback.
2679 2616
     $context['results']['success'][] = $forum_id;
2680 2617
     $message = "Successfully imported team forum {$forum_id}";
2681
-  }
2682
-  else {
2618
+  } else {
2683 2619
     $context['results']['failure'][] = $forum_id;
2684 2620
     $message = "Failed to import team forum {$forum_id}!";
2685 2621
     watchdog('boincimport',
@@ -2696,8 +2632,7 @@  discard block
 block discarded – undo
2696 2632
   // Update the progress for the batch engine
2697 2633
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2698 2634
     $context['finished'] = 1;
2699
-  }
2700
-  else {
2635
+  } else {
2701 2636
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2702 2637
   }
2703 2638
 }
@@ -2720,8 +2655,7 @@  discard block
 block discarded – undo
2720 2655
     // Set the team forum import successful flag in the variable table
2721 2656
     variable_set('boincimport_import_team_forum_successful', '1');
2722 2657
     $_SESSION['boincimport_stage_selected'] = 'team topics';
2723
-  }
2724
-  else {
2658
+  } else {
2725 2659
     // An error occurred.
2726 2660
     // $operations contains the operations that remained unprocessed.
2727 2661
     $error_operation = reset($operations);
@@ -2816,8 +2750,7 @@  discard block
 block discarded – undo
2816 2750
      if (isset($existing_team_topics[$boincteam_topic->id])) {
2817 2751
       // This team topic has already been imported
2818 2752
       $duplicates[] = $boincteam_topic->id;
2819
-    }
2820
-    else {
2753
+    } else {
2821 2754
       $operations[] = array(
2822 2755
         'boincimport_team_topics_op', array(
2823 2756
           $boincteam_topic
@@ -2864,8 +2797,7 @@  discard block
 block discarded – undo
2864 2797
   ));
2865 2798
   if (!$team_forum_id) {
2866 2799
     $missing_parent[] = $topic->id;
2867
-  }
2868
-  else {
2800
+  } else {
2869 2801
     // Get the content of the post that started the topic
2870 2802
     db_set_active('boinc_rw');
2871 2803
     $query = db_query('
@@ -2882,8 +2814,7 @@  discard block
 block discarded – undo
2882 2814
       // Empty topics should have already been filtered out of the import, so
2883 2815
       // consider this an error condition
2884 2816
       $empty_topics[] = $topic->id;
2885
-    }
2886
-    else {
2817
+    } else {
2887 2818
       // Get the user ID along with other data to define the topic
2888 2819
       $uid = boincuser_lookup_uid($topic->owner);
2889 2820
        if (!$topic->owner) {
@@ -2947,8 +2878,7 @@  discard block
 block discarded – undo
2947 2878
     // Store some result for post-processing in the finished callback.
2948 2879
     $context['results']['success'][] = $topic->id;
2949 2880
     $message = "Successfully imported team topic {$topic->id}";
2950
-  }
2951
-  else {
2881
+  } else {
2952 2882
     $context['results']['failure'][] = $topic->id;
2953 2883
     $message = "Failed to import team topic {$topic->id}!";
2954 2884
     watchdog('boincimport',
@@ -2965,8 +2895,7 @@  discard block
 block discarded – undo
2965 2895
   // Update the progress for the batch engine
2966 2896
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
2967 2897
     $context['finished'] = 1;
2968
-  }
2969
-  else {
2898
+  } else {
2970 2899
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
2971 2900
   }
2972 2901
 }
@@ -2989,8 +2918,7 @@  discard block
 block discarded – undo
2989 2918
     // Set the BLAH import successful flag in the variable table
2990 2919
     variable_set('boincimport_import_team_topic_successful', '1');
2991 2920
     $_SESSION['boincimport_stage_selected'] = 'team posts';
2992
-  }
2993
-  else {
2921
+  } else {
2994 2922
     // An error occurred.
2995 2923
     // $operations contains the operations that remained unprocessed.
2996 2924
     $error_operation = reset($operations);
@@ -3112,8 +3040,7 @@  discard block
 block discarded – undo
3112 3040
       if (isset($existing_posts[$boincteam_post->id])) {
3113 3041
         // This post has already been imported
3114 3042
         $duplicates[] = $boincteam_post->id;
3115
-      }
3116
-      else {
3043
+      } else {
3117 3044
         $operations[] = array(
3118 3045
           'boincimport_team_posts_op', array(
3119 3046
             $boincteam_post
@@ -3229,8 +3156,7 @@  discard block
 block discarded – undo
3229 3156
     // Store some result for post-processing in the finished callback.
3230 3157
     $context['results']['success'][] = $post->id;
3231 3158
     $message = "Successfully imported team post {$post->id}";
3232
-  }
3233
-  else {
3159
+  } else {
3234 3160
     $context['results']['failure'][] = $post->id;
3235 3161
     $message = "Failed to import team post {$post->id}!";
3236 3162
     watchdog('boincimport',
@@ -3247,8 +3173,7 @@  discard block
 block discarded – undo
3247 3173
   // Update the progress for the batch engine
3248 3174
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3249 3175
     $context['finished'] = 1;
3250
-  }
3251
-  else {
3176
+  } else {
3252 3177
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3253 3178
   }
3254 3179
 }
@@ -3271,8 +3196,7 @@  discard block
 block discarded – undo
3271 3196
     // Set the team post import successful flag in the variable table
3272 3197
     variable_set('boincimport_import_team_post_successful', '1');
3273 3198
     $_SESSION['boincimport_stage_selected'] = 'url';
3274
-  }
3275
-  else {
3199
+  } else {
3276 3200
     // An error occurred.
3277 3201
     // $operations contains the operations that remained unprocessed.
3278 3202
     $error_operation = reset($operations);
@@ -3378,8 +3302,7 @@  discard block
 block discarded – undo
3378 3302
     $context['results']['success'][] = $boincuser_id;
3379 3303
     $context['results']['subscriptions'][$boincuser_id] = $count;
3380 3304
     $message = "Successfully imported {$count} subscriptions for user {$boincuser_id}";
3381
-  }
3382
-  else {
3305
+  } else {
3383 3306
     $context['results']['failure'][] = $boincuser_id;
3384 3307
     $message = "Failed to import subscriptions for user {$boincuser_id}!";
3385 3308
     watchdog('boincimport',
@@ -3396,8 +3319,7 @@  discard block
 block discarded – undo
3396 3319
   // Update the progress for the batch engine
3397 3320
   if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3398 3321
     $context['finished'] = 1;
3399
-  }
3400
-  else {
3322
+  } else {
3401 3323
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3402 3324
   }
3403 3325
 }
@@ -3422,8 +3344,7 @@  discard block
 block discarded – undo
3422 3344
     // Set the subscription import successful flag in the variable table
3423 3345
     variable_set('boincimport_import_subscription_successful', '1');
3424 3346
     $_SESSION['boincimport_stage_selected'] = 'url';
3425
-  }
3426
-  else {
3347
+  } else {
3427 3348
     // An error occurred.
3428 3349
     // $operations contains the operations that remained unprocessed.
3429 3350
     $error_operation = reset($operations);
@@ -3601,8 +3522,7 @@  discard block
 block discarded – undo
3601 3522
       // Store some result for post-processing in the finished callback.
3602 3523
       $context['results']['nodes']['updated'][] = $node->nid;
3603 3524
       $message = "Successfully updated node {$node->nid}";
3604
-    }
3605
-    else {
3525
+    } else {
3606 3526
       $message = "No changes made to node {$node->nid}!";
3607 3527
     }
3608 3528
     
@@ -3614,8 +3534,7 @@  discard block
 block discarded – undo
3614 3534
     // Update the progress for the batch engine
3615 3535
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3616 3536
       $context['finished'] = 1;
3617
-    }
3618
-    else {
3537
+    } else {
3619 3538
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3620 3539
     }
3621 3540
   }
@@ -3665,8 +3584,7 @@  discard block
 block discarded – undo
3665 3584
       // Store some result for post-processing in the finished callback.
3666 3585
       $context['results']['comments']['updated'][] = $comment->cid;
3667 3586
       $message = "Successfully updated comment {$comment->cid}";
3668
-    }
3669
-    else {
3587
+    } else {
3670 3588
       $message = "No changes made to comment {$comment->cid}!";
3671 3589
     }
3672 3590
     
@@ -3678,8 +3596,7 @@  discard block
 block discarded – undo
3678 3596
     // Update the progress for the batch engine
3679 3597
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3680 3598
       $context['finished'] = 1;
3681
-    }
3682
-    else {
3599
+    } else {
3683 3600
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3684 3601
     }
3685 3602
   }
@@ -3728,8 +3645,7 @@  discard block
 block discarded – undo
3728 3645
       // Store some result for post-processing in the finished callback.
3729 3646
       $context['results']['pm']['updated'][] = $pm->mid;
3730 3647
       $message = "Successfully updated private message {$pm->mid}";
3731
-    }
3732
-    else {
3648
+    } else {
3733 3649
       $message = "No changes made to private message {$pm->mid}!";
3734 3650
     }
3735 3651
     
@@ -3741,8 +3657,7 @@  discard block
 block discarded – undo
3741 3657
     // Update the progress for the batch engine
3742 3658
     if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
3743 3659
       $context['finished'] = 1;
3744
-    }
3745
-    else {
3660
+    } else {
3746 3661
       $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
3747 3662
     }
3748 3663
   }
@@ -3807,8 +3722,7 @@  discard block
 block discarded – undo
3807 3722
     // Set the replace URLs successful flag in the variable table
3808 3723
     variable_set('boincimport_replace_urls_successful', '1');
3809 3724
     $_SESSION['boincimport_stage_selected'] = 'users';
3810
-  }
3811
-  else {
3725
+  } else {
3812 3726
     // An error occurred.
3813 3727
     // $operations contains the operations that remained unprocessed.
3814 3728
     $error_operation = reset($operations);
@@ -3910,7 +3824,8 @@  discard block
 block discarded – undo
3910 3824
   $score = 0; // 0 default value, comments get higher score depending on the author's roles
3911 3825
   $users = serialize(array(0 => 1));  // default value for everybody!!
3912 3826
   
3913
-  if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too
3827
+  if ($edit['uid'] === $user->uid) {
3828
+// '===' because we want to modify anonymous users too
3914 3829
     $edit['name'] = $user->name;
3915 3830
   }
3916 3831
 
@@ -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/boinc_standard/boinc_standard.features.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,17 +7,13 @@
 block discarded – undo
7 7
   list($module, $api) = func_get_args();
8 8
   if ($module == "input_formats" && $api == "input_formats") {
9 9
     return array("version" => 1);
10
-  }
11
-  elseif ($module == "page_manager" && $api == "pages_default") {
10
+  } elseif ($module == "page_manager" && $api == "pages_default") {
12 11
     return array("version" => 1);
13
-  }
14
-  elseif ($module == "panels_mini" && $api == "panels_default") {
12
+  } elseif ($module == "panels_mini" && $api == "panels_default") {
15 13
     return array("version" => 1);
16
-  }
17
-  elseif ($module == "strongarm" && $api == "strongarm") {
14
+  } elseif ($module == "strongarm" && $api == "strongarm") {
18 15
     return array("version" => 1);
19
-  }
20
-  elseif ($module == "wysiwyg" && $api == "wysiwyg") {
16
+  } elseif ($module == "wysiwyg" && $api == "wysiwyg") {
21 17
     return array("version" => 2);
22 18
   }
23 19
 }
Please login to merge, or discard this patch.