Skip to content

Instantly share code, notes, and snippets.

Avatar

Shiraz Dindar shirazd

View GitHub Profile
@shirazd
shirazd / feeds_empty_patch_over_patch.patch
Created Jun 8, 2012
patch to be applied over franz existing patch.
View feeds_empty_patch_over_patch.patch
diff --git a/mappers/field.inc b/mappers/field.inc
index dd8978c..6c96108 100644
--- a/mappers/field.inc
+++ b/mappers/field.inc
@@ -111,7 +111,7 @@ function _field_feeds_set_target($source, $entity, $target, $value, $input_forma
$field = isset($entity->$target) ? $entity->$target : array();
foreach ($value as $v) {
// Check if field value is empty.
- if(empty($v[0])){
+ if ((is_array($v) && empty($v[0]) || (!is_array($v) && empty ($v)))) {
@shirazd
shirazd / gist:5093487
Last active Dec 14, 2015
display name: block
View gist:5093487
$view = new view();
$view->name = 'cis_communications';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'CIS Communications';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */