Instantly share code, notes, and snippets.
rafaqz
/ growshare_feeds_xls_case.patch
Last active
December 18, 2015 17:39
Adds better case handling to feeds xls. Probably should make an issue on drupal.org...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/FeedsExcelParser.inc b/FeedsExcelParser.inc | |
index 3a0e5da..29d66c0 100644 | |
--- a/FeedsExcelParser.inc | |
+++ b/FeedsExcelParser.inc | |
@@ -102,7 +102,7 @@ class FeedsExcelParser extends FeedsParser{ | |
$cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set | |
foreach($cellIterator as $cell){ | |
if(!is_null($cell)){ | |
- $headers[] = trim($cell->getCalculatedValue()); | |
+ $headers[] = trim(drupal_strtolower($cell->getCalculatedValue())); |
rafaqz
/ growshare_feeds.patch
Last active
December 18, 2015 17:39
Drupal Feeds Patch to add location and group handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc | |
index c2b0af5..7bcd238 100755 | |
--- a/plugins/FeedsProcessor.inc | |
+++ b/plugins/FeedsProcessor.inc | |
@@ -178,6 +178,25 @@ abstract class FeedsProcessor extends FeedsPlugin { | |
$state = $source->state(FEEDS_PROCESS); | |
while ($item = $parser_result->shiftItem()) { | |
+ //hack to get location target id from feed source | |
+ if ($source->config["FeedsCSVParser"]) { |
NewerOlder