Completed
Push — 7.x-3.x ( daa35d...1b5187 )
by Devin
03:09
created
commons_follow_ui/commons_follow_ui.commons_utility_links.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
   if (user_is_logged_in()) {
15 15
     global $user;
16 16
     $account = $user;
17
-    $links['settings']= array(
18
-      'href' => 'user/' . $account->uid . '/notification-settings',
17
+    $links['settings'] = array(
18
+      'href' => 'user/'.$account->uid.'/notification-settings',
19 19
       'title' => t('Settings'),
20 20
       'weight' => 10,
21 21
     );
Please login to merge, or discard this patch.
themes/commons/commons_origins/template.php 2 patches
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     // @see commons_origins_form_alter().
16 16
     'form_content' => array(
17 17
       'render element' => 'form',
18
-      'path' => drupal_get_path('theme', 'commons_origins') . '/templates/form',
18
+      'path' => drupal_get_path('theme', 'commons_origins').'/templates/form',
19 19
       'template' => 'form-content',
20 20
       'pattern' => 'form_content__',
21 21
     ),
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
   foreach ($iconify as $name) {
36 36
     if (isset($element[$name])) {
37 37
       $words = explode(' ', $element[$name]['title']);
38
-      foreach($words as &$word) {
39
-        if(is_numeric($word)) {
40
-          $word = '<span class="notification-count">' . $word . '</span>';
38
+      foreach ($words as &$word) {
39
+        if (is_numeric($word)) {
40
+          $word = '<span class="notification-count">'.$word.'</span>';
41 41
         }
42 42
         else {
43
-          $word = '<span class="notification-label element-invisible">' . $word . '</span>';
43
+          $word = '<span class="notification-label element-invisible">'.$word.'</span>';
44 44
         }
45 45
       }
46 46
       $element[$name]['title'] = implode(' ', $words);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
   // Video and rich type must have HTML content.
60 60
   // Wrap the HTML content in a <div> to allow it to be made responsive.
61 61
   if (in_array($type, array('video', 'rich'))) {
62
-    $variables['content'] = '<div class="oembed">' . $content . '</div>';
62
+    $variables['content'] = '<div class="oembed">'.$content.'</div>';
63 63
   }
64 64
 }
65 65
 
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 function commons_origins_apachesolr_search_browse_blocks($vars) {
104 104
   $result = '';
105 105
   if ($vars['content']['#children']) {
106
-    $result .= '<div class="apachesolr-browse-blocks">' . "\n";
107
-    $result .= '  <h2 class="search-results-title">' . t('Browse available categories') . '</h2>' . "\n";
108
-    $result .= '  <div class="commons-pod">' . "\n";
109
-    $result .= '    <p>' . t('Pick a category to launch a search.') . '</p>' . "\n";
110
-    $result .= $vars['content']['#children'] . "\n";
111
-    $result .= '  </div>' . "\n";
106
+    $result .= '<div class="apachesolr-browse-blocks">'."\n";
107
+    $result .= '  <h2 class="search-results-title">'.t('Browse available categories').'</h2>'."\n";
108
+    $result .= '  <div class="commons-pod">'."\n";
109
+    $result .= '    <p>'.t('Pick a category to launch a search.').'</p>'."\n";
110
+    $result .= $vars['content']['#children']."\n";
111
+    $result .= '  </div>'."\n";
112 112
     $result .= '</div>';
113 113
   }
114 114
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     $variables['classes_array'] = array_merge($variables['classes_array'], $variables['message_classes']);
193 193
   }
194 194
   $variables['classes_array'][] = 'clearfix';
195
-  $variables['attributes_array']['id'] = 'privatemsg-mid-' . $variables['mid'];
195
+  $variables['attributes_array']['id'] = 'privatemsg-mid-'.$variables['mid'];
196 196
   $variables['content_attributes_array']['class'][] = 'privatemsg-message-content';
197 197
 
198 198
   // Add a distinct class to the "Delete" action.
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
   $output = '';
215 215
   $path_to_at_core = drupal_get_path('theme', 'adaptivetheme');
216 216
 
217
-  include_once($path_to_at_core . '/inc/get.inc');
217
+  include_once($path_to_at_core.'/inc/get.inc');
218 218
 
219 219
   global $theme_key;
220 220
   $theme_name = $theme_key;
@@ -229,15 +229,15 @@  discard block
 block discarded – undo
229 229
 
230 230
   if (at_get_setting('extra_menu_classes', $theme_name) == 1 && !empty($element['#original_link'])) {
231 231
     if (!empty($element['#original_link']['depth'])) {
232
-      $element['#attributes']['class'][] = 'menu-depth-' . $element['#original_link']['depth'];
232
+      $element['#attributes']['class'][] = 'menu-depth-'.$element['#original_link']['depth'];
233 233
     }
234 234
     if (!empty($element['#original_link']['mlid'])) {
235
-      $element['#attributes']['class'][] = 'menu-item-' . $element['#original_link']['mlid'];
235
+      $element['#attributes']['class'][] = 'menu-item-'.$element['#original_link']['mlid'];
236 236
     }
237 237
   }
238 238
 
239 239
   if (at_get_setting('menu_item_span_elements', $theme_name) == 1 && !empty($element['#title'])) {
240
-    $element['#title'] = '<span>' . $element['#title'] . '</span>';
240
+    $element['#title'] = '<span>'.$element['#title'].'</span>';
241 241
     $element['#localized_options']['html'] = TRUE;
242 242
   }
243 243
 
@@ -246,15 +246,15 @@  discard block
 block discarded – undo
246 246
   }
247 247
 
248 248
   $output = l($element['#title'], $element['#href'], $element['#localized_options']);
249
-  return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>";
249
+  return '<li'.drupal_attributes($element['#attributes']).'>'.$output.$sub_menu."</li>";
250 250
 }
251 251
 
252 252
 /**
253 253
  * Helper function to examine menu links and return the appropriate class.
254 254
  */
255
-function commons_origins_menu_link_class(&$element)  {
255
+function commons_origins_menu_link_class(&$element) {
256 256
   if ($element['#original_link']['menu_name'] == 'main-menu') {
257
-    $element['#attributes']['class'][] = drupal_html_class($element['#original_link']['menu_name'] . '-' . $element['#original_link']['router_path']);
257
+    $element['#attributes']['class'][] = drupal_html_class($element['#original_link']['menu_name'].'-'.$element['#original_link']['router_path']);
258 258
   }
259 259
 }
260 260
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
   // Only load the media styles if Commons Media is enabled.
281 281
   if (module_exists('commons_media')) {
282
-    drupal_add_css(drupal_get_path('theme', 'commons_origins') . '/css/commons-media.css', array('media' => 'screen', 'group' => CSS_THEME));
282
+    drupal_add_css(drupal_get_path('theme', 'commons_origins').'/css/commons-media.css', array('media' => 'screen', 'group' => CSS_THEME));
283 283
   }
284 284
 }
285 285
 
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
     // Add appropriate classes to words in the title.
343 343
     foreach ($chunks as &$chunk) {
344 344
       if ($chunk == $variables['comment_count']) {
345
-        $chunk = '<span class="action-item-small-append">' . $variables['comment_count'] . '</span>';
345
+        $chunk = '<span class="action-item-small-append">'.$variables['comment_count'].'</span>';
346 346
       }
347 347
       else {
348
-        $chunk = '<span class="element-invisible">' . $chunk . '</span>';
348
+        $chunk = '<span class="element-invisible">'.$chunk.'</span>';
349 349
       }
350 350
     }
351 351
     $comments_link['title'] = implode(' ', $chunks);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     'field_related_question',
400 400
     'field_topics',
401 401
   );
402
-  foreach($related_information as $field) {
402
+  foreach ($related_information as $field) {
403 403
     if (!empty($variables['content'][$field])) {
404 404
       $variables['content']['related_information'][$field] = $variables['content'][$field];
405 405
       hide($variables['content'][$field]);
@@ -509,13 +509,13 @@  discard block
 block discarded – undo
509 509
  */
510 510
 function commons_origins_preprocess_panelizer_view_mode(&$variables, $hook) {
511 511
   // Add classed to identity the entity type being overridden.
512
-  $variables['classes_array'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type']);
513
-  $variables['title_attributes_array']['class'][] = drupal_html_class($variables['element']['#entity_type'] . '-title');
514
-  $variables['title_attributes_array']['class'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type'] . '-title');
512
+  $variables['classes_array'][] = drupal_html_class('panelizer-'.$variables['element']['#entity_type']);
513
+  $variables['title_attributes_array']['class'][] = drupal_html_class($variables['element']['#entity_type'].'-title');
514
+  $variables['title_attributes_array']['class'][] = drupal_html_class('panelizer-'.$variables['element']['#entity_type'].'-title');
515 515
 
516 516
   // Add some extra theme hooks for the subthemers.
517
-  $variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type'];
518
-  $variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type'] . '__' . $variables['element']['#bundle'];
517
+  $variables['hook_theme_suggestions'][] = $hook.'__'.$variables['element']['#entity_type'];
518
+  $variables['hook_theme_suggestions'][] = $hook.'__'.$variables['element']['#entity_type'].'__'.$variables['element']['#bundle'];
519 519
 }
520 520
 
521 521
 /**
@@ -611,10 +611,10 @@  discard block
 block discarded – undo
611 611
   // node type information.
612 612
   foreach ($view->result as $id => $result) {
613 613
     if (isset($result->node_type)) {
614
-      $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-' . $result->node_type);
614
+      $variables['classes_array'][$id] .= ' '.drupal_html_class('row-type-'.$result->node_type);
615 615
     }
616 616
     else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') {
617
-      $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-event');
617
+      $variables['classes_array'][$id] .= ' '.drupal_html_class('row-type-event');
618 618
     }
619 619
   }
620 620
 }
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 /**
623 623
  * Implements hook_preprocess_pager().
624 624
  */
625
-function commons_origins_preprocess_pager_link (&$variables, $hook) {
625
+function commons_origins_preprocess_pager_link(&$variables, $hook) {
626 626
   // Style pager links like buttons.
627 627
   $variables['attributes']['class'][] = 'action-item';
628 628
   $variables['attributes']['class'][] = 'action-item-inline';
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
   }
686 686
 
687 687
   // Set an identifying class to the event attendance form.
688
-  if(strpos($element['#id'], 'commons-events-attend-event-form') === 0) {
688
+  if (strpos($element['#id'], 'commons-events-attend-event-form') === 0) {
689 689
     $variables['attributes_array']['class'][] = 'node-actions';
690 690
   }
691 691
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
     $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary';
761 761
 
762 762
     if (isset($variables['form']['title'])) {
763
-      $variables['form']['title']['#markup'] = '<h3 class="partial-node-form-title">' . $variables['form']['title']['#markup'] . '</h3>';
763
+      $variables['form']['title']['#markup'] = '<h3 class="partial-node-form-title">'.$variables['form']['title']['#markup'].'</h3>';
764 764
     }
765 765
   }
766 766
 
@@ -827,17 +827,17 @@  discard block
 block discarded – undo
827 827
 
828 828
   $classes = 'rate-button';
829 829
   if ($class) {
830
-    $classes .= ' ' . $class;
830
+    $classes .= ' '.$class;
831 831
   }
832 832
   if (empty($href)) {
833 833
     // Widget is disabled or closed.
834
-    return '<span class="' . $classes . '" id="rate-button-' . $id . '">' .
835
-      '<span class="element-invisible">' . check_plain($text) . '</span>' .
834
+    return '<span class="'.$classes.'" id="rate-button-'.$id.'">'.
835
+      '<span class="element-invisible">'.check_plain($text).'</span>'.
836 836
       '</span>';
837 837
   }
838 838
   else {
839
-    return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' .
840
-      '<span class="element-invisible">' . check_plain($text) . '</span>' .
839
+    return '<a class="'.$classes.'" id="rate-button-'.$id.'" rel="nofollow" href="'.htmlentities($href).'" title="'.check_plain($text).'">'.
840
+      '<span class="element-invisible">'.check_plain($text).'</span>'.
841 841
       '</a>';
842 842
   }
843 843
 }
@@ -929,10 +929,10 @@  discard block
 block discarded – undo
929 929
 function commons_origins_css_alter(&$css) {
930 930
   // Remove preset styles that interfere with theming.
931 931
   $unset = array(
932
-    drupal_get_path('module', 'search') . '/search.css',
933
-    drupal_get_path('module', 'rich_snippets') . '/rich_snippets.css',
934
-    drupal_get_path('module', 'commons_like') . '/commons-like.css',
935
-    drupal_get_path('module', 'panels') . '/css/panels.css',
932
+    drupal_get_path('module', 'search').'/search.css',
933
+    drupal_get_path('module', 'rich_snippets').'/rich_snippets.css',
934
+    drupal_get_path('module', 'commons_like').'/commons-like.css',
935
+    drupal_get_path('module', 'panels').'/css/panels.css',
936 936
   );
937 937
   foreach ($unset as $path) {
938 938
     if (isset($css[$path])) {
@@ -969,14 +969,14 @@  discard block
 block discarded – undo
969 969
           'level' => 'h2',
970 970
         );
971 971
       }
972
-      $output .= '<' . $heading['level'];
972
+      $output .= '<'.$heading['level'];
973 973
       if (!empty($heading['class'])) {
974 974
         $output .= drupal_attributes(array('class' => $heading['class']));
975 975
       }
976
-      $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';
976
+      $output .= '>'.check_plain($heading['text']).'</'.$heading['level'].'>';
977 977
     }
978 978
 
979
-    $output .= '<ul' . drupal_attributes($attributes) . '>';
979
+    $output .= '<ul'.drupal_attributes($attributes).'>';
980 980
 
981 981
     $num_links = count($links);
982 982
     $i = 1;
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
         if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page())) && (empty($link['language']) || $link['language']->language == $language_url->language)) {
996 996
           $class[] = 'active';
997 997
         }
998
-        $output .= '<li' . drupal_attributes(array('class' => $class)) . '>';
998
+        $output .= '<li'.drupal_attributes(array('class' => $class)).'>';
999 999
 
1000 1000
         if (isset($link['href'])) {
1001 1001
           // Pass in $link as $options, they share the same keys.
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
           if (isset($link['attributes'])) {
1011 1011
             $span_attributes = drupal_attributes($link['attributes']);
1012 1012
           }
1013
-          $output .= '<span' . $span_attributes . '>' . $link['title'] . '</span>';
1013
+          $output .= '<span'.$span_attributes.'>'.$link['title'].'</span>';
1014 1014
         }
1015 1015
 
1016 1016
         $i++;
@@ -1034,14 +1034,14 @@  discard block
 block discarded – undo
1034 1034
   element_set_attributes($element, array('id'));
1035 1035
   _form_set_class($element, array('form-wrapper'));
1036 1036
 
1037
-  $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>';
1037
+  $output = '<fieldset'.drupal_attributes($element['#attributes']).'>';
1038 1038
   if (!empty($element['#title'])) {
1039 1039
     // Always wrap fieldset legends in a SPAN for CSS positioning.
1040
-    $output .= '<legend><span class="fieldset-legend">' . $element['#title'] . '</span></legend>';
1040
+    $output .= '<legend><span class="fieldset-legend">'.$element['#title'].'</span></legend>';
1041 1041
   }
1042 1042
   $output .= '<div class="fieldset-wrapper">';
1043 1043
   if (!empty($element['#description'])) {
1044
-    $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>';
1044
+    $output .= '<div class="fieldset-description">'.$element['#description'].'</div>';
1045 1045
   }
1046 1046
   $output .= $element['#children'];
1047 1047
   if (isset($element['#value'])) {
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
   }
1050 1050
   $output .= '</div>';
1051 1051
   $output .= "</fieldset>\n";
1052
-  return '<div class="fieldset-outer-wrapper">' . $output . '</div>';
1052
+  return '<div class="fieldset-outer-wrapper">'.$output.'</div>';
1053 1053
 }
1054 1054
 
1055 1055
 /**
@@ -1117,10 +1117,10 @@  discard block
 block discarded – undo
1117 1117
   $attributes = drupal_attributes($element['#attributes']);
1118 1118
 
1119 1119
   if (!isset($element['#value'])) {
1120
-    return '<' . $element['#tag'] . $attributes . " />\n";
1120
+    return '<'.$element['#tag'].$attributes." />\n";
1121 1121
   }
1122 1122
   else {
1123
-    $output = '<' . $element['#tag'] . $attributes . '>';
1123
+    $output = '<'.$element['#tag'].$attributes.'>';
1124 1124
     if (isset($element['#value_prefix'])) {
1125 1125
       $output .= $element['#value_prefix'];
1126 1126
     }
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
     if (isset($element['#value_suffix'])) {
1129 1129
       $output .= $element['#value_suffix'];
1130 1130
     }
1131
-    $output .= '</' . $element['#tag'] . ">\n";
1131
+    $output .= '</'.$element['#tag'].">\n";
1132 1132
     return $output;
1133 1133
   }
1134 1134
 }
@@ -1143,11 +1143,11 @@  discard block
 block discarded – undo
1143 1143
 
1144 1144
   // Render the label, if it's not hidden.
1145 1145
   if (!$variables['label_hidden']) {
1146
-    $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ':&nbsp;</div>';
1146
+    $output .= '<div class="field-label"'.$variables['title_attributes'].'>'.$variables['label'].':&nbsp;</div>';
1147 1147
   }
1148 1148
 
1149 1149
   // Render the items.
1150
-  $output .= '<div class="field-items"' . $variables['content_attributes'] . '>';
1150
+  $output .= '<div class="field-items"'.$variables['content_attributes'].'>';
1151 1151
   foreach ($variables['items'] as $delta => $item) {
1152 1152
     if (isset($item['#type']) && $item['#type'] == 'link') {
1153 1153
       if (strpos($item['#href'], '/subscribe')) {
@@ -1158,13 +1158,13 @@  discard block
 block discarded – undo
1158 1158
       }
1159 1159
     }
1160 1160
 
1161
-    $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');
1162
-    $output .= '<div class="' . $classes . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';
1161
+    $classes = 'field-item '.($delta % 2 ? 'odd' : 'even');
1162
+    $output .= '<div class="'.$classes.'"'.$variables['item_attributes'][$delta].'>'.drupal_render($item).'</div>';
1163 1163
   }
1164 1164
   $output .= '</div>';
1165 1165
 
1166 1166
   // Render the top-level DIV.
1167
-  $output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>';
1167
+  $output = '<div class="'.$variables['classes'].'"'.$variables['attributes'].'>'.$output.'</div>';
1168 1168
 
1169 1169
   return $output;
1170 1170
 }
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
   $output = '';
1177 1177
 
1178 1178
   // Add Microformat classes to each address.
1179
-  foreach($variables['items'] as &$address) {
1179
+  foreach ($variables['items'] as &$address) {
1180 1180
     // Only display an address if it has been populated. We determine this by
1181 1181
     // validating that the administrative area has been populated.
1182 1182
     if (!empty($address['#address']['administrative_area'])) {
@@ -1190,19 +1190,19 @@  discard block
 block discarded – undo
1190 1190
 
1191 1191
   // Render the label, if it's not hidden.
1192 1192
   if (!$variables['label_hidden']) {
1193
-    $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ':</div> ';
1193
+    $output .= '<div class="field-label"'.$variables['title_attributes'].'>'.$variables['label'].':</div> ';
1194 1194
   }
1195 1195
 
1196 1196
   // Render the items.
1197
-  $output .= '<div class="field-items"' . $variables['content_attributes'] . '>';
1197
+  $output .= '<div class="field-items"'.$variables['content_attributes'].'>';
1198 1198
   foreach ($variables['items'] as $delta => $item) {
1199
-    $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');
1200
-    $output .= '<div class="' . $classes . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';
1199
+    $classes = 'field-item '.($delta % 2 ? 'odd' : 'even');
1200
+    $output .= '<div class="'.$classes.'"'.$variables['item_attributes'][$delta].'>'.drupal_render($item).'</div>';
1201 1201
   }
1202 1202
   $output .= '</div>';
1203 1203
 
1204 1204
   // Render the top-level DIV.
1205
-  $output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>';
1205
+  $output = '<div class="'.$variables['classes'].'"'.$variables['attributes'].'>'.$output.'</div>';
1206 1206
 
1207 1207
   return $output;
1208 1208
 }
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
         $variables['user_profile'][$action]['#access'] = FALSE;
1261 1261
       }
1262 1262
     }
1263
-    if (!module_exists('commons_trusted_contacts') && isset(  $variables['user_profile']['user_actions']['group_group'])) {
1263
+    if (!module_exists('commons_trusted_contacts') && isset($variables['user_profile']['user_actions']['group_group'])) {
1264 1264
       $variables['user_profile']['user_actions']['group_group']['#access'] = FALSE;
1265 1265
     }
1266 1266
     if (!empty($variables['user_profile']['user_actions'])) {
@@ -1301,21 +1301,21 @@  discard block
 block discarded – undo
1301 1301
 
1302 1302
   // Replace the submitted text on nodes with something a bit more pertinent to
1303 1303
   // the content type.
1304
-  if (variable_get('node_submitted_' . $node->type, TRUE)) {
1304
+  if (variable_get('node_submitted_'.$node->type, TRUE)) {
1305 1305
     $node_type_info = node_type_get_type($variables['node']);
1306 1306
     $type_attributes = array('class' => array(
1307 1307
       'node-content-type',
1308
-      drupal_html_class('node-content-type-' . $node->type),
1308
+      drupal_html_class('node-content-type-'.$node->type),
1309 1309
     ));
1310 1310
     $placeholders = array(
1311
-      '!type' => '<span' . drupal_attributes($type_attributes) . '>' . check_plain($node_type_info->name) . '</span>',
1311
+      '!type' => '<span'.drupal_attributes($type_attributes).'>'.check_plain($node_type_info->name).'</span>',
1312 1312
       '!user' => $variables['name'],
1313 1313
       '!date' => $variables['date'],
1314 1314
       '@interval' => format_interval(REQUEST_TIME - $node->created),
1315 1315
     );
1316 1316
     // Show what group the content belongs to if applicable.
1317 1317
     if (!empty($node->{OG_AUDIENCE_FIELD}) && $wrapper->{OG_AUDIENCE_FIELD}->count() == 1) {
1318
-      $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/' . $wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier());
1318
+      $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/'.$wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier());
1319 1319
       if ($use_timeago_date_format == TRUE) {
1320 1320
         $variables['submitted'] = t('!type created !date in the !group group by !user', $placeholders);
1321 1321
       }
@@ -1335,6 +1335,6 @@  discard block
 block discarded – undo
1335 1335
 
1336 1336
   // Append a feature label to featured node teasers.
1337 1337
   if ($variables['teaser'] && $variables['promote']) {
1338
-    $variables['submitted'] .= ' <span class="featured-node-tooltip">' . t('Featured') . ' ' . $variables['type'] . '</span>';
1338
+    $variables['submitted'] .= ' <span class="featured-node-tooltip">'.t('Featured').' '.$variables['type'].'</span>';
1339 1339
   }
1340 1340
 }
Please login to merge, or discard this patch.
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
       foreach($words as &$word) {
39 39
         if(is_numeric($word)) {
40 40
           $word = '<span class="notification-count">' . $word . '</span>';
41
-        }
42
-        else {
41
+        } else {
43 42
           $word = '<span class="notification-label element-invisible">' . $word . '</span>';
44 43
         }
45 44
       }
@@ -321,8 +320,7 @@  discard block
 block discarded – undo
321 320
           if ($name != 'comment_forbidden' && $name != 'answer-add' && !is_string($link['attributes']['class'])) {
322 321
             $link['attributes']['class'][] = 'action-item-small';
323 322
             $link['attributes']['class'][] = 'action-item-inline';
324
-          }
325
-          elseif ($name != 'comment_forbidden' && $name != 'answer-add') {
323
+          } elseif ($name != 'comment_forbidden' && $name != 'answer-add') {
326 324
             $link['attributes']['class'] .= ' action-item-small action-item-inline';
327 325
           }
328 326
         }
@@ -343,8 +341,7 @@  discard block
 block discarded – undo
343 341
     foreach ($chunks as &$chunk) {
344 342
       if ($chunk == $variables['comment_count']) {
345 343
         $chunk = '<span class="action-item-small-append">' . $variables['comment_count'] . '</span>';
346
-      }
347
-      else {
344
+      } else {
348 345
         $chunk = '<span class="element-invisible">' . $chunk . '</span>';
349 346
       }
350 347
     }
@@ -473,8 +470,7 @@  discard block
 block discarded – undo
473 470
     // Style the flag links like buttons.
474 471
     if ($variables['action'] == 'flagged') {
475 472
       $variables['flag_classes_array'][] = 'action-item-small-active';
476
-    }
477
-    else {
473
+    } else {
478 474
       $variables['flag_classes_array'][] = 'action-item-small';
479 475
     }
480 476
     $variables['flag_classes'] = implode(' ', $variables['flag_classes_array']);
@@ -612,8 +608,7 @@  discard block
 block discarded – undo
612 608
   foreach ($view->result as $id => $result) {
613 609
     if (isset($result->node_type)) {
614 610
       $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-' . $result->node_type);
615
-    }
616
-    else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') {
611
+    } else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') {
617 612
       $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-event');
618 613
     }
619 614
   }
@@ -651,8 +646,7 @@  discard block
 block discarded – undo
651 646
   // Roll the classes into the attributes.
652 647
   if (empty($variables['attributes_array']['class'])) {
653 648
     $variables['attributes_array']['class'] = $variables['classes_array'];
654
-  }
655
-  else {
649
+  } else {
656 650
     $variables['attributes_array']['class'] = array_merge($variables['attributes_array']['class'], $variables['classes_array']);
657 651
   }
658 652
 
@@ -834,8 +828,7 @@  discard block
 block discarded – undo
834 828
     return '<span class="' . $classes . '" id="rate-button-' . $id . '">' .
835 829
       '<span class="element-invisible">' . check_plain($text) . '</span>' .
836 830
       '</span>';
837
-  }
838
-  else {
831
+  } else {
839 832
     return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' .
840 833
       '<span class="element-invisible">' . check_plain($text) . '</span>' .
841 834
       '</a>';
@@ -851,8 +844,7 @@  discard block
 block discarded – undo
851 844
   if (is_array($form['#theme'])) {
852 845
     $hooks = array('form_content');
853 846
     $form['#theme'] = array_merge($form['#theme'], $hooks);
854
-  }
855
-  else {
847
+  } else {
856 848
     $form['#theme'] = array(
857 849
       $form['#theme'],
858 850
       'form_content',
@@ -1000,8 +992,7 @@  discard block
 block discarded – undo
1000 992
         if (isset($link['href'])) {
1001 993
           // Pass in $link as $options, they share the same keys.
1002 994
           $output .= l($link['title'], $link['href'], $link);
1003
-        }
1004
-        elseif (!empty($link['title'])) {
995
+        } elseif (!empty($link['title'])) {
1005 996
           // Some links are actually not links, but we wrap these in <span> for adding title and class attributes.
1006 997
           if (empty($link['html'])) {
1007 998
             $link['title'] = check_plain($link['title']);
@@ -1098,8 +1089,7 @@  discard block
 block discarded – undo
1098 1089
         }
1099 1090
         if (isset($item['#href']) && strpos($item['#href'], 'messages')) {
1100 1091
           $item['#options']['attributes']['class'][] = 'message-contact';
1101
-        }
1102
-        elseif (isset($item['#href'])) {
1092
+        } elseif (isset($item['#href'])) {
1103 1093
           $item['#options']['attributes']['class'][] = 'trusted-status-request';
1104 1094
         }
1105 1095
       }
@@ -1118,8 +1108,7 @@  discard block
 block discarded – undo
1118 1108
 
1119 1109
   if (!isset($element['#value'])) {
1120 1110
     return '<' . $element['#tag'] . $attributes . " />\n";
1121
-  }
1122
-  else {
1111
+  } else {
1123 1112
     $output = '<' . $element['#tag'] . $attributes . '>';
1124 1113
     if (isset($element['#value_prefix'])) {
1125 1114
       $output .= $element['#value_prefix'];
@@ -1152,8 +1141,7 @@  discard block
 block discarded – undo
1152 1141
     if (isset($item['#type']) && $item['#type'] == 'link') {
1153 1142
       if (strpos($item['#href'], '/subscribe')) {
1154 1143
         $item['#options']['attributes']['class'][] = 'action-item-primary';
1155
-      }
1156
-      else {
1144
+      } else {
1157 1145
         $item['#options']['attributes']['class'][] = 'action-item';
1158 1146
       }
1159 1147
     }
@@ -1181,8 +1169,7 @@  discard block
 block discarded – undo
1181 1169
     // validating that the administrative area has been populated.
1182 1170
     if (!empty($address['#address']['administrative_area'])) {
1183 1171
       _commons_origins_format_address($address);
1184
-    }
1185
-    else {
1172
+    } else {
1186 1173
       // Deny access to incomplete addresses.
1187 1174
       $address['#access'] = FALSE;
1188 1175
     }
@@ -1220,8 +1207,7 @@  discard block
 block discarded – undo
1220 1207
         // If an address is incomplete, remove it and tell the system a
1221 1208
         // rebuild is needed.
1222 1209
         unset($variables['row']->field_field_address[$key]);
1223
-      }
1224
-      else {
1210
+      } else {
1225 1211
         _commons_origins_format_address($address['rendered']);
1226 1212
       }
1227 1213
     }
@@ -1294,8 +1280,7 @@  discard block
 block discarded – undo
1294 1280
   if (module_exists('timeago') && variable_get('timeago_node', 1)) {
1295 1281
     $variables['date'] = timeago_format_date($node->created, $variables['date']);
1296 1282
     $use_timeago_date_format = TRUE;
1297
-  }
1298
-  else {
1283
+  } else {
1299 1284
     $use_timeago_date_format = FALSE;
1300 1285
   }
1301 1286
 
@@ -1318,16 +1303,13 @@  discard block
 block discarded – undo
1318 1303
       $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/' . $wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier());
1319 1304
       if ($use_timeago_date_format == TRUE) {
1320 1305
         $variables['submitted'] = t('!type created !date in the !group group by !user', $placeholders);
1321
-      }
1322
-      else {
1306
+      } else {
1323 1307
         $variables['submitted'] = t('!type created @interval ago in the !group group by !user', $placeholders);
1324 1308
       }
1325
-    }
1326
-    else {
1309
+    } else {
1327 1310
       if ($use_timeago_date_format == TRUE) {
1328 1311
         $variables['submitted'] = t('!type created !date by !user', $placeholders);
1329
-      }
1330
-      else {
1312
+      } else {
1331 1313
         $variables['submitted'] = t('!type created @interval ago by !user', $placeholders);
1332 1314
       }
1333 1315
     }
Please login to merge, or discard this patch.
themes/commons/commons_origins/commons_origins.palettes.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
   );
21 21
 
22 22
   foreach ($palettes as $key => $name) {
23
-    $palettes[$key] = theme('image', array('alt' => t($name), 'title' => t($name), 'path' => drupal_get_path('theme', 'commons_origins') . "/images/palettes/$key.png"));
23
+    $palettes[$key] = theme('image', array('alt' => t($name), 'title' => t($name), 'path' => drupal_get_path('theme', 'commons_origins')."/images/palettes/$key.png"));
24 24
   }
25 25
   return $palettes;
26 26
 }
Please login to merge, or discard this patch.
modules/commons/commons_follow/commons_follow.module 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@
 block discarded – undo
223 223
 /**
224 224
  * Get subscriptions flag IDs.
225 225
  *
226
- * @param $content_type
226
+ * @param string $content_type
227 227
  *   Optional. The type of content for which to load the flags. Usually 'node'.
228 228
  * @param $content_subtype
229 229
  *   Optional. The node type for which to load the flags.
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
  * Implements hook_form_alter().
130 130
  */
131 131
 function commons_follow_form_alter(&$form, &$form_state, $form_id) {
132
-  if ($form_id != 'views_exposed_form' || strpos($form['#id'],'views-exposed-form-commons-bw') !== 0 || empty($form['following'])) {
132
+  if ($form_id != 'views_exposed_form' || strpos($form['#id'], 'views-exposed-form-commons-bw') !== 0 || empty($form['following'])) {
133 133
     return;
134 134
   }
135 135
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
   // We don't use module_invoke_all() is we want to retain the array keys,
207 207
   // which are the user IDs.
208 208
   foreach (module_implements('commons_follow_get_nids') as $module) {
209
-    $function = $module . '_commons_follow_get_nids';
209
+    $function = $module.'_commons_follow_get_nids';
210 210
     $result = $function($account, $options);
211 211
     if (empty($result)) {
212 212
       continue;
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 function commons_follow_views_api() {
259 259
   return array(
260 260
     'api' => 3,
261
-    'path' => drupal_get_path('module', 'commons_follow') . '/includes/views',
261
+    'path' => drupal_get_path('module', 'commons_follow').'/includes/views',
262 262
   );
263 263
 }
264 264
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
   $followed_content = commons_follow_get_followed_content($account);
329 329
   $followed_mids = array();
330 330
   foreach ($followed_content as $key => $content) {
331
-    $function = $key . '_commons_follow_get_message_ids';
331
+    $function = $key.'_commons_follow_get_message_ids';
332 332
     if (function_exists($function)) {
333 333
       $function($followed_mids, $followed_content);
334 334
     }
@@ -353,12 +353,12 @@  discard block
 block discarded – undo
353 353
   }
354 354
 
355 355
   global $user;
356
-  $prefix = variable_get('message_subscribe_flag_prefix', 'subscribe') . '_';
356
+  $prefix = variable_get('message_subscribe_flag_prefix', 'subscribe').'_';
357 357
 
358 358
   if (strpos($view->name, $prefix) === 0 && isset($view->args[0]) && $user->uid != $view->args[0]) {
359 359
     $flag_content_keys = array_keys($query->table_queue);
360 360
 
361
-    foreach($flag_content_keys AS $key) {
361
+    foreach ($flag_content_keys AS $key) {
362 362
       if (strpos($key, 'flagging') === 0) {
363 363
         //Convert the Send Email Query
364 364
         $join = $query->table_queue[$key]['join'];
Please login to merge, or discard this patch.
includes/incidents/commons_radioactivity.incidents_flag.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     // A user following their own node should not increase radioactivity.
18 18
     if ($node->uid != $account->uid) {
19
-      commons_radioactivity_incident_node($node,  COMMONS_RADIOACTIVITY_FLAG_NODE);
19
+      commons_radioactivity_incident_node($node, COMMONS_RADIOACTIVITY_FLAG_NODE);
20 20
     }
21 21
   }
22 22
 }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     // A user unfollowing their own node should not decrease radioactivity.
34 34
     if ($node->uid != $account->uid) {
35
-      commons_radioactivity_incident_node($node,  -1 * COMMONS_RADIOACTIVITY_FLAG_NODE);
35
+      commons_radioactivity_incident_node($node, -1 * COMMONS_RADIOACTIVITY_FLAG_NODE);
36 36
     }
37 37
   }
38 38
 }
Please login to merge, or discard this patch.
modules/commons_search_solr_user/commons_search_solr_user.module 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
       // Get the count of flagged users for a particular account.
89 89
       $fl_results = db_select('flagging', 'f')
90 90
         ->fields('f', array('entity_id', 'uid'))
91
-        ->condition('f.entity_type','user','=')
91
+        ->condition('f.entity_type', 'user', '=')
92 92
         ->condition('f.uid', $user->uid, '=')
93 93
         ->condition('f.fid', $flag->fid, '=')
94 94
         ->extend('PagerDefault')->limit($limit)
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         ->execute();
113 113
       $user_ids = array_keys($results['user']);
114 114
       foreach ($user_ids as $uid) {
115
-        $out_results[] = user_view(user_load($uid), 'search_results');($user_ids);
115
+        $out_results[] = user_view(user_load($uid), 'search_results'); ($user_ids);
116 116
       }
117 117
       $build['pager'] = array(
118 118
         // As nice as it would be to make this use #theme, it is a bit more
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
       ),
160 160
       '#image_style' => '50x50',
161 161
       '#path' => array(
162
-        'path' => 'user/' . $build['#account']->uid,
162
+        'path' => 'user/'.$build['#account']->uid,
163 163
         'options' => array(
164 164
           'attributes' => array(
165 165
             'class' => array('user-picture'),
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
       $groups = array();
175 175
       foreach ($build['#account']->og_user_node[LANGUAGE_NONE] AS $og_node) {
176 176
         if ($gnode = node_load($og_node['target_id'])) {
177
-          $groups['group-item group-' . $gnode->nid] = array(
177
+          $groups['group-item group-'.$gnode->nid] = array(
178 178
             'title' => $gnode->title,
179
-            'href' => 'node/' . $gnode->nid,
179
+            'href' => 'node/'.$gnode->nid,
180 180
             'attributes' => array(
181 181
               'class' => array('group-link'),
182 182
             ),
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
       $form['custom_search_types']['#options'] = array_merge(array('s-user' => t('People')), $other_options);
250 250
     }
251 251
     //We want to override the #submit with our own, the other submits aren't relevant for the user page
252
-    $form['#submit'][]= 'commons_search_solr_user_search_submit';
252
+    $form['#submit'][] = 'commons_search_solr_user_search_submit';
253 253
   }
254 254
 }
255 255
 
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
 function commons_search_solr_user_search_submit($form, &$form_state) {
284 284
   if ($form_state['values']['custom_search_types'] == 's-user') {
285 285
     $user_search_page = apachesolr_search_page_load('user_search');
286
-    $keys = '/' . $form_state['values']['search_block_form'];
287
-    $form_state['redirect'] = $user_search_page['search_path'] . $keys;
286
+    $keys = '/'.$form_state['values']['search_block_form'];
287
+    $form_state['redirect'] = $user_search_page['search_path'].$keys;
288 288
   }
289 289
 }
290 290
 
Please login to merge, or discard this patch.
commons/commons_follow/commons_follow_node/commons_follow_node.module 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
     ->condition('fid', $flag_ids, 'IN')
30 30
     ->condition('uid', $account->uid, '=')
31 31
     ->condition('entity_type', 'node', '=')
32
-    ->fields('f',array('entity_id'))
32
+    ->fields('f', array('entity_id'))
33 33
     ->execute()
34 34
     ->fetchAll();
35 35
   $nids = array();
36
-  foreach($result as $row) {
36
+  foreach ($result as $row) {
37 37
     $nids[] = (integer) $row->entity_id;
38 38
   }
39 39
 
Please login to merge, or discard this patch.
commons/commons_follow/commons_follow_term/commons_follow_term.module 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     ->condition('fid', $flag_ids, 'IN')
25 25
     ->condition('uid', $account->uid, '=')
26 26
     ->condition('entity_type', 'taxonomy_term', '=')
27
-    ->fields('f',array('entity_id'))
27
+    ->fields('f', array('entity_id'))
28 28
     ->execute()
29 29
     ->fetchAll();
30 30
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
   }
35 35
 
36 36
   $tids = array();
37
-  foreach($result as $row) {
37
+  foreach ($result as $row) {
38 38
     $tids[] = (integer) $row->entity_id;
39 39
   }
40 40
 
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
   $result = $query
49 49
     ->addTag('node_access')
50 50
     ->condition('tid', $tids, 'IN')
51
-    ->fields('t',array('nid'))
51
+    ->fields('t', array('nid'))
52 52
     ->groupBy('nid')
53 53
     ->execute()
54 54
     ->fetchAll();
55 55
 
56 56
   // Return the node IDs.
57 57
   $nids = array();
58
-  foreach($result as $row) {
58
+  foreach ($result as $row) {
59 59
     $nids[] = (integer) $row->nid;
60 60
   }
61 61
 
Please login to merge, or discard this patch.
commons/commons_follow/commons_follow_group/commons_follow_group.module 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     ->condition('uid', $account->uid, '=')
30 30
     ->condition('entity_type', 'node', '=')
31 31
     ->condition('entity_id', $gids['node'], 'IN')
32
-    ->fields('f',array('entity_id'))
32
+    ->fields('f', array('entity_id'))
33 33
     ->execute()
34 34
     ->fetchAll();
35 35
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
   }
39 39
 
40 40
   $nids = array();
41
-  foreach($result as $row) {
41
+  foreach ($result as $row) {
42 42
     $nids[] = $row->entity_id;
43 43
   }
44 44
 
Please login to merge, or discard this patch.