@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_notify.features.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_notify.features.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_ctools_plugin_api(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_notify.features.field_instance.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_notify.features.field_instance.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_field_default_field_instances(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_notify.strongarm.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_notify.strongarm.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_strongarm(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_trusted_contacts.strongarm.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_trusted_contacts.strongarm.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_strongarm(). |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | // Add a link to the user's invitations. |
| 36 | 36 | if ($unread_invitations) { |
| 37 | - $links['unread-invitations']= array( |
|
| 37 | + $links['unread-invitations'] = array( |
|
| 38 | 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'), |
@@ -44,7 +44,7 @@ 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( |
|
| 47 | + $links['unread-messages'] = array( |
|
| 48 | 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'), |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * Action to set the state of a user in a group. |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * Action to set the state of a user in a group. |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | function commons_trusted_contacts_set_state_blocked_action_info() { |
| 8 | 8 | return array('commons_trusted_contacts_set_state_blocked_action' => array( |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_trusted_contacts.features.user_permission.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_trusted_contacts.features.user_permission.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_user_default_permissions(). |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * Code for the Commons Trusted Contacts feature. |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * Code for the Commons Trusted Contacts feature. |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | include_once 'commons_trusted_contacts.features.inc'; |
| 8 | 8 | |
@@ -37,11 +37,11 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | /** |
| 40 | - * Implements hook_pathauto_alias_alter |
|
| 41 | - * Since all content by default goes into 'groups/group-name/node-name', we want |
|
| 42 | - * to do something different with private user posts. Thus we alter the alias |
|
| 43 | - * to be users/user-name/feed/node-title |
|
| 44 | - */ |
|
| 40 | + * Implements hook_pathauto_alias_alter |
|
| 41 | + * Since all content by default goes into 'groups/group-name/node-name', we want |
|
| 42 | + * to do something different with private user posts. Thus we alter the alias |
|
| 43 | + * to be users/user-name/feed/node-title |
|
| 44 | + */ |
|
| 45 | 45 | function commons_trusted_contacts_pathauto_alias_alter(&$alias, &$context) { |
| 46 | 46 | // We're only looking for nodes and non-groups to alter, if it isn't a node return. |
| 47 | 47 | if ($context['module'] != 'node') { |
@@ -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 | |
@@ -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; |
@@ -360,8 +360,7 @@ discard block |
||
| 360 | 360 | // If user is blocked, they should not be able to apply for |
| 361 | 361 | // membership. |
| 362 | 362 | return; |
| 363 | - } |
|
| 364 | - elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) { |
|
| 363 | + } elseif (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) { |
|
| 365 | 364 | // If user is pending, they should not be able to apply for |
| 366 | 365 | // membership. |
| 367 | 366 | $link = array( |
@@ -373,8 +372,7 @@ discard block |
||
| 373 | 372 | ), |
| 374 | 373 | ); |
| 375 | 374 | $element[0][] = $link; |
| 376 | - } |
|
| 377 | - elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) { |
|
| 375 | + } elseif (!og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_ACTIVE))) { |
|
| 378 | 376 | // Check if user can subscribe to the field. |
| 379 | 377 | if (empty($settings['field_name']) && $audience_field_name = og_get_best_group_audience_field('user', $account, $entity_type, $bundle)) { |
| 380 | 378 | $settings['field_name'] = $audience_field_name; |
@@ -423,8 +421,7 @@ discard block |
||
| 423 | 421 | array('system', 'jquery.form'), |
| 424 | 422 | ), |
| 425 | 423 | ); |
| 426 | - } |
|
| 427 | - else { |
|
| 424 | + } else { |
|
| 428 | 425 | $link = array('#type' => 'link'); |
| 429 | 426 | $link['#href'] = 'user/login'; |
| 430 | 427 | $link['#options'] = array('query' => array('destination' => $url)); |
@@ -680,8 +677,7 @@ discard block |
||
| 680 | 677 | $commands[] = ajax_command_replace('#user-' . $account->uid, trim(theme('html_tag__request_pending', $element))); |
| 681 | 678 | $page = array('#type' => 'ajax', '#commands' => $commands); |
| 682 | 679 | ajax_deliver($page); |
| 683 | - } |
|
| 684 | - else { |
|
| 680 | + } else { |
|
| 685 | 681 | drupal_goto('user/' . $og_membership->gid); |
| 686 | 682 | } |
| 687 | 683 | } |
@@ -710,8 +706,7 @@ discard block |
||
| 710 | 706 | $commands[] = ajax_command_replace(".field-name-group-group a", $new); |
| 711 | 707 | $page = array('#type' => 'ajax', '#commands' => $commands); |
| 712 | 708 | ajax_deliver($page); |
| 713 | - } |
|
| 714 | - else { |
|
| 709 | + } else { |
|
| 715 | 710 | drupal_goto('user/' . $account->uid); |
| 716 | 711 | } |
| 717 | 712 | } |
@@ -843,8 +838,7 @@ discard block |
||
| 843 | 838 | $commands[] = ajax_command_append('#messages', theme('status_messages')); |
| 844 | 839 | $page = array('#type' => 'ajax', '#commands' => $commands); |
| 845 | 840 | ajax_deliver($page); |
| 846 | - } |
|
| 847 | - else { |
|
| 841 | + } else { |
|
| 848 | 842 | drupal_goto(); |
| 849 | 843 | } |
| 850 | 844 | return FALSE; |
@@ -1289,8 +1283,7 @@ discard block |
||
| 1289 | 1283 | function commons_trusted_contacts_batch_finished($success, $results, $operations) { |
| 1290 | 1284 | if ($success) { |
| 1291 | 1285 | $message = format_plural($results['processed'], t('One user processed.'), t('@count users processed.')); |
| 1292 | - } |
|
| 1293 | - else { |
|
| 1286 | + } else { |
|
| 1294 | 1287 | $message = t('Error encountered while upgrading users.'); |
| 1295 | 1288 | } |
| 1296 | 1289 | |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * commons_trusted_contacts.views_default.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * commons_trusted_contacts.views_default.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_views_default_views(). |