Skip to content

Instantly share code, notes, and snippets.

View rafaqz's full-sized avatar

Rafael Schouten rafaqz

  • Center for Macroecology, Evolution and Climate
  • Copenhagen
View GitHub Profile
@rafaqz
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...
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
rafaqz / growshare_feeds.patch
Last active December 18, 2015 17:39
Drupal Feeds Patch to add location and group handling
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"]) {