@@ -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 | |
@@ -92,12 +92,12 @@ |
||
| 92 | 92 | function commons_follow_user_existing_follow_message($acting_uid, $target_uids) { |
| 93 | 93 | $query = new EntityFieldQuery(); |
| 94 | 94 | $query->entityCondition('entity_type', 'message', '=') |
| 95 | - ->propertyCondition('uid', $acting_uid) |
|
| 96 | - ->propertyCondition('type', 'commons_follow_user_user_followed', '=') |
|
| 97 | - ->fieldCondition('field_target_users', 'target_id', $target_uids, 'IN') |
|
| 98 | - ->execute(); |
|
| 95 | + ->propertyCondition('uid', $acting_uid) |
|
| 96 | + ->propertyCondition('type', 'commons_follow_user_user_followed', '=') |
|
| 97 | + ->fieldCondition('field_target_users', 'target_id', $target_uids, 'IN') |
|
| 98 | + ->execute(); |
|
| 99 | 99 | |
| 100 | - return !empty($query->ordered_results); |
|
| 100 | + return !empty($query->ordered_results); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ->condition('fid', $flag_ids, 'IN') |
| 27 | 27 | ->condition('uid', $account->uid, '=') |
| 28 | 28 | ->condition('entity_type', 'user', '=') |
| 29 | - ->fields('f',array('entity_id')) |
|
| 29 | + ->fields('f', array('entity_id')) |
|
| 30 | 30 | ->execute() |
| 31 | 31 | ->fetchAll(); |
| 32 | 32 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $uids = array(); |
| 39 | - foreach($result as $row) { |
|
| 39 | + foreach ($result as $row) { |
|
| 40 | 40 | $uids[] = (integer) $row->entity_id; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | ); |
| 16 | 16 | |
| 17 | 17 | $form['explanation'] = array( |
| 18 | - '#markup' => '<p>' . t("Control how you are notified of new content and activity. When you follow a group, topic, user, or other content, you'll see updates in your content and activity streams, and you will automatically get email updates unlesss you disable emails or unfollow.") . '</p>', |
|
| 18 | + '#markup' => '<p>'.t("Control how you are notified of new content and activity. When you follow a group, topic, user, or other content, you'll see updates in your content and activity streams, and you will automatically get email updates unlesss you disable emails or unfollow.").'</p>', |
|
| 19 | 19 | ); |
| 20 | 20 | |
| 21 | 21 | $form['message_subscribe_email'] = array( |
@@ -14,8 +14,8 @@ |
||
| 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 | ); |
@@ -20,7 +20,7 @@ |
||
| 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 | } |
@@ -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 | } |
@@ -223,7 +223,7 @@ |
||
| 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. |
@@ -129,7 +129,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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']; |
@@ -16,7 +16,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |