Fix envelope unwrapping to create the right transaction object types.

skala
Marco Villegas 12 years ago
parent 40c74cf874
commit cf3fcdf5c7
  1. 6
      src/ChamiloLMS/Transaction/Envelope.php

@ -218,7 +218,11 @@ class Envelope
if ($blob === FALSE) { if ($blob === FALSE) {
throw new UnwrapException('Invalid blob format passed: Empty content.'); throw new UnwrapException('Invalid blob format passed: Empty content.');
} }
$this->transactions = $this->wrapperPlugin->unwrap($blob, $blob_metadata); $transactions = $this->wrapperPlugin->unwrap($blob, $blob_metadata);
foreach ($transactions as $transaction) {
// @fixme Decouple!
$this->transactions[] = TransactionLogController::createTransaction($transaction->action, (array)$transaction);
}
$this->state |= self::STATE_OPEN; $this->state |= self::STATE_OPEN;
} }
catch (Exception $exception) { catch (Exception $exception) {

Loading…
Cancel
Save