@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | if ($type == 'node' && isset($build['#node'])) { |
| 204 | 204 | $node = $build['#node']; |
| 205 | 205 | |
| 206 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 206 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 207 | 207 | |
| 208 | 208 | if ($bundle == 'event') { |
| 209 | 209 | $build['attending'] = array( |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | function commons_events_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 235 | 235 | $node = $form_state['node']; |
| 236 | 236 | |
| 237 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 237 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 238 | 238 | |
| 239 | 239 | if ($bundle == 'event' && empty($node->nid)) { |
| 240 | 240 | drupal_set_title(t('Create an event')); |
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | if ($bundle == 'event') { |
| 244 | 244 | // Attach custom CSS and JS to the form. |
| 245 | - $form['#attached']['css'][] = drupal_get_path('module', 'commons_events') . '/css/commons_events.css'; |
|
| 246 | - $form['#attached']['js'][] = drupal_get_path('module', 'commons_events') . '/js/commons_events.js'; |
|
| 245 | + $form['#attached']['css'][] = drupal_get_path('module', 'commons_events').'/css/commons_events.css'; |
|
| 246 | + $form['#attached']['js'][] = drupal_get_path('module', 'commons_events').'/js/commons_events.js'; |
|
| 247 | 247 | |
| 248 | 248 | // Remove the '-None-' option from all the dropdowns. |
| 249 | 249 | unset($form['field_location'][$form['field_location']['#language']]['#options']['_none']); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | // Default the event organizer to the user who is creating the node. |
| 256 | 256 | if (empty($form['field_organizers'][$form['field_organizers']['#language']]['#default_value'])) { |
| 257 | 257 | global $user; |
| 258 | - $form['field_organizers'][$form['field_organizers']['#language']]['#default_value'] = format_username($user) . " (" . $user->uid . ")"; |
|
| 258 | + $form['field_organizers'][$form['field_organizers']['#language']]['#default_value'] = format_username($user)." (".$user->uid.")"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | // Hide the Registration type field. |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | if (module_exists('commons_events_solr')) { |
| 445 | 445 | $options = array( |
| 446 | 446 | 'query' => array( |
| 447 | - 'f[1]' => 'sm_og_group_ref:node:' . $group_id, |
|
| 447 | + 'f[1]' => 'sm_og_group_ref:node:'.$group_id, |
|
| 448 | 448 | ), |
| 449 | 449 | ); |
| 450 | 450 | |
@@ -465,11 +465,11 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | function commons_events_views_post_execute(&$view) { |
| 467 | 467 | if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_1') { |
| 468 | - $view->attachment_after = '<div class="more-link">' . commons_events_upcoming_more_link($view->args[0]) . '</div>'; |
|
| 468 | + $view->attachment_after = '<div class="more-link">'.commons_events_upcoming_more_link($view->args[0]).'</div>'; |
|
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_2') { |
| 472 | - $view->attachment_before = '<div class="commons-event-count">' . format_plural(count($view->result), '1 event', '@count events') . '</div>'; |
|
| 472 | + $view->attachment_before = '<div class="commons-event-count">'.format_plural(count($view->result), '1 event', '@count events').'</div>'; |
|
| 473 | 473 | } |
| 474 | 474 | } |
| 475 | 475 | |
@@ -542,17 +542,17 @@ discard block |
||
| 542 | 542 | if ($date1 == $date2) { |
| 543 | 543 | // Wrap the result with the attributes. |
| 544 | 544 | return t('!start-time - !end-time', array( |
| 545 | - '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>', |
|
| 546 | - '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>', |
|
| 545 | + '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>', |
|
| 546 | + '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>', |
|
| 547 | 547 | )); |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | // Wrap the result with the attributes. |
| 551 | 551 | return t('!start-date to !end-date, !start-time - !end-time', array( |
| 552 | - '!start-date' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $date1 . '</span>', |
|
| 553 | - '!end-date' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $date2 . '</span>', |
|
| 554 | - '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>', |
|
| 555 | - '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>', |
|
| 552 | + '!start-date' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$date1.'</span>', |
|
| 553 | + '!end-date' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$date2.'</span>', |
|
| 554 | + '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>', |
|
| 555 | + '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>', |
|
| 556 | 556 | )); |
| 557 | 557 | } |
| 558 | 558 | |
@@ -621,10 +621,10 @@ discard block |
||
| 621 | 621 | } |
| 622 | 622 | // Wrap the result with the attributes. |
| 623 | 623 | return t('!start-date to !end-date, !start-time - !end-time', array( |
| 624 | - '!start-date' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $date1 . '</span>', |
|
| 625 | - '!end-date' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $date2 . '</span>', |
|
| 626 | - '!start-time' => '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $time1 . '</span>', |
|
| 627 | - '!end-time' => '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $time2 . $timezone . '</span>', |
|
| 624 | + '!start-date' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$date1.'</span>', |
|
| 625 | + '!end-date' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$date2.'</span>', |
|
| 626 | + '!start-time' => '<span class="date-display-start"'.drupal_attributes($attributes_start).'>'.$time1.'</span>', |
|
| 627 | + '!end-time' => '<span class="date-display-end"'.drupal_attributes($attributes_end).'>'.$time2.$timezone.'</span>', |
|
| 628 | 628 | )); |
| 629 | 629 | } |
| 630 | 630 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * Get the search adapter and Solr environment for dynamic faceting. |
| 11 | 11 | */ |
| 12 | 12 | function commons_events_solr_search_environment() { |
| 13 | - return "apachesolr@" . apachesolr_default_environment(); |
|
| 13 | + return "apachesolr@".apachesolr_default_environment(); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | if (empty($env_id)) { |
| 24 | 24 | $env_id = commons_events_solr_search_environment(); |
| 25 | 25 | } |
| 26 | - foreach($facets as $facet) { |
|
| 26 | + foreach ($facets as $facet) { |
|
| 27 | 27 | $facet['settings'] = serialize($facet['settings']); |
| 28 | - $facet['name'] = $env_id . $facet['name']; |
|
| 28 | + $facet['name'] = $env_id.$facet['name']; |
|
| 29 | 29 | $facet['searcher'] = $env_id; |
| 30 | 30 | $merge = db_merge('facetapi') |
| 31 | 31 | ->key(array('name' => $facet['name'])) |
@@ -222,8 +222,8 @@ discard block |
||
| 222 | 222 | * Get the panels subtype for the facet block. |
| 223 | 223 | */ |
| 224 | 224 | function commons_events_solr_panel_facet_subtype($facet_name) { |
| 225 | - $facet_name = commons_events_solr_search_environment() . ':block:' . $facet_name; |
|
| 226 | - return 'facetapi-' . facetapi_hash_delta($facet_name); |
|
| 225 | + $facet_name = commons_events_solr_search_environment().':block:'.$facet_name; |
|
| 226 | + return 'facetapi-'.facetapi_hash_delta($facet_name); |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | /** |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | function commons_events_solr_environment_form_submit($form, $form_state) { |
| 276 | 276 | if ($form_state['values']['make_default'] == 1) { |
| 277 | - commons_events_solr_create_facets('apachesolr@' . $form_state['build_info']['args']['0']['env_id']); |
|
| 277 | + commons_events_solr_create_facets('apachesolr@'.$form_state['build_info']['args']['0']['env_id']); |
|
| 278 | 278 | // Need to clear caches so we can rebuild block definitions. |
| 279 | 279 | cache_clear_all('*', 'cache_block', TRUE); |
| 280 | 280 | cache_clear_all('*', 'cache_apachesolr', TRUE); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | if (!registration_is_registered($registration, NULL, $user->uid) |
| 32 | 32 | && registration_access('create', $registration, $user, $registration->type) |
| 33 | 33 | && registration_status('node', $event->nid, TRUE)) { |
| 34 | - return drupal_get_form('commons_events_attend_event_form_' . $event->nid, $event, $registration, $attendee_count); |
|
| 34 | + return drupal_get_form('commons_events_attend_event_form_'.$event->nid, $event, $registration, $attendee_count); |
|
| 35 | 35 | } |
| 36 | 36 | elseif (registration_is_registered($registration, NULL, $user->uid) && |
| 37 | 37 | registration_access('delete', $registration, $user, $registration->type)) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ->propertyCondition('entity_type', 'node'); |
| 43 | 43 | $result = $query->execute(); |
| 44 | 44 | |
| 45 | - return drupal_get_form('commons_events_cancel_event_form_' . $event->nid, $event, $result['registration']); |
|
| 45 | + return drupal_get_form('commons_events_cancel_event_form_'.$event->nid, $event, $result['registration']); |
|
| 46 | 46 | } |
| 47 | 47 | return ""; |
| 48 | 48 | } |
@@ -51,15 +51,15 @@ discard block |
||
| 51 | 51 | * Theme the event attendees list. |
| 52 | 52 | */ |
| 53 | 53 | function theme_commons_events_event_attendees($variables = array()) { |
| 54 | - $title = '<p class="commons-events-attendees-title">' . t('Attendees') . '</p>'; |
|
| 54 | + $title = '<p class="commons-events-attendees-title">'.t('Attendees').'</p>'; |
|
| 55 | 55 | $event_nid = $variables['event_nid']; |
| 56 | 56 | if (!isset($variables['display']) |
| 57 | 57 | || $variables['display'] != 'full') { |
| 58 | - return $title . views_embed_view('commons_events_event_attendee_list', 'default', $event_nid) |
|
| 59 | - . '<p class="commons-events-all-attendees"><a href="/node/' . $event_nid . '/attendees">' |
|
| 60 | - . t('See all attendees') . '</a></p>'; |
|
| 58 | + return $title.views_embed_view('commons_events_event_attendee_list', 'default', $event_nid) |
|
| 59 | + . '<p class="commons-events-all-attendees"><a href="/node/'.$event_nid.'/attendees">' |
|
| 60 | + . t('See all attendees').'</a></p>'; |
|
| 61 | 61 | } |
| 62 | - return $title . views_embed_view( |
|
| 62 | + return $title.views_embed_view( |
|
| 63 | 63 | 'commons_events_event_attendee_list', |
| 64 | 64 | 'commons_events_full_attendee_list', |
| 65 | 65 | $event_nid); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | '#markup' => format_plural($attendee_count, '<span class="commons-event-count">1</span> attendee', '<span class="commons-event-count">@count</span> attendees'), |
| 44 | 44 | ); |
| 45 | 45 | $form['#attached']['css'] = array( |
| 46 | - drupal_get_path('module', 'commons_events') . '/css/commons_events.css', |
|
| 46 | + drupal_get_path('module', 'commons_events').'/css/commons_events.css', |
|
| 47 | 47 | ); |
| 48 | 48 | $form['#attributes'] = array('class' => array('commons-events-form-float')); |
| 49 | 49 | return $form; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | $form['#attributes'] = array('class' => array('commons-events-form-float')); |
| 116 | 116 | $form['#attached']['css'] = array( |
| 117 | - drupal_get_path('module', 'commons_events') . '/css/commons_events.css', |
|
| 117 | + drupal_get_path('module', 'commons_events').'/css/commons_events.css', |
|
| 118 | 118 | ); |
| 119 | 119 | $form['registration'] = array( |
| 120 | 120 | '#type' => 'value', |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | // Expose the Post content type for 'liking' via the Commons_like module |
| 14 | 14 | // by altering the configuration for the Rate.module widget that it provides. |
| 15 | 15 | if (!empty($items['rate_widgets']->value)) { |
| 16 | - foreach($items['rate_widgets']->value as $key => $widget) { |
|
| 16 | + foreach ($items['rate_widgets']->value as $key => $widget) { |
|
| 17 | 17 | if ($widget->name == 'commons_like') { |
| 18 | 18 | $commons_entity_integrations = commons_entity_integration_info(); |
| 19 | 19 | if (!empty($commons_entity_integrations['node'])) { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | if (!empty($query->ordered_results)) { |
| 77 | 77 | $mids = array(); |
| 78 | - foreach($query->ordered_results as $result) { |
|
| 78 | + foreach ($query->ordered_results as $result) { |
|
| 79 | 79 | $mids[] = $result->entity_id; |
| 80 | 80 | } |
| 81 | 81 | return $mids; |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | array(1, 'like'), |
| 108 | 108 | ); |
| 109 | 109 | $templates['commons_like']->theme = 'rate_template_commons_like'; |
| 110 | - $templates['commons_like']->css = drupal_get_path('module', 'commons_like') . '/commons-like.css'; |
|
| 110 | + $templates['commons_like']->css = drupal_get_path('module', 'commons_like').'/commons-like.css'; |
|
| 111 | 111 | $templates['commons_like']->customizable = FALSE; |
| 112 | 112 | $templates['commons_like']->translate = TRUE; |
| 113 | 113 | $templates['commons_like']->use_source_translation = TRUE; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | // there are no unread messages or invitations. |
| 26 | 26 | if (empty($unread_invitations) && empty($unread_messages)) { |
| 27 | 27 | $links['no-unread-messages'] = array( |
| 28 | - 'href' => 'user/' . $user->uid . '/contacts', |
|
| 28 | + 'href' => 'user/'.$user->uid.'/contacts', |
|
| 29 | 29 | 'query' => array('qt-commons_trusted_contacts' => 'messages'), |
| 30 | 30 | 'title' => t('No unread messages'), |
| 31 | 31 | 'weight' => -9, |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | // Add a link to the user's invitations. |
| 36 | 36 | if ($unread_invitations) { |
| 37 | - $links['unread-invitations']= array( |
|
| 38 | - 'href' => 'user/' . $user->uid . '/contacts', |
|
| 37 | + $links['unread-invitations'] = array( |
|
| 38 | + 'href' => 'user/'.$user->uid.'/contacts', |
|
| 39 | 39 | 'query' => array('qt-commons_trusted_contacts' => 'invitations'), |
| 40 | 40 | 'title' => format_plural($unread_invitations, '1 invitation', '@count invitations'), |
| 41 | 41 | 'weight' => -8, |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | // Add a link to the user's unread messages. |
| 46 | 46 | if ($unread_messages) { |
| 47 | - $links['unread-messages']= array( |
|
| 48 | - 'href' => 'user/' . $user->uid . '/contacts', |
|
| 47 | + $links['unread-messages'] = array( |
|
| 48 | + 'href' => 'user/'.$user->uid.'/contacts', |
|
| 49 | 49 | 'query' => array('qt-commons_trusted_contacts' => 'messages'), |
| 50 | 50 | 'title' => format_plural($unread_messages, '1 message', '@count messages'), |
| 51 | 51 | 'weight' => -7, |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | 'page callback' => 'commons_trusted_contacts_request_trust', |
| 80 | 80 | 'page arguments' => array(1, 3), |
| 81 | 81 | 'access callback' => 'commons_trusted_contacts_request_trust_access', |
| 82 | - 'access arguments' => array(1,2), |
|
| 82 | + 'access arguments' => array(1, 2), |
|
| 83 | 83 | 'type' => MENU_CALLBACK, |
| 84 | 84 | ); |
| 85 | 85 | |
@@ -262,20 +262,20 @@ discard block |
||
| 262 | 262 | $view->get_total_rows = TRUE; |
| 263 | 263 | $view->execute(); |
| 264 | 264 | $tabs['contacts'] = array( |
| 265 | - 'title' => t('Trusted Contacts') . ' <span class="commons-bw-result-count">' . $view->total_rows . '</span>', |
|
| 265 | + 'title' => t('Trusted Contacts').' <span class="commons-bw-result-count">'.$view->total_rows.'</span>', |
|
| 266 | 266 | 'contents' => views_embed_view('trusted_contacts'), |
| 267 | 267 | ); |
| 268 | 268 | |
| 269 | 269 | module_load_include('inc', 'privatemsg', 'privatemsg.pages'); |
| 270 | 270 | |
| 271 | 271 | $tabs['messages'] = array( |
| 272 | - 'title' => t('Messages') . ' <span class="commons-bw-result-count">' . privatemsg_unread_count($account) . '</span>', |
|
| 272 | + 'title' => t('Messages').' <span class="commons-bw-result-count">'.privatemsg_unread_count($account).'</span>', |
|
| 273 | 273 | 'contents' => privatemsg_list_page(), |
| 274 | 274 | ); |
| 275 | 275 | |
| 276 | 276 | |
| 277 | 277 | $tabs['invitations'] = array( |
| 278 | - 'title' => t('Invitations') . ' <span class="commons-bw-result-count">' . count(commons_trusted_contacts_get_pending_invitations($account->uid)) . '</span>', |
|
| 278 | + 'title' => t('Invitations').' <span class="commons-bw-result-count">'.count(commons_trusted_contacts_get_pending_invitations($account->uid)).'</span>', |
|
| 279 | 279 | 'contents' => views_embed_view('trusted_contacts_invitations'), |
| 280 | 280 | ); |
| 281 | 281 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | // Hide the trust link from anonymous and users without subscribe access. |
| 339 | - list($id, , $bundle) = entity_extract_ids($entity_type, $entity); |
|
| 339 | + list($id,, $bundle) = entity_extract_ids($entity_type, $entity); |
|
| 340 | 340 | $user_is_active_member = og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE)); |
| 341 | 341 | if (!$account->uid || !og_user_access('user', $entity->uid, 'subscribe') && !$user_is_active_member) { |
| 342 | 342 | return; |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | if (variable_get('commons_trusted_contacts_global_messaging', FALSE) || $user_is_active_member) { |
| 352 | 352 | $link = array('#type' => 'link'); |
| 353 | 353 | $link['#title'] = t('Message'); |
| 354 | - $link['#href'] = 'user/' . $user->uid . '/contacts/messages/popup/' . $id; |
|
| 354 | + $link['#href'] = 'user/'.$user->uid.'/contacts/messages/popup/'.$id; |
|
| 355 | 355 | // without an #options array template.php doesn't assign classes |
| 356 | 356 | $link['#options'] = array(); |
| 357 | 357 | $element[0][] = $link; |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | return $element; |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | - $token = drupal_get_token('request' . ':' . $id . ':' . $account->uid); |
|
| 403 | + $token = drupal_get_token('request'.':'.$id.':'.$account->uid); |
|
| 404 | 404 | $url = "request-trust/$id/$token/nojs"; |
| 405 | 405 | |
| 406 | 406 | $link = array('#type' => 'link'); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $link['#options'] = array( |
| 411 | 411 | 'attributes' => array( |
| 412 | 412 | 'class' => array('use-ajax'), |
| 413 | - 'id' => 'user-' . $entity->uid |
|
| 413 | + 'id' => 'user-'.$entity->uid |
|
| 414 | 414 | ) |
| 415 | 415 | ); |
| 416 | 416 | $element[0][] = $link; |
@@ -441,11 +441,11 @@ discard block |
||
| 441 | 441 | |
| 442 | 442 | case 'approve_ignore': |
| 443 | 443 | |
| 444 | - $approve = l(t('Approve'), 'approve-trust/' . $entity->id . '/' . $items[0]['value']); |
|
| 445 | - $ignore = l(t('Ignore'), 'ignore-trust/' . $entity->id . '/' . $items[0]['value']); |
|
| 444 | + $approve = l(t('Approve'), 'approve-trust/'.$entity->id.'/'.$items[0]['value']); |
|
| 445 | + $ignore = l(t('Ignore'), 'ignore-trust/'.$entity->id.'/'.$items[0]['value']); |
|
| 446 | 446 | |
| 447 | 447 | $element[0] = array( |
| 448 | - '#markup' => $approve . ' ' . $ignore, |
|
| 448 | + '#markup' => $approve.' '.$ignore, |
|
| 449 | 449 | ); |
| 450 | 450 | return $element; |
| 451 | 451 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | |
| 545 | 545 | // Membership not found, return but throw an error to watchdog. |
| 546 | 546 | if (!isset($return['og_membership'])) { |
| 547 | - watchdog('commons_trusted_contacts', "Warning: expected trusted contact link not found between " . $og_membership->gid . " and " . $og_membership->etid, WATCHDOG_WARNING); |
|
| 547 | + watchdog('commons_trusted_contacts', "Warning: expected trusted contact link not found between ".$og_membership->gid." and ".$og_membership->etid, WATCHDOG_WARNING); |
|
| 548 | 548 | return; |
| 549 | 549 | } |
| 550 | 550 | |
@@ -649,8 +649,8 @@ discard block |
||
| 649 | 649 | $token = $wrapper->field_membership_token->value(); |
| 650 | 650 | $options = array('absolute' => TRUE); |
| 651 | 651 | $arguments = array( |
| 652 | - '@{approve-url}' => url('approve-trust/' . $og_membership->id . '/' . $token, $options), |
|
| 653 | - '@{ignore-url}' => url('ignore-trust/' . $og_membership->id . '/' . $token, $options), |
|
| 652 | + '@{approve-url}' => url('approve-trust/'.$og_membership->id.'/'.$token, $options), |
|
| 653 | + '@{ignore-url}' => url('ignore-trust/'.$og_membership->id.'/'.$token, $options), |
|
| 654 | 654 | ); |
| 655 | 655 | $message = message_create('trusted_contact_request_pending', array( |
| 656 | 656 | 'uid' => $account->uid, |
@@ -677,12 +677,12 @@ discard block |
||
| 677 | 677 | ), |
| 678 | 678 | ); |
| 679 | 679 | // We trip due to https://api.drupal.org/comment/32698#comment-32698 |
| 680 | - $commands[] = ajax_command_replace('#user-' . $account->uid, trim(theme('html_tag__request_pending', $element))); |
|
| 680 | + $commands[] = ajax_command_replace('#user-'.$account->uid, trim(theme('html_tag__request_pending', $element))); |
|
| 681 | 681 | $page = array('#type' => 'ajax', '#commands' => $commands); |
| 682 | 682 | ajax_deliver($page); |
| 683 | 683 | } |
| 684 | 684 | else { |
| 685 | - drupal_goto('user/' . $og_membership->gid); |
|
| 685 | + drupal_goto('user/'.$og_membership->gid); |
|
| 686 | 686 | } |
| 687 | 687 | } |
| 688 | 688 | |
@@ -703,8 +703,8 @@ discard block |
||
| 703 | 703 | // Ajax |
| 704 | 704 | |
| 705 | 705 | if ($ajax == 'ajax') { |
| 706 | - $token = drupal_get_token('request' . ':' . $account->uid . ':' . $user->uid); |
|
| 707 | - $new = l(t('Trusted Contact'), 'request-trust/' . $account->uid . '/' . $token . '/nojs', array('attributes' => array('class' => array('use-ajax')))); |
|
| 706 | + $token = drupal_get_token('request'.':'.$account->uid.':'.$user->uid); |
|
| 707 | + $new = l(t('Trusted Contact'), 'request-trust/'.$account->uid.'/'.$token.'/nojs', array('attributes' => array('class' => array('use-ajax')))); |
|
| 708 | 708 | |
| 709 | 709 | $commands = array(); |
| 710 | 710 | $commands[] = ajax_command_replace(".field-name-group-group a", $new); |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | ajax_deliver($page); |
| 713 | 713 | } |
| 714 | 714 | else { |
| 715 | - drupal_goto('user/' . $account->uid); |
|
| 715 | + drupal_goto('user/'.$account->uid); |
|
| 716 | 716 | } |
| 717 | 717 | } |
| 718 | 718 | |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | message_notify_send_message($message); |
| 756 | 756 | |
| 757 | 757 | // Redirect to Invitations screen. |
| 758 | - drupal_goto('user/' . $user->uid . '/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations'))); |
|
| 758 | + drupal_goto('user/'.$user->uid.'/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations'))); |
|
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | /** |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | $wrapper->save(); |
| 782 | 782 | |
| 783 | 783 | // Redirect to Invitations screen. |
| 784 | - drupal_goto('user/' . $user->uid . '/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations'))); |
|
| 784 | + drupal_goto('user/'.$user->uid.'/contacts', array('query' => array('qt-commons_trusted_contacts' => 'invitations'))); |
|
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | /** |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | t('You have exceeded the limit of @limit trusted contacts. Before you can add more contacts, you must <a href="@remove-contacts-links">remove some of your existing contacts.</a>', |
| 816 | 816 | array( |
| 817 | 817 | '@limit' => $contacts_limit, |
| 818 | - '@remove-contacts-link' => url('user/' . $requestor->uid . '/contacts', |
|
| 818 | + '@remove-contacts-link' => url('user/'.$requestor->uid.'/contacts', |
|
| 819 | 819 | array( |
| 820 | 820 | 'query' => array( |
| 821 | 821 | 'qt-commons_trusted_contacts' => 'contacts', |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | function commons_trusted_contacts_request_trust_access($account, $token) { |
| 864 | 864 | global $user; |
| 865 | 865 | |
| 866 | - return drupal_valid_token($token, 'request' . ':' . $account->uid . ':' . $user->uid) && user_is_logged_in(); |
|
| 866 | + return drupal_valid_token($token, 'request'.':'.$account->uid.':'.$user->uid) && user_is_logged_in(); |
|
| 867 | 867 | } |
| 868 | 868 | |
| 869 | 869 | /** |
@@ -876,7 +876,7 @@ discard block |
||
| 876 | 876 | function commons_trusted_contacts_un_trust_access($account, $token) { |
| 877 | 877 | global $user; |
| 878 | 878 | |
| 879 | - return drupal_valid_token($token, 'untrust' . ':' . $account->uid . ':' . $user->uid) && user_is_logged_in(); |
|
| 879 | + return drupal_valid_token($token, 'untrust'.':'.$account->uid.':'.$user->uid) && user_is_logged_in(); |
|
| 880 | 880 | } |
| 881 | 881 | |
| 882 | 882 | /** |
@@ -960,7 +960,7 @@ discard block |
||
| 960 | 960 | $form['actions']['cancel'] = array( |
| 961 | 961 | '#type' => 'link', |
| 962 | 962 | '#title' => t('Cancel'), |
| 963 | - '#href' => 'user/' . $user->uid . '/contacts', |
|
| 963 | + '#href' => 'user/'.$user->uid.'/contacts', |
|
| 964 | 964 | '#options' => array( |
| 965 | 965 | 'query' => array('qt-commons_trusted_contacts' => 'messages'), |
| 966 | 966 | ), |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | |
| 979 | 979 | if ($form['delete_destination']['#value'] == 'messages') { |
| 980 | 980 | // TODO: Redirect to the messages quick-tab. |
| 981 | - $form['delete_destination']['#value'] = 'user/' . $user->uid . '/contacts'; |
|
| 981 | + $form['delete_destination']['#value'] = 'user/'.$user->uid.'/contacts'; |
|
| 982 | 982 | } |
| 983 | 983 | } |
| 984 | 984 | |
@@ -1028,7 +1028,7 @@ discard block |
||
| 1028 | 1028 | // to perform the task of hiding the groups fields. |
| 1029 | 1029 | '#attached' => array( |
| 1030 | 1030 | 'js' => array( |
| 1031 | - drupal_get_path('module', 'commons_trusted_contacts') . '/scripts/commons-trusted-contacts.js', |
|
| 1031 | + drupal_get_path('module', 'commons_trusted_contacts').'/scripts/commons-trusted-contacts.js', |
|
| 1032 | 1032 | ), |
| 1033 | 1033 | ), |
| 1034 | 1034 | ); |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | $actions = array(); |
| 1128 | 1128 | $files = commons_trusted_contacts_operations_load_action_includes(); |
| 1129 | 1129 | foreach ($files as $filename) { |
| 1130 | - $action_info_fn = 'commons_trusted_contacts_' . str_replace('.', '_', basename($filename, '.inc')) . '_info'; |
|
| 1130 | + $action_info_fn = 'commons_trusted_contacts_'.str_replace('.', '_', basename($filename, '.inc')).'_info'; |
|
| 1131 | 1131 | $action_info = call_user_func($action_info_fn); |
| 1132 | 1132 | if (is_array($action_info)) { |
| 1133 | 1133 | $actions += $action_info; |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | function commons_trusted_contacts_operations_load_action_includes() { |
| 1149 | 1149 | static $loaded = FALSE; |
| 1150 | 1150 | |
| 1151 | - $path = drupal_get_path('module', 'commons_trusted_contacts') . '/includes/actions/'; |
|
| 1151 | + $path = drupal_get_path('module', 'commons_trusted_contacts').'/includes/actions/'; |
|
| 1152 | 1152 | $files = array( |
| 1153 | 1153 | 'set_state_active.action.inc', |
| 1154 | 1154 | 'set_state_blocked.action.inc', |
@@ -1157,7 +1157,7 @@ discard block |
||
| 1157 | 1157 | |
| 1158 | 1158 | if (!$loaded) { |
| 1159 | 1159 | foreach ($files as $file) { |
| 1160 | - include_once $path . $file; |
|
| 1160 | + include_once $path.$file; |
|
| 1161 | 1161 | } |
| 1162 | 1162 | $loaded = TRUE; |
| 1163 | 1163 | } |
@@ -1177,7 +1177,7 @@ discard block |
||
| 1177 | 1177 | // Include original functions. |
| 1178 | 1178 | module_load_include('inc', 'privatemsg', 'privatemsg.pages'); |
| 1179 | 1179 | |
| 1180 | - $form = privatemsg_new($form, $form_state, $account->uid, 'New private message from ' . $user->name); |
|
| 1180 | + $form = privatemsg_new($form, $form_state, $account->uid, 'New private message from '.$user->name); |
|
| 1181 | 1181 | |
| 1182 | 1182 | $form['actions'] = array('#type' => 'actions'); |
| 1183 | 1183 | |
@@ -5,6 +5,6 @@ |
||
| 5 | 5 | function render($values) { |
| 6 | 6 | global $user; |
| 7 | 7 | |
| 8 | - return l(t('Send private message'), 'user/' . $user->uid . '/contacts/messages/popup/' . $values->og_membership_etid); |
|
| 8 | + return l(t('Send private message'), 'user/'.$user->uid.'/contacts/messages/popup/'.$values->og_membership_etid); |
|
| 9 | 9 | } |
| 10 | 10 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * Get the search adapter and Solr environment for dynamic faceting. |
| 11 | 11 | */ |
| 12 | 12 | function commons_search_solr_search_environment() { |
| 13 | - return "apachesolr@" . apachesolr_default_environment(); |
|
| 13 | + return "apachesolr@".apachesolr_default_environment(); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
@@ -23,9 +23,9 @@ 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 | - $facet['name'] = $env_id . $facet['name']; |
|
| 28 | + $facet['name'] = $env_id.$facet['name']; |
|
| 29 | 29 | $facet['searcher'] = $env_id; |
| 30 | 30 | $merge = db_merge('facetapi') |
| 31 | 31 | ->key(array('name' => $facet['name'])) |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | * Get the panels subtype for the facet block. |
| 411 | 411 | */ |
| 412 | 412 | function commons_search_solr_panel_facet_subtype($facet_name) { |
| 413 | - return 'facetapi-' . facetapi_hash_delta($facet_name); |
|
| 413 | + return 'facetapi-'.facetapi_hash_delta($facet_name); |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | /** |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | */ |
| 426 | 426 | function commons_search_solr_environment_form_submit($form, $form_state) { |
| 427 | 427 | if ($form_state['values']['make_default'] == 1) { |
| 428 | - commons_search_solr_create_facets('apachesolr@' . $form_state['build_info']['args']['0']['env_id']); |
|
| 428 | + commons_search_solr_create_facets('apachesolr@'.$form_state['build_info']['args']['0']['env_id']); |
|
| 429 | 429 | // Need to clear caches so we can rebuild block definitions. |
| 430 | 430 | cache_clear_all('*', 'cache_block', TRUE); |
| 431 | 431 | cache_clear_all('*', 'cache_apachesolr', TRUE); |
@@ -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'); |