Completed
Push — 7.x-3.x ( 6dc8b5...4e7c1f )
by Devin
02:16
created
commons_bw/includes/views/handlers/commons_bw_handler_node_partial_form.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
     $permission = "create $bundle content";
34 34
     if ($group_id && !og_user_access('node', $group_id, $permission)) {
35 35
       return;
36
-    }
37
-    elseif (!user_access($permission)) {
36
+    } elseif (!user_access($permission)) {
38 37
       return;
39 38
     }
40 39
 
Please login to merge, or discard this patch.
modules/commons/commons_bw/commons_bw.module 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -118,11 +118,9 @@  discard block
 block discarded – undo
118 118
 
119 119
   if(!empty($form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'])) {
120 120
     $display_default = $form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'];
121
-  }
122
-  else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) {
121
+  } else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) {
123 122
     $display_default = $form_state['build_info']['args'][0]['display_in_partial_form'];
124
-  }
125
-  else {
123
+  } else {
126 124
     $display_default = FALSE;
127 125
   }
128 126
 
@@ -174,13 +172,11 @@  discard block
 block discarded – undo
174 172
   if (module_exists('locale')) {
175 173
     if (locale_multilingual_node_type($node->type)) {
176 174
       $node->language = $language->language;
177
-    }
178
-    else {
175
+    } else {
179 176
       $default = language_default();
180 177
       $node->language = $default->language;
181 178
     }
182
-  }
183
-  else {
179
+  } else {
184 180
     $node->language = LANGUAGE_NONE;
185 181
   }
186 182
 
Please login to merge, or discard this patch.
modules/commons/commons_search/commons_search.module 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@  discard block
 block discarded – undo
44 44
       // We're using faceted core search, so change Site search key to reflect
45 45
       // the change of search engines.
46 46
       $site_key = 'o-search_facetapi';
