Skip to content

Instantly share code, notes, and snippets.

@orakili
orakili / messaging_fix_element_prerendering-1169180.patch
Created May 27, 2011 01:00
#1169180 - Drupal 7.x - Messaging 7.x-1.0-alpha1 - Element prerendering patch
diff --git messaging_template/messaging_template.module messaging_template/messaging_template.module
index 05eacf2..435a2d3 100644
--- messaging_template/messaging_template.module
+++ messaging_template/messaging_template.module
@@ -121,8 +121,10 @@ function messaging_template_pre_render_element($element) {
'#method' => $element['#method'],
);
foreach (element_children($element) as $index) {
- $element[$index] = $properties + $element[$index];
- $element[$index] = messaging_template_pre_render_element($element[$index]);
@orakili
orakili / taxonomy_index_unpublished-962664.patch
Created July 25, 2011 01:25
#962664 - Taxonomy Index for unpublished entities
diff --git modules/taxonomy/taxonomy.module modules/taxonomy/taxonomy.module
index 45639a1..a6ee42c 100644
--- modules/taxonomy/taxonomy.module
+++ modules/taxonomy/taxonomy.module
@@ -1619,8 +1619,10 @@ function taxonomy_field_presave($entity_type, $entity, $field, $instance, $langc
function taxonomy_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
// We maintain a denormalized table of term/node relationships, containing
// only data for current, published nodes.
- if (variable_get('taxonomy_maintain_index_table', TRUE) && $field['storage']['type'] == 'field_sql_storage' && $entity_type == 'node' && $entity->status) {
- _taxonomy_field_save_index($entity, $items);
@orakili
orakili / 1217396_drupal_link_optional_title_required_field_validation_error.patch
Created October 3, 2011 06:07
#1217396 - Drupal 7.x - Link - Required field & optional title produces validation error.
@orakili
orakili / context_specific_entity_paths_with_additional_path_elements.patch
Created October 5, 2011 14:21
Drupal - Context 7.x-3.x - Handles specific entity paths with additional path elements.
diff --git context.core.inc context.core.inc
index 5a85e8a..398356f 100644
--- context.core.inc
+++ context.core.inc
@@ -209,22 +209,21 @@ function context_views_pre_view($view, $display) {
}
// Support Views overrides of specific entity paths.
if ($view->display_handler->has_path()) {
- switch ($view->display_handler->get_option('path')) {
- case 'taxonomy/term/%':
@orakili
orakili / strongarm-undefined-property-in_code_only-1286396-11-no_prefix.patch
Created October 6, 2011 07:48
Drupal - Strongarm 7.x-2.x - #1286396: Undefined property: stdClass::$in_code_only
diff --git strongarm.admin.inc strongarm.admin.inc
index 9a82a24..87546e3 100644
--- strongarm.admin.inc
+++ strongarm.admin.inc
@@ -20,7 +20,7 @@ function strongarm_admin_form($form_state) {
$storage = t('Hardcoded');
$hardcoded = TRUE;
}
- elseif (isset($variable->in_code_only)) {
+ elseif (!empty($variable->in_code_only)) {
@orakili
orakili / search_api_views-empty-filter.patch
Created June 29, 2012 07:52
Drupal 7 - Search API views - "is empty" and "is not empty" operators.
diff --git a/contrib/search_api_views/includes/handler_filter.inc b/contrib/search_api_views/includes/handler_filter.inc
index cc965da..3ac19f0 100644
--- a/contrib/search_api_views/includes/handler_filter.inc
+++ b/contrib/search_api_views/includes/handler_filter.inc
@@ -37,6 +37,8 @@ class SearchApiViewsHandlerFilter extends views_handler_filter {
'<>' => t('Is not equal to'),
'>=' => t('Is greater than or equal to'),
'>' => t('Is greater than'),
+ 'NULL' => t('Is empty'),
+ 'NOT NULL' => t('Is not empty'),
diff --git legacy_reference.module legacy_reference.module
index 43ffc1b..99141da 100644
--- legacy_reference.module
+++ legacy_reference.module
@@ -242,7 +242,7 @@ function legacy_reference_feeds_processor_targets_alter(&$targets, $entity_type,
if ($info['type'] == 'legacy_reference') {
$targets[$name] = array(
'name' => $instance['label'],
- 'callback' => 'field_feeds_set_target_text',
+ 'callback' => 'legacy_reference_feeds_set_target',
@orakili
orakili / 1343822-plus-962664-plus-995156-drupal_7_15.patch
Created September 12, 2012 02:17
Drupal 7.15 - Taxonomy patch combining #1343822 (autocreate) and #962664 (unpublished nodes) and #995156 (permission vocabulary machine_name)
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 828fde0..6f72f4d 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -768,7 +768,7 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
$form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
- '#access' => user_access("delete terms in $vocabulary->vid") || user_access('administer taxonomy'),
+ '#access' => user_access("delete terms in $vocabulary->machine_name") || user_access('administer taxonomy'),
@orakili
orakili / views_3_5_1024832_relationship_node_term_data.patch
Created September 13, 2012 23:27
Drupal 7 - Views 3.5 - Patch for #1024832
diff --git a/modules/taxonomy/views_handler_relationship_node_term_data.inc b/modules/taxonomy/views_handler_relationship_node_term_data.inc
index d7fbb4c..7046cfb 100644
--- a/modules/taxonomy/views_handler_relationship_node_term_data.inc
+++ b/modules/taxonomy/views_handler_relationship_node_term_data.inc
@@ -54,10 +54,12 @@ class views_handler_relationship_node_term_data extends views_handler_relationsh
function query() {
$this->ensure_my_table();
- $def = $this->definition;
+ $vocabularies = array_filter($this->options['vocabularies']);
@orakili
orakili / feeds_2_0_alpha5_1001590_and_1665450_path_aliases.patch
Created September 13, 2012 23:49
Drupal 7 - Feeds 2.0-alpha5 - Patch combining #1001590 and #1665450 - path aliases
diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc
index 2df4b35..06e5ae9 100644
--- a/plugins/FeedsNodeProcessor.inc
+++ b/plugins/FeedsNodeProcessor.inc
@@ -219,6 +219,22 @@ class FeedsNodeProcessor extends FeedsProcessor {
$target_node->feeds['suppress_import'] = TRUE;
}
break;
+ case 'path_alias':
+ $target_node->path = array();