Completed
Push — 7.x-3.x ( daa35d...1b5187 )
by Devin
03:09
created
commons_bw/includes/views/handlers/commons_bw_handler_node_partial_form.inc 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     // should be moved to this position from previously rendered form.
43 43
     // See partial_node_form.js.
44 44
     if (!empty($cache[$bundle])) {
45
-      return '<div class="partial-node-form-placeholder" data-bundle="' . $bundle . '"></div>';
45
+      return '<div class="partial-node-form-placeholder" data-bundle="'.$bundle.'"></div>';
46 46
     }
47 47
     $cache[$bundle] = TRUE;
48 48
 
Please login to merge, or discard this patch.
modules/commons/commons_bw/commons_bw.module 2 patches
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.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
   if (!isset($node_types)) {
48 48
     foreach (module_implements('node_info') as $module) {
49
-      $node_types[$module] = call_user_func($module . '_node_info');
49
+      $node_types[$module] = call_user_func($module.'_node_info');
50 50
     }
51 51
   }
52 52
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
  */
96 96
 function commons_bw_form_views_exposed_form_alter(&$form, &$form_state, $form_id) {
97 97
   // Implements tweaks to exposed filters and sorts per the Commons designs.
98
-  if (strpos($form['#id'],'views-exposed-form-commons-bw') === 0) {
98
+  if (strpos($form['#id'], 'views-exposed-form-commons-bw') === 0) {
99 99
     // Remove the sort order (eg, descending vs ascending).
100 100
     $form['sort_order']['#access'] = FALSE;
101 101
     $form['sort_by']['#title'] = t('Sorted by');
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
   // See if we're building for the first time, or getting pre-saved values.
117 117
   $field_name = $form['#field']['field_name'];
118 118
 
119
-  if(!empty($form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'])) {
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 121
   }
122 122
   else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
   $instances = field_info_instances('node', $bundle);
156 156
 
157 157
   // Remove all fields except those marked as "display_in_partial_form".
158
-  foreach($instances as $field_name => $instance) {
158
+  foreach ($instances as $field_name => $instance) {
159 159
     if (empty($instance['display_in_partial_form'])) {
160 160
       unset($instances[$field_name]);
161 161
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
   field_attach_form('node', $node, $form, $form_state, entity_language('node', $node));
188 188
 
189
-  foreach(element_children($form) as $field_name) {
189
+  foreach (element_children($form) as $field_name) {
190 190
     if (empty($instances[$field_name])) {
191 191
       $form[$field_name]['#access'] = FALSE;
192 192
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
   // Attach the browsing widget JS and give it a higher weight than
231 231
   // quicktabs.js.
232 232
   $form['#attached']['js'][] = array(
233
-    'data' => drupal_get_path('module', 'commons_bw') . '/js/partial_node_form.js',
233
+    'data' => drupal_get_path('module', 'commons_bw').'/js/partial_node_form.js',
234 234
     'type' => 'file',
235 235
     'weight' => 100,
236 236
   );
@@ -238,13 +238,13 @@  discard block
 block discarded – undo
238 238
   // Add in some descriptive classes for css down the line.
239 239
   $form['#attributes']['class'][] = 'node';
240 240
   $form['#attributes']['class'][] = 'commons-bw-partial-node-form';
241
-  $form['#attributes']['class'][] = 'commons-bw-partial-node-form-' . $bundle;
241
+  $form['#attributes']['class'][] = 'commons-bw-partial-node-form-'.$bundle;
242 242
 
243 243
   // Add a link to the full node form.
244 244
   $form['full_form'] = array(
245 245
     '#theme' => 'link',
246 246
     '#text' => t('Go to full form'),
247
-    '#path' => 'node/add/' . str_replace('_', '-', $bundle),
247
+    '#path' => 'node/add/'.str_replace('_', '-', $bundle),
248 248
     '#options' => array(
249 249
       'attributes' => array('class' => array('full-form')),
250 250
       'html' => FALSE,
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
  *   An array of return values of the hook implementations.
357 357
  */
358 358
 function commons_bw_get_tab_definitions($widget_type = 'group') {
359
-  $hook_name = 'commons_bw_' . $widget_type . '_widget';
359
+  $hook_name = 'commons_bw_'.$widget_type.'_widget';
360 360
 
361 361
   $tabs = module_invoke_all($hook_name);
362 362
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
   uasort($items, 'element_sort');
400 400
 
401 401
   foreach ($items as $module => $item) {
402
-    $links[] = $item['link'] . ' ' . $item['text'];
402
+    $links[] = $item['link'].' '.$item['text'];
403 403
 
404 404
     // Populate the default content creation link.
405 405
     if (isset($item['default']) && $item['default']) {
@@ -410,10 +410,10 @@  discard block
 block discarded – undo
410 410
   $output = '';
411 411
 
412 412
   if (!empty($default)) {
413
-    $output .= $default['link'] . '<a class="commons-bw-create-choose"><span></span></a>';
413
+    $output .= $default['link'].'<a class="commons-bw-create-choose"><span></span></a>';
414 414
   }
415 415
 
416
-  $output .= '<div class="commons-bw-create-choose-bg"></div><div class="commons-bw-create-choose-holder">' . theme('item_list', array('items' => $links, 'type' => 'ul', 'attributes' => array('class' => 'commons-bw-create-all-widget-types'))) . '</div>';
416
+  $output .= '<div class="commons-bw-create-choose-bg"></div><div class="commons-bw-create-choose-holder">'.theme('item_list', array('items' => $links, 'type' => 'ul', 'attributes' => array('class' => 'commons-bw-create-all-widget-types'))).'</div>';
417 417
 
418 418
   return $output;
419 419
 }
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
       $view->execute();
464 464
 
465 465
       // Append the result count to the tab title.
466
-      $tabs[$machine_name]['title'] = $tabs[$machine_name]['title'] . ' <span class="commons-bw-result-count">'. $view->total_rows . '</span>';
466
+      $tabs[$machine_name]['title'] = $tabs[$machine_name]['title'].' <span class="commons-bw-result-count">'.$view->total_rows.'</span>';
467 467
     }
468 468
 
469 469
     // Use the current tab as the quicktabs default if the tab settings specify.
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
   $path = drupal_get_path('module', 'commons_bw');
483 483
 
484 484
   return array(
485
-    $path . '/plugins/quicktabs_styles/commons_pills/commons_pills.css' => t('Commons Pills'),
486
-    $path . '/plugins/quicktabs_styles/commons_tabs/commons_tabs.css' => t('Commons Tabs'),
485
+    $path.'/plugins/quicktabs_styles/commons_pills/commons_pills.css' => t('Commons Pills'),
486
+    $path.'/plugins/quicktabs_styles/commons_tabs/commons_tabs.css' => t('Commons Tabs'),
487 487
   );
488 488
 }
Please login to merge, or discard this patch.
modules/commons/commons_search/commons_search.module 2 patches
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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     $keys = arg(2);
88 88
     if (!module_exists('commons_search_solr') && !empty($keys)) {
89 89
       // Remove the search keys from the form action only if we're using core search.
90
-      $form['#action'] = str_replace("/" . check_plain(arg(2)), '', $form['#action']);
90
+      $form['#action'] = str_replace("/".check_plain(arg(2)), '', $form['#action']);
91 91
     }
92 92
   }
93 93
 }
@@ -105,19 +105,19 @@  discard block
 block discarded – undo
105 105
       // Add on a filter to the solr query to only list results within the
106 106
       // specified group.
107 107
       $qm = (strpos($form_state['redirect'], '?') !== FALSE ? '' : '?');
108
-      $form_state['redirect'] .= $qm . '&f[1]=sm_og_group_ref:node:' . $form_state['search_group_id'];
108
+      $form_state['redirect'] .= $qm.'&f[1]=sm_og_group_ref:node:'.$form_state['search_group_id'];
109 109
     }
110 110
     else {
111 111
       // Using core search to search within a group doesn't work, so we simply
112 112
       // use a view with exposed search terms to do the searching.
113
-      drupal_goto('search/group/' . $form_state['search_group_id'], array('query' => array('keys' => $keys)));
113
+      drupal_goto('search/group/'.$form_state['search_group_id'], array('query' => array('keys' => $keys)));
114 114
     }
115 115
   }
116 116
   else {
117 117
     if ($form_state['values']['custom_search_types'] == 'c-user') {
118 118
       // Force update the redirect on User search since Custom Search is weird.
119 119
       $keys = check_plain($form_state['values']['search_block_form']);
120
-      $form_state['redirect'] = 'search/user/' . $keys;
120
+      $form_state['redirect'] = 'search/user/'.$keys;
121 121
     }
122 122
   }
123 123
 }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     && preg_match('/sm_og_group_ref:"node:([0-9]+)"&/', urldecode($variables['response']->request), $match)
135 135
   ) {
136 136
     $group = node_load($match[1]);
137
-    $title = t('Search within !group', array('!group' => '<em>' . $group->title . '</em>'));
137
+    $title = t('Search within !group', array('!group' => '<em>'.$group->title.'</em>'));
138 138
     $variables['title'] = $title;
139 139
   }
140 140
 }
Please login to merge, or discard this patch.
modules/commons/commons_wikis/commons_wikis.module 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 function commons_wikis_form_node_form_alter(&$form, &$form_state, $form_id) {
84 84
   $node = $form['#node'];
85 85
 
86
-  list(, , $bundle) = entity_extract_ids('node', $node);
86
+  list(,, $bundle) = entity_extract_ids('node', $node);
87 87
 
88 88
   if ($bundle == 'wiki' && empty($node->nid)) {
89 89
     drupal_set_title(t('Create a wiki'));
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 /**
135 135
  * Implements hook_strongarm_alter().
136 136
  */
137
- function commons_wikis_strongarm_alter(&$items) {
137
+  function commons_wikis_strongarm_alter(&$items) {
138 138
   // Expose the wiki content type for integration with Commons Radioactivity
139 139
   // and Commons Groups.
140 140
   foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) {
Please login to merge, or discard this patch.
modules/commons/commons_topics/commons_topics.features.field_instance.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
   $commons_groups_entity_types = commons_topics_get_entity_types_with_topics();
15 15
   if (!empty($commons_groups_entity_types)) {
16 16
     foreach ($commons_groups_entity_types as $entity_type => $bundles) {
17
-      foreach(array_keys($bundles) as $bundle) {
17
+      foreach (array_keys($bundles) as $bundle) {
18 18
         commons_topics_field_definition($field_instances, $entity_type, $bundle);
19 19
       }
20 20
     }
Please login to merge, or discard this patch.
modules/commons/commons_posts/commons_posts.commons.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
  */
40 40
 function commons_posts_commons_bw_create_all_widget($group) {
41 41
   if (og_user_access('node', $group->nid, 'create post content')) {
42
-    $link = l(t('Create a post'),'node/add/post',
42
+    $link = l(t('Create a post'), 'node/add/post',
43 43
       array('attributes' => array('class' => 'commons-posts-create'), 'query' => array('og_group_ref' => $group->nid))
44 44
     );
45 45
     return array(
Please login to merge, or discard this patch.
modules/commons/commons_posts/commons_posts.module 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 function commons_posts_form_node_form_alter(&$form, &$form_state, $form_id) {
13 13
   $node = $form['#node'];
14 14
 
15
-  list(, , $bundle) = entity_extract_ids('node', $node);
15
+  list(,, $bundle) = entity_extract_ids('node', $node);
16 16
 
17 17
   if ($bundle == 'post' && empty($node->nid)) {
18 18
     drupal_set_title(t('Create a post'));
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 /**
74 74
  * Implements hook_strongarm_alter().
75 75
  */
76
- function commons_posts_strongarm_alter(&$items) {
76
+  function commons_posts_strongarm_alter(&$items) {
77 77
   // Expose the post content type for integration with Commons Radioactivity
78 78
   // and Commons Groups.
79 79
   foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) {
Please login to merge, or discard this patch.
modules/commons/commons_groups/commons_groups.module 2 patches
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.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   $hidden_permissions = array('subscribe', 'subscribe without approval');
29 29
   foreach ($hidden_permissions as $permission) {
30 30
     if (isset($form['permission'][$permission])) {
31
-      $form['permission'][$permission]['#markup'] .= ' ' . t('<strong>Disabled by the Commons Groups module.<strong>');
31
+      $form['permission'][$permission]['#markup'] .= ' '.t('<strong>Disabled by the Commons Groups module.<strong>');
32 32
     }
33 33
     foreach ($form['checkboxes'] as $index => $elements) {
34 34
       if (isset($elements['#options'][$permission])) {
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function commons_groups_help($path, $arg) {
69 69
   if (variable_get('commons_groups_needs_update', FALSE)) {
70
-    $message =  '<p>' . t("Drupal Commons 3.3 added a new, required field to control group privacy. Please edit your group(s) select one of the privacy options. Once all groups are
71
-      set, an administrator can dismiss the update notice.") . '</p>';
70
+    $message = '<p>'.t("Drupal Commons 3.3 added a new, required field to control group privacy. Please edit your group(s) select one of the privacy options. Once all groups are
71
+      set, an administrator can dismiss the update notice.").'</p>';
72 72
     if ($path == 'admin/content/groups/update') {
73 73
       return $message;
74 74
     }
75 75
     elseif ($arg[0] == 'node' && $arg[2] == 'edit') {
76 76
       $node = menu_get_object();
77
-      if($node->type == 'group' && empty($node->field_og_subscribe_settings)) {
77
+      if ($node->type == 'group' && empty($node->field_og_subscribe_settings)) {
78 78
         return $message;
79 79
       }
80 80
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     $breadcrumb[] = l(t('Groups'), 'groups');
98 98
     $group = node_load($entity->og_group_ref[LANGUAGE_NONE][0]['target_id']);
99 99
     if (node_access('view', $group)) {
100
-      $breadcrumb[] = l($group->title, 'node/' . $group->nid);
100
+      $breadcrumb[] = l($group->title, 'node/'.$group->nid);
101 101
     }
102 102
     drupal_set_breadcrumb($breadcrumb);
103 103
   }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 function commons_groups_form_node_form_alter(&$form, &$form_state, $form_id) {
110 110
   $node = $form['#node'];
111 111
 
112
-  list(, , $bundle) = entity_extract_ids('node', $node);
112
+  list(,, $bundle) = entity_extract_ids('node', $node);
113 113
 
114 114
   // Customizations to the node form for entities that are group content.
115 115
   $group_content_entity_types = commons_groups_get_group_content_entity_types();
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
       // is selected.
136 136
       $form['field_og_access_default_value']['#states'] = array(
137 137
         'visible' => array(
138
-          ':input[name="field_og_subscribe_settings[' . LANGUAGE_NONE . ']"]' => array('value' => 'approval'),
138
+          ':input[name="field_og_subscribe_settings['.LANGUAGE_NONE.']"]' => array('value' => 'approval'),
139 139
         ),
140 140
       );
141 141
 
142 142
       $form['#after_build'] = array('commons_groups_form_group_node_after_build');
143 143
     }
144 144
 
145
-    $form['#attached']['css'][] = drupal_get_path('module', 'commons_groups') . '/css/commons_groups.css';
145
+    $form['#attached']['css'][] = drupal_get_path('module', 'commons_groups').'/css/commons_groups.css';
146 146
 
147 147
     // The group access is set on commons_groups_node_presave().
148 148
     $form['group_access'][LANGUAGE_NONE]['#required'] = FALSE;
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
       return '';
300 300
     }
301 301
     $contributors_count = $view->total_rows;
302
-    $output .= l(format_plural($contributors_count, '1 contributor', '@count contributors'), 'node/' . $group->nid . '/contributors');
302
+    $output .= l(format_plural($contributors_count, '1 contributor', '@count contributors'), 'node/'.$group->nid.'/contributors');
303 303
   }
304 304
   // Format the list of topics:
305 305
   if (!empty($group->field_topics[LANGUAGE_NONE])) {
@@ -310,14 +310,14 @@  discard block
 block discarded – undo
310 310
     $topics_text = ' discussing the @topics ';
311 311
     $t_args = array('@topics' => format_plural(count($topics), 'topic', 'topics'));
312 312
     foreach ($topics as $topic) {
313
-      $topics_text .= '!topic-' . $topic->tid;
313
+      $topics_text .= '!topic-'.$topic->tid;
314 314
       if ($topic == end($topics)) {
315 315
         $topics_text .= '.';
316 316
       }
317 317
       else {
318 318
         $topics_text .= ', ';
319 319
       }
320
-      $t_args['!topic-' . $topic->tid] = l(t($topic->name), 'taxonomy/term/' . $topic->tid);
320
+      $t_args['!topic-'.$topic->tid] = l(t($topic->name), 'taxonomy/term/'.$topic->tid);
321 321
     }
322 322
     $output .= t($topics_text, $t_args);
323 323
   }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
   if ($form_id == 'edit_profile_user_profile_form' || substr($form_id, -10) === '_node_form') {
362 362
     $internal_fields = array('field_unread_invitations', 'field_unread_messages', 'user_trusted_contacts', 'og_user_group_ref', 'group_access');
363 363
     foreach ($internal_fields as $field_name) {
364
-      if(isset($form[$field_name])) {
364
+      if (isset($form[$field_name])) {
365 365
         $form[$field_name]['#access'] = FALSE;
366 366
       }
367 367
     }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 function commons_groups_node_in_group_submit(&$form, &$form_state) {
382 382
   if (isset($form_state['values']['og_group_ref'][LANGUAGE_NONE][0])) {
383 383
     $group = $form_state['values']['og_group_ref'][LANGUAGE_NONE][0]['target_id'];
384
-    $form_state['redirect'] = 'node/' . $group;
384
+    $form_state['redirect'] = 'node/'.$group;
385 385
   }
386 386
 }
387 387
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
   if (!isset($commons_entity_integrations)) {
456 456
     foreach (module_implements('commons_entity_integration') as $module) {
457
-      $commons_entity_integrations[$module] = call_user_func($module . '_commons_entity_integration');
457
+      $commons_entity_integrations[$module] = call_user_func($module.'_commons_entity_integration');
458 458
     }
459 459
   }
460 460
 
@@ -647,14 +647,14 @@  discard block
 block discarded – undo
647 647
 function commons_groups_related_groups_text($related_groups) {
648 648
   // In 1 group: "in the x group"
649 649
   if (count($related_groups) == 1) {
650
-    return t(' in the !group group', array('!group' => l($related_groups[0]->title, 'node/' . $related_groups[0]->nid)));
650
+    return t(' in the !group group', array('!group' => l($related_groups[0]->title, 'node/'.$related_groups[0]->nid)));
651 651
   }
652 652
 
653 653
   // In 2 groups: "in the x and y groups"
654 654
   if (count($related_groups) == 2) {
655 655
     return t(' in the !group-0 and !group-1 groups', array(
656
-      '!group-0' => l($related_groups[0]->title, 'node/' . $related_groups[0]->nid),
657
-      '!group-1' => l($related_groups[1]->title, 'node/' . $related_groups[1]->nid),
656
+      '!group-0' => l($related_groups[0]->title, 'node/'.$related_groups[0]->nid),
657
+      '!group-1' => l($related_groups[1]->title, 'node/'.$related_groups[1]->nid),
658 658
     ));
659 659
   }
660 660
 
@@ -666,11 +666,11 @@  discard block
 block discarded – undo
666 666
     // Prepare tokens for t() for each of the other groups.
667 667
     foreach ($related_groups as $key => $this_group) {
668 668
       $text .= "!group-$key, ";
669
-      $t_args["!group-$key"] = l($this_group->title, 'node/' . $this_group->nid);
669
+      $t_args["!group-$key"] = l($this_group->title, 'node/'.$this_group->nid);
670 670
     }
671 671
     // Prepare the last group token.
672 672
     $text .= " and !group-$last_group->nid groups.";
673
-    $t_args["!group-$last_group->nid"] = l($last_group->title, 'node/' . $last_group->nid);
673
+    $t_args["!group-$last_group->nid"] = l($last_group->title, 'node/'.$last_group->nid);
674 674
     // Prepare the full text with all of the groups and their tokens:
675 675
     return t($text, $t_args);
676 676
   }
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
     // Determine whether the group is private according to the subscription
754 754
     // field.
755 755
     $private = $wrapper->field_og_subscribe_settings->value() == 'invitation';
756
-    $wrapper->{OG_ACCESS_FIELD}->set((int)$private);
756
+    $wrapper->{OG_ACCESS_FIELD}->set((int) $private);
757 757
     return;
758 758
   }
759 759
 
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
             'alt' => $alt,
989 989
           ),
990 990
           '#path' => array(
991
-            'path' => 'user/' . $account->uid,
991
+            'path' => 'user/'.$account->uid,
992 992
             'options' => array(
993 993
               'attributes' => array(
994 994
                 'title' => t("View @user's profile.", array('@user' => format_username($account))),
@@ -1073,12 +1073,12 @@  discard block
 block discarded – undo
1073 1073
     return $element;
1074 1074
   }
1075 1075
 
1076
-  list($id, , $bundle) = entity_extract_ids($entity_type, $entity);
1076
+  list($id,, $bundle) = entity_extract_ids($entity_type, $entity);
1077 1077
 
1078 1078
   // The user has a pending membership request. Let her know that
1079 1079
   // her request is pending review.
1080 1080
   if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) {
1081
-    $element[0] = array('#markup' => '<div class="subscription-type">' . t('Your membership request is pending review by a group organizer.') . '</div>');
1081
+    $element[0] = array('#markup' => '<div class="subscription-type">'.t('Your membership request is pending review by a group organizer.').'</div>');
1082 1082
     return $element;
1083 1083
   }
1084 1084
   // If user is blocked, they should not be able to apply for membership.
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
 
1129 1129
     $url = "group/$entity_type/$id/subscribe";
1130 1130
     if ($settings['field_name']) {
1131
-      $url .= '/' . $settings['field_name'];
1131
+      $url .= '/'.$settings['field_name'];
1132 1132
     }
1133 1133
     // Set the needs update hook if we end up with a group call that is missing
1134 1134
     // the subscribe settings. We also check the variable first, because we
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
           }
1155 1155
         }
1156 1156
         else {
1157
-          $element[0] = array('#markup' => '<div class="subscription-type">' . t('Invite-only group') . '</div>');
1157
+          $element[0] = array('#markup' => '<div class="subscription-type">'.t('Invite-only group').'</div>');
1158 1158
           return $element;
1159 1159
         }
1160 1160
       }
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
     );
1171 1171
 
1172 1172
     if (!empty($subscription_type)) {
1173
-      $element[0]['#prefix'] = '<div class="subscription-type">' . $subscription_type . '</div>';
1173
+      $element[0]['#prefix'] = '<div class="subscription-type">'.$subscription_type.'</div>';
1174 1174
     }
1175 1175
 
1176 1176
     return $element;
Please login to merge, or discard this patch.
modules/commons/commons_activity_streams/commons_activity_streams.module 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,10 +130,10 @@
 block discarded – undo
130 130
 function commons_activity_streams_existing_messages($acting_uid, $target_ids, $target_field, $message_type) {
131 131
   $query = new EntityFieldQuery();
132 132
   $query->entityCondition('entity_type', 'message', '=')
133
-   ->propertyCondition('uid', $acting_uid)
134
-   ->propertyCondition('type', $message_type, '=')
135
-   ->fieldCondition($target_field, 'target_id', $target_ids, 'IN')
136
-   ->execute();
133
+    ->propertyCondition('uid', $acting_uid)
134
+    ->propertyCondition('type', $message_type, '=')
135
+    ->fieldCondition($target_field, 'target_id', $target_ids, 'IN')
136
+    ->execute();
137 137
 
138 138
   if (!empty($query->ordered_results)) {
139 139
     $mids = array();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
   if (!empty($query->ordered_results)) {
139 139
     $mids = array();
140
-    foreach($query->ordered_results as $result) {
140
+    foreach ($query->ordered_results as $result) {
141 141
       $mids[] = $result->entity_id;
142 142
     }
143 143
     return $mids;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
   // Create a token to retrieve the user picture formatted using any of the
225 225
   // currently defined image styles.
226 226
   foreach ($styles as $style_name => $style) {
227
-    $tokens['picture:' . $style_name] = array(
227
+    $tokens['picture:'.$style_name] = array(
228 228
       'name' => t('Picture: @st image style', array('@st' => $style_name)),
229 229
       'description' => t('Picture: @st image style', array('@st' => $style_name)),
230 230
     );
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
     foreach ($tokens as $token => $original) {
254 254
       if (strpos($token, 'picture:') !== FALSE) {
255
-        list( , $style) = explode(':', $token);
255
+        list(, $style) = explode(':', $token);
256 256
 
257 257
         // Prefer unique account pictures but fall back to the default user
258 258
         // picture if necessary.
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
           'html' => TRUE,
276 276
         );
277 277
 
278
-        $replacements[$original] = "<div class='user-picture'>" . l($image, $user_path['path'], $link_options) . "</div>";
278
+        $replacements[$original] = "<div class='user-picture'>".l($image, $user_path['path'], $link_options)."</div>";
279 279
       }
280 280
     }
281 281
   }
Please login to merge, or discard this patch.