@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | */ |
| 10 | 10 | function commons_bw_ctools_plugin_directory($module, $plugin) { |
| 11 | 11 | if ($module == 'ctools' && $plugin == 'content_types') { |
| 12 | - return 'plugins/' . $plugin; |
|
| 12 | + return 'plugins/'.$plugin; |
|
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | 15 | |
@@ -19,6 +19,6 @@ discard block |
||
| 19 | 19 | function commons_bw_views_api() { |
| 20 | 20 | return array( |
| 21 | 21 | 'api' => 3, |
| 22 | - 'path' => drupal_get_path('module', 'commons_bw') . '/includes/views', |
|
| 22 | + 'path' => drupal_get_path('module', 'commons_bw').'/includes/views', |
|
| 23 | 23 | ); |
| 24 | 24 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Implements hook_strongarm_alter(). |
| 11 | 11 | */ |
| 12 | - function commons_like_strongarm_alter(&$items) { |
|
| 12 | + function commons_like_strongarm_alter(&$items) { |
|
| 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)) { |
@@ -68,10 +68,10 @@ discard block |
||
| 68 | 68 | function commons_like_existing_node_like_messages($acting_uid, $target_nids) { |
| 69 | 69 | $query = new EntityFieldQuery(); |
| 70 | 70 | $query->entityCondition('entity_type', 'message', '=') |
| 71 | - ->propertyCondition('uid', $acting_uid) |
|
| 72 | - ->propertyCondition('type', 'commons_like_user_likes_node', '=') |
|
| 73 | - ->fieldCondition('field_target_nodes', 'target_id', $target_nids, 'IN') |
|
| 74 | - ->execute(); |
|
| 71 | + ->propertyCondition('uid', $acting_uid) |
|
| 72 | + ->propertyCondition('type', 'commons_like_user_likes_node', '=') |
|
| 73 | + ->fieldCondition('field_target_nodes', 'target_id', $target_nids, 'IN') |
|
| 74 | + ->execute(); |
|
| 75 | 75 | |
| 76 | 76 | if (!empty($query->ordered_results)) { |
| 77 | 77 | $mids = array(); |
@@ -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, |
@@ -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'); |
@@ -408,6 +408,7 @@ |
||
| 408 | 408 | |
| 409 | 409 | /** |
| 410 | 410 | * Get the panels subtype for the facet block. |
| 411 | + * @param string $facet_name |
|
| 411 | 412 | */ |
| 412 | 413 | function commons_search_solr_panel_facet_subtype($facet_name) { |
| 413 | 414 | return 'facetapi-' . facetapi_hash_delta($facet_name); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $pane->pid = 'new-463814d4-a8ba-7b94-c9d5-77faae3cea01'; |
| 51 | 51 | $pane->panel = 'two_33_66_first'; |
| 52 | 52 | $pane->type = 'block'; |
| 53 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:sm_og_group_ref'); |
|
| 53 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:sm_og_group_ref'); |
|
| 54 | 54 | $pane->shown = TRUE; |
| 55 | 55 | $pane->access = array(); |
| 56 | 56 | $pane->configuration = array( |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $pane->pid = 'new-7accd7bf-9b29-ce34-8de0-528f3a89ba02'; |
| 73 | 73 | $pane->panel = 'two_33_66_first'; |
| 74 | 74 | $pane->type = 'block'; |
| 75 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:im_field_topics'); |
|
| 75 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:im_field_topics'); |
|
| 76 | 76 | $pane->shown = TRUE; |
| 77 | 77 | $pane->access = array(); |
| 78 | 78 | $pane->configuration = array( |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $pane->pid = 'new-0ff4a758-76a3-1944-29fe-a19ae7f1abd1'; |
| 95 | 95 | $pane->panel = 'two_33_66_first'; |
| 96 | 96 | $pane->type = 'block'; |
| 97 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:bundle'); |
|
| 97 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:bundle'); |
|
| 98 | 98 | $pane->shown = TRUE; |
| 99 | 99 | $pane->access = array(); |
| 100 | 100 | $pane->configuration = array( |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $pane->pid = 'new-971af469-d142-9b34-4d91-7d2b2b06d750'; |
| 117 | 117 | $pane->panel = 'two_33_66_first'; |
| 118 | 118 | $pane->type = 'block'; |
| 119 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:author'); |
|
| 119 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:author'); |
|
| 120 | 120 | $pane->shown = TRUE; |
| 121 | 121 | $pane->access = array(); |
| 122 | 122 | $pane->configuration = array( |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $pane->pid = 'new-9580c1e3-390b-0954-65a6-3804ab628265'; |
| 139 | 139 | $pane->panel = 'two_33_66_first'; |
| 140 | 140 | $pane->type = 'block'; |
| 141 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:created'); |
|
| 141 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:created'); |
|
| 142 | 142 | $pane->shown = TRUE; |
| 143 | 143 | $pane->access = array(); |
| 144 | 144 | $pane->configuration = array( |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $pane->pid = 'new-036759bf-aab4-5b04-8d88-81e0debf0e23'; |
| 161 | 161 | $pane->panel = 'two_33_66_first'; |
| 162 | 162 | $pane->type = 'block'; |
| 163 | - $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment() . ':block:changed'); |
|
| 163 | + $pane->subtype = commons_search_solr_panel_facet_subtype(commons_search_solr_search_environment().':block:changed'); |
|
| 164 | 164 | $pane->shown = TRUE; |
| 165 | 165 | $pane->access = array(); |
| 166 | 166 | $pane->configuration = array( |
@@ -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 | } |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | if ($form_state['step'] == 'views_form_views_form' && $vbo->options['vbo_operations']['action::commons_content_moderation_delete_node_block_user']['selected'] == 1) { |
| 146 | 146 | if (module_exists('mollom') && _mollom_access('report to mollom')) { |
| 147 | 147 | $form['mollom_text'] = array( |
| 148 | - '#markup' => '<p>' . t('Deleted content will be reported to Mollom.') . '</p>', |
|
| 148 | + '#markup' => '<p>'.t('Deleted content will be reported to Mollom.').'</p>', |
|
| 149 | 149 | ); |
| 150 | 150 | } |
| 151 | 151 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | if (!isset($commons_entity_integrations)) { |
| 38 | 38 | foreach (module_implements('commons_entity_integration') as $module) { |
| 39 | - $commons_entity_integrations[$module] = call_user_func($module . '_commons_entity_integration'); |
|
| 39 | + $commons_entity_integrations[$module] = call_user_func($module.'_commons_entity_integration'); |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $form['#suffix'] .= '<span class="ajax-new-content"></span>'; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - $output = theme('status_messages') . drupal_render($form); |
|
| 143 | + $output = theme('status_messages').drupal_render($form); |
|
| 144 | 144 | $js = drupal_add_js(); |
| 145 | 145 | $settings = call_user_func_array('array_merge_recursive', $js['settings']['data']); |
| 146 | 146 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | function commons_media_page_build(&$page) { |
| 172 | 172 | $page['page_bottom']['commons_media']['#attached']['css'] = array( |
| 173 | - drupal_get_path('module', 'commons_media') . '/commons_media.css' => array( |
|
| 173 | + drupal_get_path('module', 'commons_media').'/commons_media.css' => array( |
|
| 174 | 174 | 'every_page' => TRUE, |
| 175 | 175 | ), |
| 176 | 176 | ); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | function commons_media_form_file_entity_add_upload_alter(&$form, &$form_state, $form_id) { |
| 256 | 256 | // Automatically upload selected files. |
| 257 | 257 | if ($form['#step'] == 1) { |
| 258 | - $form['#attached']['js'][] = drupal_get_path('module', 'commons_media') . '/commons_media_autoupload.js'; |
|
| 258 | + $form['#attached']['js'][] = drupal_get_path('module', 'commons_media').'/commons_media_autoupload.js'; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $form['options']['fields']['#access'] = FALSE; |
| 277 | 277 | |
| 278 | 278 | // Attach JavaScript to automatically embed files. |
| 279 | - $form['#attached']['js'][] = drupal_get_path('module', 'commons_media') . '/commons_media_autoembed.js'; |
|
| 279 | + $form['#attached']['js'][] = drupal_get_path('module', 'commons_media').'/commons_media_autoembed.js'; |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | /** |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | // Only move files that aren't currently in use. |
| 316 | 316 | if (empty($usage)) { |
| 317 | 317 | $scheme = 'private://'; |
| 318 | - $uri = file_stream_wrapper_uri_normalize($scheme . $source_file->filename); |
|
| 318 | + $uri = file_stream_wrapper_uri_normalize($scheme.$source_file->filename); |
|
| 319 | 319 | file_move($source_file, $uri, FILE_EXISTS_RENAME); |
| 320 | 320 | } |
| 321 | 321 | } |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $collected_fields = array(); |
| 341 | 341 | |
| 342 | 342 | // Determine the list of instances to iterate on. |
| 343 | - list(, , $bundle) = entity_extract_ids($type, $entity); |
|
| 343 | + list(,, $bundle) = entity_extract_ids($type, $entity); |
|
| 344 | 344 | $instances = field_info_instances($type, $bundle); |
| 345 | 345 | $fields = field_info_fields(); |
| 346 | 346 | |