47
-    }
48
-    else {
47
+    } else {
49 48
       if (module_exists('apachesolr_search')) {
50 49
         // Are we using Apache Solr? If so change the Site search key to reflect
51 50
         // the change of search engines.
@@ -106,14 +105,12 @@  discard block
 block discarded – undo
106 105
       // specified group.
107 106
       $qm = (strpos($form_state['redirect'], '?') !== FALSE ? '' : '?');
108 107
       $form_state['redirect'] .= $qm . '&f[1]=sm_og_group_ref:node:' . $form_state['search_group_id'];
109
-    }
110
-    else {
108
+    } else {
111 109
       // Using core search to search within a group doesn't work, so we simply
112 110
       // use a view with exposed search terms to do the searching.
113 111
       drupal_goto('search/group/' . $form_state['search_group_id'], array('query' => array('keys' => $keys)));
114 112
     }
115
-  }
116
-  else {
113
+  } else {
117 114
     if ($form_state['values']['custom_search_types'] == 'c-user') {
118 115
       // Force update the redirect on User search since Custom Search is weird.
119 116
       $keys = check_plain($form_state['values']['search_block_form']);
Please login to merge, or discard this patch.
modules/commons/commons_groups/commons_groups.module 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
       set, an administrator can dismiss the update notice.") . '</p>';
72 72
     if ($path == 'admin/content/groups/update') {
73 73
       return $message;
74
-    }
75
-    elseif ($arg[0] == 'node' && $arg[2] == 'edit') {
74
+    } elseif ($arg[0] == 'node' && $arg[2] == 'edit') {
76 75
       $node = menu_get_object();
77 76
       if($node->type == 'group' && empty($node->field_og_subscribe_settings)) {
78 77
         return $message;
@@ -178,11 +177,9 @@  discard block
 block discarded – undo
178 177
 
179 178
   if (!empty($permissions['subscribe without approval'])) {
180 179
     $subscribe_type = 'anyone';
181
-  }
182
-  elseif (!empty($permissions['subscribe'])) {
180
+  } elseif (!empty($permissions['subscribe'])) {
183 181
     $subscribe_type = 'approval';
184
-  }
185
-  else {
182
+  } else {
186 183
     $subscribe_type = 'invitation';
187 184
   }
188 185
 
@@ -313,8 +310,7 @@  discard block
 block discarded – undo
313 310
       $topics_text .= '!topic-' . $topic->tid;
314 311
       if ($topic == end($topics)) {
315 312
         $topics_text .= '.';
316
-      }
317
-      else {
313
+      } else {
318 314
         $topics_text .= ', ';
319 315
       }
320 316
       $t_args['!topic-' . $topic->tid] = l(t($topic->name), 'taxonomy/term/' . $topic->tid);
@@ -971,8 +967,7 @@  discard block
 block discarded – undo
971 967
       if (!empty($account->picture->uri)) {
972 968
         $filepath = $account->picture->uri;
973 969
       }
974
-    }
975
-    elseif (variable_get('user_picture_default', '')) {
970
+    } elseif (variable_get('user_picture_default', '')) {
976 971
       $filepath = variable_get('user_picture_default', '');
977 972
     }
978 973
 
@@ -1099,8 +1094,7 @@  discard block
 block discarded – undo
1099 1094
         $links['href'] = "group/$entity_type/$id/unsubscribe";
1100 1095
       }
1101 1096
     }
1102
-  }
1103
-  else {
1097
+  } else {
1104 1098
     // Check if user can subscribe to the field.
1105 1099
     if (empty($settings['field_name']) && $audience_field_name = og_get_best_group_audience_field('user', $account, $entity_type, $bundle)) {
1106 1100
       $settings['field_name'] = $audience_field_name;
@@ -1147,13 +1141,11 @@  discard block
 block discarded – undo
1147 1141
           $links['title'] = t('Join group');
1148 1142
           if ($account->uid) {
1149 1143
             $links['href'] = $url;
1150
-          }
1151
-          else {
1144
+          } else {
1152 1145
             $links['href'] = 'user/login';
1153 1146
             $links['options'] = array('query' => array('destination' => $url));
1154 1147
           }
1155
-        }
1156
-        else {
1148
+        } else {
1157 1149
           $element[0] = array('#markup' => '<div class="subscription-type">' . t('Invite-only group') . '</div>');
1158 1150
           return $element;
1159 1151
         }
@@ -1228,8 +1220,7 @@  discard block
 block discarded – undo
1228 1220
       foreach ($roles as $rid => $rolename) {
1229 1221
         if (in_array($rolename, $details['roles'])) {
1230 1222
           $grant[$rid][] = $perm;
1231
-        }
1232
-        else {
1223
+        } else {
1233 1224
           $revoke[$rid][] = $perm;
1234 1225
         }
1235 1226
       }
Please login to merge, or discard this patch.
modules/commons/commons_media/commons_media.private_files.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
   foreach (commons_media_filter_parse_from_fields($entity_type, $entity) as $file_reference) {
80 80
     if (empty($entity_files[$file_reference['fid']])) {
81 81
       $entity_files[$file_reference['fid']] = 1;
82
-    }
83
-    else {
82
+    } else {
84 83
       $entity_files[$file_reference['fid']]++;
85 84
     }
86 85
   }
Please login to merge, or discard this patch.
modules/commons/commons_trusted_contacts/commons_trusted_contacts.module 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -360,8 +360,7 @@  discard block
 block discarded – undo
360 360
         // If user is blocked, they should not be able to apply for
361 361
         // membership.
362 362
         return;
363
-      }
364
-      elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
363
+      } elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
365 364
         // If user is pending, they should not be able to apply for
366 365
         // membership.
367 366
         $link = array(
@@ -373,8 +372,7 @@  discard block
 block discarded – undo
373 372
           ),
374 373
         );
375 374
         $element[0][] = $link;
