@@ -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. |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $commons_groups_entity_types = commons_groups_get_group_content_entity_types(); |
| 14 | 14 | if (!empty($commons_groups_entity_types)) { |
| 15 | 15 | foreach ($commons_groups_entity_types as $entity_type => $bundles) { |
| 16 | - foreach(array_keys($bundles) as $bundle) { |
|
| 16 | + foreach (array_keys($bundles) as $bundle) { |
|
| 17 | 17 | commons_groups_field_definition($field_instances, $entity_type, $bundle); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | // to create the group audience field for it when installing the profile. |
| 26 | 26 | $group_bundles['node'] = array('group' => TRUE); |
| 27 | 27 | } |
| 28 | - foreach(array_keys($group_bundles['node']) as $bundle) { |
|
| 28 | + foreach (array_keys($group_bundles['node']) as $bundle) { |
|
| 29 | 29 | commons_groups_field_definition_group($field_instances, 'node', $bundle); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if (!empty($query->ordered_results)) { |
| 139 | 139 | $mids = array(); |
| 140 | - foreach($query->ordered_results as $result) { |
|
| 140 | + foreach ($query->ordered_results as $result) { |
|
| 141 | 141 | $mids[] = $result->entity_id; |
| 142 | 142 | } |
| 143 | 143 | return $mids; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | foreach ($tokens as $token => $original) { |
| 254 | 254 | if (strpos($token, 'picture:') !== FALSE) { |
| 255 | - list( , $style) = explode(':', $token); |
|
| 255 | + list(, $style) = explode(':', $token); |
|
| 256 | 256 | |
| 257 | 257 | // Prefer unique account pictures but fall back to the default user |
| 258 | 258 | // picture if necessary. |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | ->condition('fid', $flag_ids, 'IN') |
| 30 | 30 | ->condition('uid', $account->uid, '=') |
| 31 | 31 | ->condition('content_type', 'node', '=') |
| 32 | - ->fields('f',array('content_id')) |
|
| 32 | + ->fields('f', array('content_id')) |
|
| 33 | 33 | ->execute() |
| 34 | 34 | ->fetchAll(); |
| 35 | 35 | $nids = array(); |
| 36 | - foreach($result as $row) { |
|
| 36 | + foreach ($result as $row) { |
|
| 37 | 37 | $nids[] = (integer) $row->content_id; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | ->condition('uid', $account->uid, '=') |
| 30 | 30 | ->condition('content_type', 'node', '=') |
| 31 | 31 | ->condition('content_id', $gids['node'], 'IN') |
| 32 | - ->fields('f',array('content_id')) |
|
| 32 | + ->fields('f', array('content_id')) |
|
| 33 | 33 | ->execute() |
| 34 | 34 | ->fetchAll(); |
| 35 | 35 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $nids = array(); |
| 41 | - foreach($result as $row) { |
|
| 41 | + foreach ($result as $row) { |
|
| 42 | 42 | $nids[] = $row->content_id; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | function render($values) { |
| 16 | 16 | global $user; |
| 17 | 17 | //If the passed in user doesn't match the current user |
| 18 | - if(isset($this->view->args[0]) && $user->uid != $this->view->args[0]) { |
|
| 18 | + if (isset($this->view->args[0]) && $user->uid != $this->view->args[0]) { |
|
| 19 | 19 | |
| 20 | 20 | if (!($flag = $this->get_flag())) { |
| 21 | 21 | // get_flag() itself will print a more detailed message. |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $flag_wrapper_classes_array[] = 'flag-wrapper'; |
| 42 | 42 | $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name']; |
| 43 | 43 | $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name'] . '-' . $content_id; |
| 44 | - $variables['flag_wrapper_classes'] = implode(' ',$flag_wrapper_classes_array); |
|
| 44 | + $variables['flag_wrapper_classes'] = implode(' ', $flag_wrapper_classes_array); |
|
| 45 | 45 | |
| 46 | 46 | $flag_classes_array = array(); |
| 47 | 47 | $flag_classes_array[] = 'flag'; |
@@ -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 | |
@@ -347,10 +347,10 @@ discard block |
||
| 347 | 347 | } |
| 348 | 348 | global $user; |
| 349 | 349 | $prefix = variable_get('message_subscribe_flag_prefix', 'subscribe') . '_'; |
| 350 | - if(strpos($view->name, $prefix) === 0 && isset($view->args[0]) && $user->uid != $view->args[0]) { |
|
| 350 | + if (strpos($view->name, $prefix) === 0 && isset($view->args[0]) && $user->uid != $view->args[0]) { |
|
| 351 | 351 | $flag_content_keys = array_keys($query->table_queue); |
| 352 | - foreach($flag_content_keys AS $key) { |
|
| 353 | - if(strpos($key, 'flag_content') === 0) { |
|
| 352 | + foreach ($flag_content_keys AS $key) { |
|
| 353 | + if (strpos($key, 'flag_content') === 0) { |
|
| 354 | 354 | //Convert the Send Email Query |
| 355 | 355 | $join = $query->table_queue[$key]['join']; |
| 356 | 356 | $join->extra[1] = array( |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | ->condition('fid', $flag_ids, 'IN') |
| 25 | 25 | ->condition('uid', $account->uid, '=') |
| 26 | 26 | ->condition('content_type', 'taxonomy_term', '=') |
| 27 | - ->fields('f',array('content_id')) |
|
| 27 | + ->fields('f', array('content_id')) |
|
| 28 | 28 | ->execute() |
| 29 | 29 | ->fetchAll(); |
| 30 | 30 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $tids = array(); |
| 37 | - foreach($result as $row) { |
|
| 37 | + foreach ($result as $row) { |
|
| 38 | 38 | $tids[] = (integer) $row->content_id; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | $result = $query |
| 49 | 49 | ->addTag('node_access') |
| 50 | 50 | ->condition('tid', $tids, 'IN') |
| 51 | - ->fields('t',array('nid')) |
|
| 51 | + ->fields('t', array('nid')) |
|
| 52 | 52 | ->groupBy('nid') |
| 53 | 53 | ->execute() |
| 54 | 54 | ->fetchAll(); |
| 55 | 55 | |
| 56 | 56 | // Return the node IDs. |
| 57 | 57 | $nids = array(); |
| 58 | - foreach($result as $row) { |
|
| 58 | + foreach ($result as $row) { |
|
| 59 | 59 | $nids[] = (integer) $row->nid; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ->condition('fid', $flag_ids, 'IN') |
| 27 | 27 | ->condition('uid', $account->uid, '=') |
| 28 | 28 | ->condition('content_type', 'user', '=') |
| 29 | - ->fields('f',array('content_id')) |
|
| 29 | + ->fields('f', array('content_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->content_id; |
| 41 | 41 | } |
| 42 | 42 | |