@@ -79,8 +79,7 @@ |
||
| 79 | 79 | foreach (commons_media_filter_parse_from_fields($entity_type, $entity) as $file_reference) { |
| 80 | 80 | if (empty($entity_files[$file_reference['fid']])) { |
| 81 | 81 | $entity_files[$file_reference['fid']] = 1; |
| 82 | - } |
|
| 83 | - else { |
|
| 82 | + } else { |
|
| 84 | 83 | $entity_files[$file_reference['fid']]++; |
| 85 | 84 | } |
| 86 | 85 | } |
@@ -40,17 +40,17 @@ |
||
| 40 | 40 | |
| 41 | 41 | $flag_wrapper_classes_array = array(); |
| 42 | 42 | $flag_wrapper_classes_array[] = 'flag-wrapper'; |
| 43 | - $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name']; |
|
| 44 | - $flag_wrapper_classes_array[] = 'flag-' . $variables['flag_css_name'] . '-' . $entity_id; |
|
| 45 | - $variables['flag_wrapper_classes'] = implode(' ',$flag_wrapper_classes_array); |
|
| 43 | + $flag_wrapper_classes_array[] = 'flag-'.$variables['flag_css_name']; |
|
| 44 | + $flag_wrapper_classes_array[] = 'flag-'.$variables['flag_css_name'].'-'.$entity_id; |
|
| 45 | + $variables['flag_wrapper_classes'] = implode(' ', $flag_wrapper_classes_array); |
|
| 46 | 46 | |
| 47 | 47 | $flag_classes_array = array(); |
| 48 | 48 | $flag_classes_array[] = 'flag'; |
| 49 | - $flag_classes_array[] = $action . '-action'; |
|
| 50 | - $flag_classes_array[] = 'flag-link-' . $flag->link_type; |
|
| 49 | + $flag_classes_array[] = $action.'-action'; |
|
| 50 | + $flag_classes_array[] = 'flag-link-'.$flag->link_type; |
|
| 51 | 51 | $variables['flag_classes'] = implode(' ', $flag_classes_array); |
| 52 | 52 | $variables['is_flagged'] = $action; |
| 53 | - $variables['link_text'] = $flag->get_label($action . '_short', $entity_id); |
|
| 53 | + $variables['link_text'] = $flag->get_label($action.'_short', $entity_id); |
|
| 54 | 54 | |
| 55 | 55 | return theme('commons_follow_otheruser_flag', $variables); |
| 56 | 56 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | function commons_polls_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 26 | 26 | $node = $form['#node']; |
| 27 | 27 | |
| 28 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 28 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 29 | 29 | |
| 30 | 30 | if ($bundle == 'poll' && empty($node->nid)) { |
| 31 | 31 | drupal_set_title(t('Create a poll')); |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | /** |
| 135 | 135 | * Implements hook_strongarm_alter(). |
| 136 | 136 | */ |
| 137 | - function commons_wikis_strongarm_alter(&$items) { |
|
| 137 | + function commons_wikis_strongarm_alter(&$items) { |
|
| 138 | 138 | // Expose the wiki content type for integration with Commons Radioactivity |
| 139 | 139 | // and Commons Groups. |
| 140 | 140 | foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) { |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | function commons_polls_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 26 | 26 | $node = $form['#node']; |
| 27 | 27 | |
| 28 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 28 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 29 | 29 | |
| 30 | 30 | if ($bundle == 'poll' && empty($node->nid)) { |
| 31 | 31 | drupal_set_title(t('Create a poll')); |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | /** |
| 74 | 74 | * Implements hook_strongarm_alter(). |
| 75 | 75 | */ |
| 76 | - function commons_posts_strongarm_alter(&$items) { |
|
| 76 | + function commons_posts_strongarm_alter(&$items) { |
|
| 77 | 77 | // Expose the post content type for integration with Commons Radioactivity |
| 78 | 78 | // and Commons Groups. |
| 79 | 79 | foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) { |
@@ -263,8 +263,7 @@ |
||
| 263 | 263 | |
| 264 | 264 | if (node_access('create', 'event')) { |
| 265 | 265 | return t('There are no events. Be the first to <a href="!url">create one</a>!', array('!url' => url('node/add/event'))); |
| 266 | - } |
|
| 267 | - else { |
|
| 266 | + } else { |
|
| 268 | 267 | return t('There are no events. Be the first to create one!'); |
| 269 | 268 | } |
| 270 | 269 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | function commons_polls_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 26 | 26 | $node = $form['#node']; |
| 27 | 27 | |
| 28 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 28 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 29 | 29 | |
| 30 | 30 | if ($bundle == 'poll' && empty($node->nid)) { |
| 31 | 31 | drupal_set_title(t('Create a poll')); |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | 'weight' => 1, |
| 215 | 215 | ), |
| 216 | 216 | ); |
| 217 | - // Exported field_instance: 'node-group-body' |
|
| 217 | + // Exported field_instance: 'node-group-body' |
|
| 218 | 218 | $field_instances["$entity_type-$bundle-body"] = array( |
| 219 | 219 | 'bundle' => $bundle, |
| 220 | 220 | 'default_value' => NULL, |
@@ -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 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | ); |
| 258 | 258 | |
| 259 | 259 | // Exported field_instance: 'node-group-group_group' |
| 260 | - $field_instances["$entity_type-$bundle-" . OG_GROUP_FIELD] = array( |
|
| 260 | + $field_instances["$entity_type-$bundle-".OG_GROUP_FIELD] = array( |
|
| 261 | 261 | 'bundle' => $bundle, |
| 262 | 262 | 'default_value' => array( |
| 263 | 263 | 0 => array( |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $commons_topics_entity_types = commons_topics_get_entity_types_with_topics(); |
| 20 | 20 | if (!empty($commons_topics_entity_types)) { |
| 21 | 21 | foreach ($commons_topics_entity_types as $entity_type => $bundles) { |
| 22 | - foreach(array_keys($bundles) as $bundle) { |
|
| 22 | + foreach (array_keys($bundles) as $bundle) { |
|
| 23 | 23 | $info['features']['field_instance'][] = "$entity_type-$bundle-field_topics"; |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ); |
| 43 | 43 | $form['topics_wrapper']['field_topics'] = $form['field_topics']; |
| 44 | 44 | $form['field_topics'] = array('#language' => NULL); |
| 45 | - $form['#attached']['js'][] = drupal_get_path('module', 'commons_topics') . '/js/commons_topics.js'; |
|
| 45 | + $form['#attached']['js'][] = drupal_get_path('module', 'commons_topics').'/js/commons_topics.js'; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | ); |
| 146 | 146 | |
| 147 | 147 | // Exported field_base: 'og_group_ref' |
| 148 | - $field_bases['og_group_ref'] = array( |
|
| 148 | + $field_bases['og_group_ref'] = array( |
|
| 149 | 149 | 'active' => '1', |
| 150 | 150 | 'cardinality' => '-1', |
| 151 | 151 | 'deleted' => '0', |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | /** |
| 10 | 10 | * Implements hook_strongarm_alter(). |
| 11 | 11 | */ |
| 12 | - function commons_polls_strongarm_alter(&$items) { |
|
| 12 | + function commons_polls_strongarm_alter(&$items) { |
|
| 13 | 13 | // Expose the poll content type for integration with Commons Radioactivity |
| 14 | 14 | // and Commons Groups. |
| 15 | 15 | foreach (array('commons_radioactivity_entity_types', 'commons_groups_entity_types') as $key) { |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | function commons_polls_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 26 | 26 | $node = $form['#node']; |
| 27 | 27 | |
| 28 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 28 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 29 | 29 | |
| 30 | 30 | if ($bundle == 'poll' && empty($node->nid)) { |
| 31 | 31 | drupal_set_title(t('Create a poll')); |
@@ -80,10 +80,10 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $form['choice_wrapper']['add_choice'] = array( |
| 83 | - '#markup' => '<a href="#" id="add-choice">' . t('Add more choices') . '</a>', |
|
| 83 | + '#markup' => '<a href="#" id="add-choice">'.t('Add more choices').'</a>', |
|
| 84 | 84 | ); |
| 85 | 85 | |
| 86 | - $form['#attached']['js'][] = drupal_get_path('module', 'commons_polls') . '/js/commons_polls_partial_form.js'; |
|
| 86 | + $form['#attached']['js'][] = drupal_get_path('module', 'commons_polls').'/js/commons_polls_partial_form.js'; |
|
| 87 | 87 | |
| 88 | 88 | $form['actions']['submit']['#value'] = t('Create'); |
| 89 | 89 | |