376
-      }
377
-      elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) {
375
+      } elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) {
378 376
         // Check if user can subscribe to the field.
379 377
         if (empty($settings['field_name']) && $audience_field_name = og_get_best_group_audience_field('user', $account, $entity_type, $bundle)) {
380 378
           $settings['field_name'] = $audience_field_name;
@@ -423,8 +421,7 @@  discard block
 block discarded – undo
423 421
               array('system', 'jquery.form'),
424 422
             ),
425 423
           );
426
-        }
427
-        else {
424
+        } else {
428 425
           $link = array('#type' => 'link');
429 426
           $link['#href'] = 'user/login';
430 427
           $link['#options'] = array('query' => array('destination' => $url));
@@ -680,8 +677,7 @@  discard block
 block discarded – undo
680 677
     $commands[] = ajax_command_replace('#user-' . $account->uid, trim(theme('html_tag__request_pending', $element)));
681 678
     $page = array('#type' => 'ajax', '#commands' => $commands);
682 679
     ajax_deliver($page);
683
-  }
684
-  else {
680
+  } else {
685 681
     drupal_goto('user/' . $og_membership->gid);
686 682
   }
687 683
 }
@@ -710,8 +706,7 @@  discard block
 block discarded – undo
710 706
     $commands[] = ajax_command_replace(".field-name-group-group a", $new);
711 707
     $page = array('#type' => 'ajax', '#commands' => $commands);
712 708
     ajax_deliver($page);
713
-  }
714
-  else {
709
+  } else {
715 710
     drupal_goto('user/' . $account->uid);
716 711
   }
717 712
 }
@@ -843,8 +838,7 @@  discard block
 block discarded – undo
843 838
         $commands[] = ajax_command_append('#messages', theme('status_messages'));
844 839
         $page = array('#type' => 'ajax', '#commands' => $commands);
845 840
         ajax_deliver($page);
846
-      }
847
-      else {
841
+      } else {
848 842
         drupal_goto();
849 843
       }
850 844
       return FALSE;
@@ -1289,8 +1283,7 @@  discard block
 block discarded – undo
1289 1283
 function commons_trusted_contacts_batch_finished($success, $results, $operations) {
1290 1284
   if ($success) {
1291 1285
     $message = format_plural($results['processed'], t('One user processed.'), t('@count users processed.'));
1292
-  }
1293
-  else {
1286
+  } else {
1294 1287
     $message = t('Error encountered while upgrading users.');
1295 1288
   }
1296 1289
 
Please login to merge, or discard this patch.
commons_utility_links/commons_utility_links.commons_utility_links.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
       'title' => t('Log out'),
23 23
       'weight' => 9,
24 24
     );
25
-  }
26
-  else {
25
+  } else {
27 26
     if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
28 27
       $links['signup'] = array(
29 28
         'href' => 'user/register',
Please login to merge, or discard this patch.
commons_events/modules/commons_events_solr/commons_events_solr.module 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -263,8 +263,7 @@
 block discarded – undo
263 263
 
264 264
   if (node_access('create', 'event')) {
265 265
     return t('There are no events. Be the first to <a href="!url">create one</a>!', array('!url' => url('node/add/event')));
266
-  }
267
-  else {
266
+  } else {
268 267
     return t('There are no events. Be the first to create one!');
269 268
   }
270 269
 }
Please login to merge, or discard this patch.
modules/commons/commons_events/includes/commons_events.theme.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
     && registration_access('create', $registration, $user, $registration->type)
33 33
     && registration_status('node', $event->nid, TRUE)) {
34 34
     return drupal_get_form('commons_events_attend_event_form_' . $event->nid, $event, $registration, $attendee_count);
35
-  }
36
-  elseif (registration_is_registered($registration, NULL, $user->uid) &&
35
+  } elseif (registration_is_registered($registration, NULL, $user->uid) &&
37 36
     registration_access('delete', $registration, $user, $registration->type)) {
38 37
     $query = new EntityFieldQuery();
39 38
     $query->entityCondition('entity_type', 'registration')
Please login to merge, or discard this patch.