Hi,

I'm writing a plugin for feeds tamper to only import items with a date bellow now now +3 days but I have an error Missing argument 6 for feeds_tamper_threedays_callback()"

here is my plugin:

/**
* @file
* Convert string to timestamp.
*/
 
$plugin = array(
'form' => 'feeds_tamper_threedays_form',
'callback' => 'feeds_tamper_threedays_callback',
'name' => 'Verify now more 3 days',
'multi' => 'skip,
'category' => 'Date/time',
);

function feeds_tamper_threedays_form($importer, $element_key, $settings) {
  $form = array();
  $form['html'] = array(
    '#markup' => t('Verify now more 3 days.'),
  );
  return $form;
 }
 
 function feeds_tamper_threedays_callback($result, $item_key, $element_key, &$field, $settings, $source) {
   $field = strtotime($field);
   $now = time();
  if ($field >= ($now + 259200)){ // 259200 seconds = 3 days
   unset($result->items[$item_key]);
 }
          return;
 }

Could someone point me on the right direction?

Thanks

Comments

PedroMiguel’s picture

Status: Active » Fixed

I post to soon, this patch solve my problem: http://drupal.org/node/1705900

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.