Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: Diff  |  size: 0.87 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: sf_queue_processor.module
  2. ===================================================================
  3. --- sf_queue_processor.module   (revision 2828)
  4. +++ sf_queue_processor.module   (working copy)
  5. @@ -294,8 +294,8 @@
  6.                 $objects = array();
  7.  
  8.                 // get all the objects out of the batch
  9. -
  10. -               foreach($batch['records'] as $item) {
  11. +    $records = array();
  12. +               foreach($batch['records'] as $i => $item) {
  13.                   // Skip if no object is present. This prevents errors when Sync is run
  14.                   // with nothing pending in the queue.
  15.                   if (!isset($item->object)) {
  16. @@ -313,8 +313,9 @@
  17.          continue;
  18.        }
  19.        array_push($objects, (object)$object);
  20. +      $records[] = $item;
  21.                 }
  22. -
  23. +    $batch['records'] = $records;
  24.                 // apply validation for create/upsert/update actions
  25.                 if ($batch['action'] != 'delete') {
  26.                         queue_validate_batch($objects, $batch['salesforce_type']);