@@ -35,8 +35,8 @@ discard block |
||
| 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)) { |
|
| 38 | + foreach ($words as &$word) { |
|
| 39 | + if (is_numeric($word)) { |
|
| 40 | 40 | $word = '<span class="notification-count">' . $word . '</span>'; |
| 41 | 41 | } |
| 42 | 42 | else { |
@@ -252,7 +252,7 @@ discard block |
||
| 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 | 257 | $element['#attributes']['class'][] = drupal_html_class($element['#original_link']['menu_name'] . '-' . $element['#original_link']['router_path']); |
| 258 | 258 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 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]); |
@@ -622,7 +622,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -1176,7 +1176,7 @@ discard block |
||
| 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'])) { |
@@ -1260,7 +1260,7 @@ discard block |
||
| 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'])) { |
@@ -95,7 +95,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 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. |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | if (empty($env_id)) { |
| 24 | 24 | $env_id = commons_search_solr_search_environment(); |
| 25 | 25 | } |
| 26 | - foreach($facets as $facet) { |
|
| 26 | + foreach ($facets as $facet) { |
|
| 27 | 27 | $facet['settings'] = serialize($facet['settings']); |
| 28 | 28 | $facet['name'] = $env_id . $facet['name']; |
| 29 | 29 | $facet['searcher'] = $env_id; |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | * Implements hook_apachesolr_process_results(). |
| 483 | 483 | */ |
| 484 | 484 | function commons_search_solr_apachesolr_process_results(&$results, DrupalSolrQueryInterface $query) { |
| 485 | - foreach($results AS $rkey => $result) { |
|
| 485 | + foreach ($results AS $rkey => $result) { |
|
| 486 | 486 | if ($results[$rkey]['fields']['entity_type'] == 'node') { |
| 487 | 487 | if ($node = node_load($results[$rkey]['fields']['entity_id'])) { |
| 488 | 488 | $node_view = node_view($node, 'teaser'); |
@@ -112,7 +112,7 @@ discard block |
||
| 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 |
@@ -249,7 +249,7 @@ discard block |
||
| 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 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $commons_topics_entity_types = commons_topics_get_entity_types_with_topics(); |
| 20 | 20 | if (!empty($commons_topics_entity_types)) { |
| 21 | 21 | foreach ($commons_topics_entity_types as $entity_type => $bundles) { |
| 22 | - foreach(array_keys($bundles) as $bundle) { |
|
| 22 | + foreach (array_keys($bundles) as $bundle) { |
|
| 23 | 23 | $info['features']['field_instance'][] = "$entity_type-$bundle-field_topics"; |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -14,7 +14,7 @@ |
||
| 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 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $form['sort_by']['#title'] = t('sorted by'); |
| 27 | 27 | foreach ($form['type']['#options'] as $type => $name) { |
| 28 | 28 | if ($type != 'All') { |
| 29 | - $form['type']['#options'][$type] = t(strtolower(substr($name, 0, 1)) . substr($name,1) . 's'); |
|
| 29 | + $form['type']['#options'][$type] = t(strtolower(substr($name, 0, 1)) . substr($name, 1) . 's'); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -39,7 +39,7 @@ |
||
| 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( |
@@ -67,14 +67,14 @@ discard block |
||
| 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 |
|
| 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 | 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 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 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(); |
@@ -361,7 +361,7 @@ discard block |
||
| 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 | } |
@@ -753,7 +753,7 @@ discard block |
||
| 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 | |
@@ -1073,7 +1073,7 @@ discard block |
||
| 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. |